# Cryptography: Basic to Advanced Concepts
## Basic Cryptography Concepts
### 1. Terminology
- **Plaintext**: Original readable message
- **Ciphertext**: Encrypted message
- **Encryption**: Process of converting plaintext to ciphertext
- **Decryption**: Process of converting ciphertext back to plaintext
- **Key**: Secret value used to encrypt/decrypt messages
### 2. Classical Ciphers
- **Caesar Cipher**: Shifts letters by fixed number
- **Substitution Cipher**: Replaces each letter with another
- **Vigenère Cipher**: Uses keyword for polyalphabetic substitution
### 3. Symmetric Cryptography
- **Single key** for both encryption and decryption
- Examples: AES (Advanced Encryption Standard), DES, 3DES
- Fast but requires secure key exchange
## Intermediate Concepts
### 1. Asymmetric Cryptography
- **Public/private key pairs**
- Public key encrypts, private key decrypts (or vice versa)
- Examples: RSA, ECC (Elliptic Curve Cryptography)
- Solves key distribution problem
### 2. Hash Functions
- One-way functions producing fixed-size output
- Examples: SHA-256, MD5 (insecure), SHA-3
- Used for data integrity, password storage
### 3. Digital Signatures
- Proves authenticity and integrity of messages
- Created by encrypting hash with private key
- Verified with public key
## Advanced Cryptography
### 1. Cryptographic Protocols
- **SSL/TLS**: Secure web communications
- **PGP/GPG**: Email encryption
- **SSH**: Secure remote access
### 2. Modern Algorithms
- **Post-quantum cryptography**: Resistant to quantum computers (Lattice-based, Hash-based)
- **Homomorphic encryption**: Computation on encrypted data
- **Zero-knowledge proofs**: Prove knowledge without revealing information
### 3. Cryptanalysis
- Techniques for breaking cryptographic systems
- Side-channel attacks
- Differential/linear cryptanalysis
- Birthday attacks on hash functions
### 4. Key Management
- Key derivation functions (PBKDF2, bcrypt, scrypt)
- Hardware Security Modules (HSMs)
- Key rotation policies
## Basic Cryptography Concepts
### 1. Terminology
- **Plaintext**: Original readable message
- **Ciphertext**: Encrypted message
- **Encryption**: Process of converting plaintext to ciphertext
- **Decryption**: Process of converting ciphertext back to plaintext
- **Key**: Secret value used to encrypt/decrypt messages
### 2. Classical Ciphers
- **Caesar Cipher**: Shifts letters by fixed number
- **Substitution Cipher**: Replaces each letter with another
- **Vigenère Cipher**: Uses keyword for polyalphabetic substitution
### 3. Symmetric Cryptography
- **Single key** for both encryption and decryption
- Examples: AES (Advanced Encryption Standard), DES, 3DES
- Fast but requires secure key exchange
## Intermediate Concepts
### 1. Asymmetric Cryptography
- **Public/private key pairs**
- Public key encrypts, private key decrypts (or vice versa)
- Examples: RSA, ECC (Elliptic Curve Cryptography)
- Solves key distribution problem
### 2. Hash Functions
- One-way functions producing fixed-size output
- Examples: SHA-256, MD5 (insecure), SHA-3
- Used for data integrity, password storage
### 3. Digital Signatures
- Proves authenticity and integrity of messages
- Created by encrypting hash with private key
- Verified with public key
## Advanced Cryptography
### 1. Cryptographic Protocols
- **SSL/TLS**: Secure web communications
- **PGP/GPG**: Email encryption
- **SSH**: Secure remote access
### 2. Modern Algorithms
- **Post-quantum cryptography**: Resistant to quantum computers (Lattice-based, Hash-based)
- **Homomorphic encryption**: Computation on encrypted data
- **Zero-knowledge proofs**: Prove knowledge without revealing information
### 3. Cryptanalysis
- Techniques for breaking cryptographic systems
- Side-channel attacks
- Differential/linear cryptanalysis
- Birthday attacks on hash functions
### 4. Key Management
- Key derivation functions (PBKDF2, bcrypt, scrypt)
- Hardware Security Modules (HSMs)
- Key rotation policies