Symmetric Cipher Model
Plaintext
input
1- encryption algorithm
2- secret key
Encryption
Cipher text
output
Cipher text
input
1- Decryption algorithm2- secret key
Decryption
Plaintext
output
Symmetric Cipher Model• 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.
Symmetric Cipher Model
Computer Security(CS4800)
Lecture 4Ch.2
Classical Encryption TechniquesPrepared by Dr. Lamiaa Elshenawy
Security Mathematics
• Encryption Y = E(K, X)
•Decryption X = D(K, Y)
Chipertext Plaintext
Secrete key
Encryption algorithm
Decryption algorithm
Security Requirements
• Strong encryption algorithm
• Secret key should be secret (sender/receiver)
Symmetric Cipher Model
- Cryptology1- Cryptography (enciphering)
2- Cryptanalysis (deciphering)
- Cryptanalyst
Cryptography
• Encryption techniques Substitution techniques Transposition techniques
• Secret keys Symmetric (single-key) Asymmetric (two-key)
• Plaintext processing Block cipher Stream cipher
Cryptanalysis and Brute-Force Attack
Cryptanalysis ( plaintext-ciphertext pairs)
Brute-force attack (try possible keys)
• Objective recover the key
Cryptanalysis and Brute-Force Attack
• Unconditionally secure
• Computationally secure
Cost of breaking cipher > value of encrypted information.
Time of breaking cipher > lifetime of information.
• 4-bit key • 56-bit key (DES)• 128-bit key (AES)
Key Size (bits) Number of Alternative Keys
Time required at 1 decryption/µs
Time required at 106 decryptions/µs
32 232 = 4.3 109 231 µs = 35.8 minutes 2.15 milliseconds
56 256 = 7.2 1016 255 µs = 1142 years 10.01 hours
128 2128 = 3.4 1038 2127 µs = 5.4 1024 years 5.4 1018 years
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
26 characters (permutation)
26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years
Cryptanalysis and Brute-Force Attack
Symmetric Cipher Techniques
• Caesar Cipher• Monoalphabetic Ciphers• Playfair Cipher• Hill Cipher• Polyalphabetic Ciphers (Vigenère cipher–Vernam cipher)• One-Time Pad
- Substitution techniques
- Transposition techniques• Rail fence
Caesar Cipher
• plain: meet me after the party• cipher: PHHW PH DIWHU WKH SDUWB
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I G K L M N O P Q R S T U V W X Y Z A B C
• Letter 3rd letter
Caesar Cipher
• C = E(K, P) = (P + K) mod 26• P = D(K, C) = (C - K) mod 26
a b c d e f g h i j k l m0 1 2 3 4 5 6 7 8 9 10 11 12
n o p q r s t u v w x y z
13 14 15 16 17 18 19 20 21 22 23 24 25
Monoalphabetic Ciphers
Monoalphabetic Ciphers
Playfair Cipher
• 5 × 5 matrix• Allied forces “MONARCHY”
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
World War II
Hill Cipher
• C = E(K, P) = PK mod 26• P = D(K, C) = CK-1 mod 26• For 3 × 3 matrix
Polyalphabetic Ciphers
• Vigenère Cipher• Ci = (pi + ki mod m) mod 26• pi = (Ci - ki mod m) mod 26
Vigenère Cipher
“deceptive”
Vernam cipher
One-Time Pad
• Random key• Unbreakable
Transposition techniques
• Rail fence
“meet me after the toga party”
Symmetric Cipher Techniques
• Rotor machines
Hebern rotor machine
• Steganography• Character marking• Invisible ink• Pin puncture• Type writer correction ribbon
Thank you for your attention