🔐 Cryptography Unit 2

AES, Public Key Cryptosystem, Diffie-Hellman, RSA, Schnorr Identification, ECC and CRT

Unit 2

🎯 Unit 2 Overview

Unit 2 covers advanced encryption and public key cryptography. In this unit, AES, Diffie-Hellman, RSA, digital signatures, primality testing, elliptic curve cryptography and Chinese Remainder Theorem are studied.

Exam Tip: AES, Diffie-Hellman Key Exchange, RSA Algorithm, RSA Signature and Chinese Remainder Theorem are very important for RGPV exams.

🔒 Advanced Encryption Standard (AES)

AES is a symmetric key block cipher used for secure data encryption. It replaced DES because DES became weak due to its small key size.

Features of AES

Key Size Number of Rounds
128-bit 10 rounds
192-bit 12 rounds
256-bit 14 rounds

⚙️ AES Round Operations

AES performs multiple rounds of transformation on plaintext to generate ciphertext.

  1. SubBytes: Byte substitution using S-box.
  2. ShiftRows: Rows of state matrix are shifted.
  3. MixColumns: Columns are mixed for diffusion.
  4. AddRoundKey: Round key is XORed with state matrix.
Important: Final AES round does not include MixColumns operation.

🔑 Public Key Cryptosystem

Public key cryptosystem uses two keys: public key and private key. Public key is shared with everyone, while private key is kept secret by the owner.

Key Use
Public Key Used for encryption or signature verification
Private Key Used for decryption or digital signature generation

Advantages

📌 Discrete Logarithmic Problem

The discrete logarithmic problem is a mathematical problem used in many public key cryptosystems. It is easy to calculate powers modulo a number, but difficult to find the exponent.

Example: If gx mod p = y, finding x is called discrete logarithmic problem.

🤝 Diffie-Hellman Key Exchange

Diffie-Hellman is a key exchange algorithm used to securely share a secret key over an insecure channel.

Steps

  1. Alice and Bob agree on public values p and g.
  2. Alice chooses private key a and sends A = ga mod p.
  3. Bob chooses private key b and sends B = gb mod p.
  4. Alice calculates shared key K = Ba mod p.
  5. Bob calculates shared key K = Ab mod p.
  6. Both get the same secret key.

Advantages

⚠️ Computational & Decisional Diffie-Hellman Problem

Problem Meaning
Computational Diffie-Hellman Problem Given g, ga and gb, finding gab is difficult.
Decisional Diffie-Hellman Problem Given g, ga, gb and gc, deciding whether c = ab is difficult.

🔐 RSA Cryptosystem

RSA is a public key cryptosystem based on the difficulty of factorizing large prime numbers. It is used for encryption, decryption and digital signatures.

RSA Key Generation Steps

  1. Choose two large prime numbers p and q.
  2. Calculate n = p × q.
  3. Calculate φ(n) = (p − 1)(q − 1).
  4. Choose public key e such that gcd(e, φ(n)) = 1.
  5. Calculate private key d such that d × e ≡ 1 mod φ(n).
  6. Public key = (e, n), Private key = (d, n).

Encryption and Decryption

Ciphertext: C = M^e mod n
Plaintext: M = C^d mod n

📄 RSA Assumptions

✍️ RSA Signature

RSA digital signature is used to verify authenticity and integrity of a message.

Process

  1. Sender creates hash of message.
  2. Sender encrypts hash using private key.
  3. This encrypted hash is the digital signature.
  4. Receiver decrypts signature using sender public key.
  5. Receiver compares received hash with calculated hash.
Digital signature provides authentication, integrity and non-repudiation.

🆔 Schnorr Identification Scheme

Schnorr identification is a cryptographic protocol used to prove identity without revealing the secret key.

Features

🔎 Primality Testing

Primality testing is used to check whether a number is prime or not. Prime numbers are very important in cryptography, especially RSA.

Common Methods

📈 Elliptic Curve Cryptography (ECC)

Elliptic Curve Cryptography is a public key cryptographic technique based on elliptic curves. It provides strong security with smaller key sizes.

Elliptic Curve Equation

y² = x³ + ax + b

Advantages of ECC

🧮 Elliptic Curve over Reals and Modulo Prime

Type Description
Elliptic Curve over Reals Uses real numbers and is mainly used for understanding curve structure.
Elliptic Curve Modulo Prime Uses finite field modulo prime and is used in practical cryptography.

🧩 Chinese Remainder Theorem

Chinese Remainder Theorem is used to solve simultaneous congruence equations. It is also used in RSA to speed up computations.

Example Form

x ≡ a₁ mod m₁
x ≡ a₂ mod m₂
x ≡ a₃ mod m₃

Applications

⚖️ AES vs RSA

AES RSA
Symmetric key algorithm Asymmetric key algorithm
Same key for encryption and decryption Public key and private key are different
Fast Slower than AES
Used for bulk data encryption Used for key exchange and digital signature

⭐ Important Questions

  1. Explain AES algorithm and its round operations.
  2. Explain public key cryptosystem.
  3. Explain Diffie-Hellman Key Exchange algorithm.
  4. Explain Computational and Decisional Diffie-Hellman problem.
  5. Explain RSA algorithm with key generation steps.
  6. Explain RSA encryption and decryption.
  7. Explain RSA digital signature.
  8. Write short note on Schnorr Identification Scheme.
  9. Explain Elliptic Curve Cryptography.
  10. Explain Chinese Remainder Theorem and its applications.

🔥 Last Minute Revision

🔗 Related Links