Chapter 2 1_Symmetric and Asymmetric Encryption
Chapter 2 1_Symmetric and Asymmetric Encryption
Symmetric Cryptography
Symmetric cryptography (also known as secret-key cryptography) is a type of encryption where
the same key is used for both encryption and decryption. It is faster and more efficient for
encrypting large amounts of data but requires a secure way to share the secret key between
parties.
Components of Symmetric Cryptography:
1. Plaintext – The original data that needs to be encrypted.
2. Encryption Algorithm – The algorithm that transforms plaintext into ciphertext using the
secret key.
3. Secret Key – A shared key that both sender and receiver use for encryption and
decryption.
4. Ciphertext – The encrypted output of the plaintext.
5. Decryption Algorithm – The algorithm that converts ciphertext back to plaintext using
the same secret key.
Examples of Symmetric Encryption Algorithms:
• Advanced Encryption Standard (AES)
• Data Encryption Standard (DES)
• Triple DES (3DES)
• Blowfish
Asymmetric Cryptography
Asymmetric cryptography (also known as public-key cryptography) uses two keys: a public key
for encryption and a private key for decryption. This eliminates the need for secure key
exchange, making it ideal for secure communications like digital signatures and SSL/TLS
encryption.
Components of Asymmetric Cryptography:
1. Plaintext – The original data that needs to be encrypted.
2. Encryption Algorithm – The algorithm that encrypts data using the recipient's public key.
3. Public Key – A publicly shared key used for encryption.
4. Ciphertext – The encrypted message that can only be decrypted with the corresponding
private key.
5. Private Key – A secret key held by the recipient for decryption.
6. Decryption Algorithm – The algorithm that decrypts the ciphertext using the private key.
Examples of Asymmetric Encryption Algorithms:
• RSA (Rivest-Shamir-Adleman)
• ECC (Elliptic Curve Cryptography)
• Diffie-Hellman
• Digital Signature Algorithm (DSA)
Key Differences Between Symmetric and Asymmetric Cryptography:
Keys Used Single secret key Public and private key pair
Use Case Data encryption, file storage Digital signatures, secure key exchange
1. Symmetric Cryptography (Secret-Key Cryptography)
How It Works:
1. A single secret key is generated and shared between the sender and receiver.
2. The sender encrypts the plaintext using the secret key and a chosen encryption
algorithm.
3. The encrypted message (ciphertext) is sent to the receiver.
4. The receiver uses the same secret key and decryption algorithm to convert the
ciphertext back into plaintext.
Advantages of Symmetric Cryptography:
Fast Processing – Since it uses a single key, encryption and decryption are quick.
Efficient for Large Data – Ideal for encrypting large files, databases, and bulk data
transmission.
Lower Computational Cost – Requires fewer computing resources compared to asymmetric
cryptography.
Disadvantages of Symmetric Cryptography:
Key Distribution Challenge – The secret key must be securely shared between sender and
receiver, which can be risky.
Scalability Issue – In large networks, managing multiple secret keys for different users
becomes difficult.
No Non-Repudiation – Since both parties have the same key, it's hard to prove who
encrypted or decrypted a message.
Real-World Use Cases:
File and Disk Encryption – AES is widely used in software like BitLocker and VeraCrypt.
Wireless Network Security – Wi-Fi encryption protocols (WPA2, WPA3) use symmetric
encryption.
Banking Transactions – ATMs and card payment systems use symmetric encryption to
protect user data.
2. Asymmetric Cryptography (Public-Key Cryptography)
How It Works:
1. A key pair is generated:
o Public Key – Shared with anyone and used for encryption.
o Private Key – Kept secret and used for decryption.
2. The sender encrypts the plaintext using the recipient’s public key.
3. The encrypted message (ciphertext) is sent to the receiver.
4. The receiver decrypts the message using their private key.
Advantages of Asymmetric Cryptography:
No Need for Secure Key Exchange – Since only the public key is shared, there's no risk of
interception.
Provides Authentication – Used in digital signatures to verify sender identity.
Ensures Non-Repudiation – The sender cannot deny sending the message if it was signed
with their private key.
Disadvantages of Asymmetric Cryptography:
Secure Web Communication (SSL/TLS) – HTTPS websites use asymmetric encryption for
secure browsing.
Digital Signatures – Used in electronic contracts, blockchain, and certificates.
Secure Email Communication – PGP and S/MIME use asymmetric cryptography to encrypt
and sign emails.
3. Hybrid Cryptography (Combining Both)
To balance speed and security, many systems use a hybrid approach:
1. Asymmetric encryption is used to securely exchange a symmetric key.
2. Once the symmetric key is shared, symmetric encryption is used for bulk data
encryption.
Example:
TLS (Transport Layer Security) – When you visit an HTTPS website, asymmetric encryption
secures the initial handshake, and symmetric encryption secures the session.
Keys Used One secret key Public and private key pair
Security Less secure due to key exchange More secure for communication
Key
Key must be shared securely No need to share private key
Distribution