90 likes | 244 Views
CPSC 3730 Cryptography. Chapter 2 Classical Encryption Techniques. Fig 2.1 Model of Conventional Encryption. Brute Force Attack/ Key Search. Table 2.2 Average Time Required for Exhaustive Key Search. Caesar Cipher (substitution technique).
E N D
CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques CPSC 3730
Fig 2.1 Model of Conventional Encryption CPSC 3730
Brute Force Attack/ Key Search Table 2.2 Average Time Required for Exhaustive Key Search CPSC 3730
Caesar Cipher (substitution technique) Replace each letter of the alphabet with the letter standing three places further down the alphabet. a --> D, b -->E, …, and so on plain: meet me after the party cipher: PHHW PH DIWHU WKH SDUWB CPSC 3730
Caesar Cipher (substitution technique) if we assign a numerical equivalent to each letter (a=0, b=1, …, z=25), the algorithm can be expressed as follows. For each plaintext letter p, the cipher letter c is c=E(p)=(p+3) mod (26) CPSC 3730
Caesar Cipher (substitution technique) Since a shift may be any amount, so the general Caesar algorithm is: c=Ek(p)=(p+k) mod (26) The decryption algorithm is: p=Dk(p)=(c-k) mod (26) Key (k) is the range from 1 to 25 CPSC 3730
English Letter Frequencies CPSC 3730
Row Transposition Ciphers • a more complex transposition • write letters of message out in rows over a specified number of columns • then reorder the columns according to some key before reading off the rows Key: 3 4 2 1 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ CPSC 3730
Row Transposition Ciphers 1 2 3 4 5 6 7 Key: 3 4 2 1 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ Column Permutation: 3 -> 1, 4->2, 2->3, 1-> 4, 5->5, 6->6, 7->7 CPSC 3730