Lecture 2 (Chapter 2) Classical Encryption Techniques Prepared by Dr. Lamiaa M. Elshenawy 1
Symmetric Cipher Model 1. Cryptography 2. Cryptanalysis and Brute-Force Attack Substitution Techniques 1. Caesar Cipher 2. Monoalphabetic Ciphers 3. Playfair Cipher 4. Hill Cipher 5. Polyalphabetic Ciphers 6. One-Time Pad Transposition Techniques Rotor Machines Steganography
Symmetric encryption (conventional encryption) is a form of cryptosystem in which encryption and decryption are performed using the same key Symmetric encryption transforms plaintext into ciphertext using a secret key and an encryption algorithm and decrypt by the same key and a decryption algorithm Two types of attack on an encryption algorithm 1. Cryptanalysis based on properties of the encryption algorithm 2. Brute-force, trying all possible keys
Traditional (pre-computer) symmetric ciphers use substitution and/or transposition techniques 1. Substitution techniques map plaintext elements (characters, bits) into ciphertext elements 2. Transposition techniques systematically transpose the positions of plaintext elements Rotor machines are sophisticated pre-computer hardware devices that use substitution techniques. Steganography is a technique for hiding a secret message within a larger one in such a way that others cannot discern the presence or contents of the hidden message.
Ciphertext Input Decryption algorithm Secret key Decryption Plaintext output Plaintext Input Encryption algorithm Secret key Encryption Ciphertext output
Plaintext: The original intelligible message or data that is fed into the algorithm as input Encryption algorithm: The encryption algorithm performs various substitutions and transformations on the plaintext Secret key: The secret key is also an input to the encryption algorithm Ciphertext: The scrambled unintelligible message produced as output Decryption algorithm: It takes the ciphertext and the secret key to produce the original plaintext
Encryption Y = E(K, X) Decryption X = D(K, Y) Chipertext Plaintext Secrete key Encryption algorithm Decryption algorithm
Strong encryption algorithm Secret key should be secret (sender/receiver)
Cryptology 1- Cryptography (enciphering) 2- Cryptanalysis (deciphering) Cryptanalyst (Opponent-Adversary- Hacker)
Encryption techniques Substitution techniques Transposition techniques Secret keys Symmetric (single-key) Asymmetric (two-key) Plaintext processing Block cipher (processes one block of input elements at a time) Stream cipher (processes one of input elements at a time)
Cryptanalysis ( plaintext-ciphertext pairs- algorithm nature) Brute-force attack (try possible keys) Objective recover the key
Unconditionally secure Computationally secure Cost of breaking cipher > value of encrypted information Time of breaking cipher > lifetime of information
32-bit key 56-bit key (DES) 128-bit key (AES) 168-bit Key Key Size (bits)Number of Alternative Keys Time required at 1 decryption/µs Time required at 10 6 decryptions/µs = 4.3 µs= 35.8 minutes2.15 milliseconds = 7.2 µs= 1142 years10.01 hours = 3.4 µs= 5.4 years5.4 years = 3.7 µs= 5.9 years5.9 years 26 characters (permutation) 26! = 4 µs= 6.4 years6.4 10 6 years DES: Data Encryption Standard AES: Advanced Encryption Standard
1. Caesar Cipher 2. Monoalphabetic Ciphers 3. Playfair Cipher 4. Hill Cipher 5. Polyalphabetic Ciphers (Vigenère cipher– Vernam cipher) 6. One-Time Pad - Substitution techniques - Transposition techniques Rail fence
Plaintext: meet me after the party Ciphertext: PHHW PH DIWHU WKH SDUWB abcdefghijklmnopqrstuvwxyz DEFGHIGKLMNOPQRSTUVWXYZABC Letter 3 rd letter Gaius Julius Caesar: Roman Dictator, 1st century BC
C = E(K, P) = (P + K) mod 26 P = D(K, C) = (C - K) mod 26 abcdefghijklm nopqrstuvwxyz
5 × 5 matrix Allied forces “MONARCHY” MONAR CHYBD EFGI/JK LPQST UVWXZ World War II Baron Playfair is a British scientist and a friend of Sir Charles Wheatstone in1854
Example: Plaintext: “How are you” “HO WA RE YO UQ” Ciphertext: “FH XN MK HN WL”
C = E(K, P) = PK mod 26 P = D(K, C) = CK -1 mod 26 For 3 × 3 matrix Lester S. Hill (1891–1961) :An American mathematician and educator
1. Vigenère Cipher 2. Vernam Cipher
C i = (p i + k i mod m ) mod 26 p i = (C i - k i mod m ) mod 26 Blaise de Vigenère (5 April 1523 – 19 February 1596): French diplomat, cryptographer, translator and alchemist
“decpective”
Gilbert Sandford Vernam (3 April 1890 – 7 February 1960): American scientist
Let the message be “IF” then its ASCII code be ( ) and the key be ( ) Encryption: Plaintext: Key: Ciphertext: Decryption: Ciphertext: Key: Plaintext:
An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement to Vernam cipher that yields the ultimate in security Mauborgne suggested using random key one time to encrypt and decrypt a single message Random key Unbreakable One-time pad is the only cryptosystem that is referred to as perfect secrecy Joseph Mauborgne was American General (February 26, 1881 – June 7, 1971) co-invented the one time pad with Gillbert Vernam in 1914
Example
Rail fence “meet me after the toga party”
Hebern rotor machine Rotor machines
Steganography Character marking Invisible ink Pin puncture Type writer correction ribbon
Thank you for your attention