Encryption
Encryption
Definition:
Cryptography is the study of mathematical techniques for securing digital information, systems, and
distributed computation from adversarial attacks.
Aspects of Cryptography:
1. Confidentiality – Ensuring only the intended recipient can read the message.
2. Integrity – Verifying that the message has not been tampered with and is from the claimed sender.
Attacker Models:
Active Attacker (Mallory) – Can modify data (requires both confidentiality and integrity).
Cryptography vs Steganography
Steganography:
Cryptography:
Goal: Hide the meaning of a message
Dependence: Security via secret key (Kerckhoff’s Principle)
Symmetric and Asymmetric Encryption
Formal Syntax:
Three algorithms:
Asymmetric Encryption:
• Uses a key pair: public key (encrypt/verify) and private key (decrypt/sign).
Classical Ciphers:
2. Substitution Cipher:
Example:
Plaintext: "HELLO"
Key: "KEY"
Ciphertext: "RIJVS"
Playfair Cipher
Rules:
Example:
Vernam Cipher:
One-Time Pad:
Message: "HELLO"
Key: "XMCKL"
Ciphertext: "EQNVZ"
Hill Cipher
Example:
Key:
Transposition Ciphers
Example:
Ciphertext: "WECRLTEERDSOEEFEAOCAIVDEN"
Example:
Key: 4 3 1 2 5 6 7
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
16 rounds:
S-boxes:
DES Example:
Message: 0123456789ABCDEF
Key: 133457799BBCDFF1
AES Process:
3. Rounds (9 or 11 or 13):
• SubBytes (S-box)
• ShiftRows
• MixColumns
• AddRoundKey