Week 3: Cryptographic Techniques - M199205zn/IAS-CS4 GitHub Wiki
Cryptography is the practice of securing communication and data through encoding to ensure confidentiality, integrity, authentication, and non-repudiation. Cryptographic techniques can be categorized into two main types: symmetric encryption and asymmetric encryption. Additionally, there are classical encryption methods that laid the foundation for modern cryptography.
Symmetric encryption uses the same key for both encryption and decryption of data. The key must remain secret between the communicating parties.
- Speed: Faster than asymmetric encryption because of simpler algorithms.
- Key Distribution Problem: Securely sharing the secret key between parties is a challenge.
- Advanced Encryption Standard (AES): Widely used for securing sensitive data.
- Data Encryption Standard (DES): An older standard, now considered insecure due to its short key length.
- File encryption.
- Securing data in storage.
Asymmetric encryption uses a pair of keys: a public key (used for encryption) and a private key (used for decryption). The public key is shared openly, but the private key is kept secret.
- More Secure: Eliminates the need for sharing a single key.
- Slower: Computationally intensive compared to symmetric encryption.
- RSA (Rivest-Shamir-Adleman): Commonly used for secure data transmission.
- Elliptic Curve Cryptography (ECC): Provides strong security with smaller key sizes.
- Secure communication (e.g., SSL/TLS protocols).
- Digital signatures and certificates.
Aspect | Symmetric Encryption | Asymmetric Encryption |
---|---|---|
Key Usage | Single key for both encryption and decryption | Public key for encryption, private key for decryption |
Speed | Faster | Slower |
Security | Requires secure key sharing | Eliminates key sharing problem |
Use Cases | File encryption, large data encryption | Secure key exchange, digital signatures |
Classical encryption methods are early techniques used to encode messages. Though insecure by modern standards, they provide foundational insights into cryptography.
A substitution cipher where each letter in the plaintext is shifted by a fixed number of positions in the alphabet.
Example:
- Key: Shift = 3
- Plaintext: HELLO
- Ciphertext: KHOOR
Advantages:
- Simple and easy to understand.
Disadvantages:
- Vulnerable to frequency analysis and brute-force attacks due to the small key space.
- Vigenère Cipher: A polyalphabetic cipher that uses a keyword to shift letters.
- Playfair Cipher: Encrypts pairs of letters instead of single letters.
- Transposition Cipher: Rearranges the letters of plaintext according to a specific pattern.
Cryptographic techniques like symmetric and asymmetric encryption form the backbone of secure communication today. Classical methods like the Caesar cipher, though obsolete, demonstrate the evolution of cryptography. Choosing between symmetric and asymmetric encryption depends on factors such as speed, security, and application requirements.