Unit-1: Cryptography
Introduction to Cryptography
Cryptography is the science of securing information by transforming it into an unreadable format, only reversible by
authorized parties. Its goals include confidentiality, integrity, authentication, and non-repudiation (CIA-N).
Terminologies:
- Plaintext: Original readable message
- Ciphertext: Encrypted message
- Encryption: Converting plaintext into ciphertext
- Decryption: Reversing ciphertext into plaintext
- Key: A secret string used in encryption/decryption
- Cipher: The encryption/decryption algorithm
Historical Perspective
- Caesar Cipher: Shift letters by fixed number (e.g., +3: A -> D)
- Vigenère Cipher: Polyalphabetic cipher using a keyword
- Enigma Machine: WWII electromechanical encryption device
- Modern Ciphers: Use mathematical algorithms (e.g., AES, RSA)
Cryptography Algorithms
Hashing Functions:
- One-way functions mapping data to a fixed size value
- Properties: Irreversible, Deterministic, Collision-resistant
- Algorithms: MD5 (128-bit), SHA-1 (160-bit), SHA-256, SHA-3
Symmetric Encryption:
- Same key for encryption/decryption
- Examples: DES, 3DES, AES, RC4
- AES uses SubBytes, ShiftRows, MixColumns, AddRoundKey
Asymmetric Encryption:
- Uses public/private key pairs
- Examples: RSA, ECC, ElGamal
- RSA: Based on prime factorization, includes key generation and modular exponentiation
Unit-1: Cryptography
Quantum Cryptography:
- Based on quantum mechanics (e.g., BB84 protocol)
- Measures disturb quantum data-detecting eavesdropping
Cryptography in Practice
Real-World Applications:
- HTTPS uses SSL/TLS with RSA, AES, and SHA
- Email security via PGP
- Passwords stored with hashing (e.g., SHA-256)
- Blockchain uses hashing and digital signatures
- Messaging apps (e.g., Signal) use AES and HMAC
Cryptography Algorithm Uses
- AES: Encrypts data in VPNs, Wi-Fi, HTTPS
- RSA: Digital signatures, secure key exchange
- SHA-256: Blockchain, password security
- ECC: Mobile devices, smart cards
- Quantum: Experimental secure key sharing
Summary Table
| Type | Examples | Key Feature | Speed | Security |
|-------------|---------------|--------------------------|-----------|---------------|
| Hashing | SHA-256, SHA-3| One-way data integrity | Fast | Very Secure |
| Symmetric | AES, DES | Same key encryption | Very Fast | Medium-High |
| Asymmetric | RSA, ECC | Key pair usage | Slower | High |
| Quantum | BB84 | Quantum security | Exp | Ultra Secure |