Week 3: Cryptographic Techniques - M199205zn/IAS-CS4 GitHub Wiki

Cryptographic Techniques

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.


1. Symmetric Encryption

Symmetric encryption uses the same key for both encryption and decryption of data. The key must remain secret between the communicating parties.

image

Features:

  • Speed: Faster than asymmetric encryption because of simpler algorithms.
  • Key Distribution Problem: Securely sharing the secret key between parties is a challenge.

Examples:

  • 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.

Use Cases:

  • File encryption.
  • Securing data in storage.

2. Asymmetric Encryption

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.

image

Features:

  • More Secure: Eliminates the need for sharing a single key.
  • Slower: Computationally intensive compared to symmetric encryption.

Examples:

  • RSA (Rivest-Shamir-Adleman): Commonly used for secure data transmission.
  • Elliptic Curve Cryptography (ECC): Provides strong security with smaller key sizes.

Use Cases:

  • Secure communication (e.g., SSL/TLS protocols).
  • Digital signatures and certificates.

Symmetric vs Asymmetric Encryption

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

3. Classical Encryption Methods

Classical encryption methods are early techniques used to encode messages. Though insecure by modern standards, they provide foundational insights into cryptography.

image

Caesar Cipher:

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.

Other Classical Methods:

  1. Vigenère Cipher: A polyalphabetic cipher that uses a keyword to shift letters.
  2. image

  3. Playfair Cipher: Encrypts pairs of letters instead of single letters.
  4. image

  5. Transposition Cipher: Rearranges the letters of plaintext according to a specific pattern.
  6. image


Conclusion

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.

⚠️ **GitHub.com Fallback** ⚠️