CRYPTOLOGY CRYPTOGRAPHY KEY MANAGEMENT CRYPTANALYSIS Cryptanalytic Brute-Force Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext 58
Types of Cryptographic Private key (Symmetric) Public key (Asymmetric) Hash functions 59
CRYPTOGRAPHY Private Key (Secret Key) Symmetric Public Key Asymmetric Hash Function 60
Symmetric Cipher Model 61
Symmetric Cipher Model 62
Secret Key Cryptography (SKC) plaintext encryption ciphertext ciphertext key decryption plaintext Using a single key for encryption/decryption. The plaintext and the ciphertext having the same size. Also called symmetric key cryptography 63
SKC: Security Uses Transmitting over an insecure channel The transmitted message is encrypted by the sender and can be decrypted by the receiver, with the same key Prevent attackers from eavesdropping Secure storage on insecure media Data is encrypted before being stored somewhere Only the entities knowing the key can decrypt it 64
SKC: Security Uses Authentication Strong authentication: proving knowledge of a secret without revealing it. Alice challenge r A Bob response r A encrypted with K A,B r B r B encrypted with K A,B 65
SKC: Security Uses Integrity Check Noncryptographic checksum Using a well-known algorithm to map a message (of arbitrary length) to a fixed-length checksum Protecting against accidental corruption of a message Example: CRC Cryptographic checksum A well-know algorithm Given a key and a message The algorithm produces a fixed-length message authentication code (MAC) that is sent with the message 66
Classic ciphers substitution ciphers monoalphabetic ciphers polyalphabetic ciphers transposition (permutation) ciphers product ciphers using both substitution, and transposition 67
Classical Cryptography Monoalphabetic Ciphers Once a key is chosen, each alphabetic character of a plaintext is mapped onto a unique alphabetic character of a ciphertext. The Substitution Cipher (Caesar Cipher) 68
The Caesar cipher The Caesar cipher is a substitution cipher, named after Julius Caesar. Operation principle: each letter is translated into the letter a fixed number of positions after it in the alphabet table. the fixed number of positions is a key both for encryption and decryption. 69
The Caesar cipher Outer: plaintext Inner: ciphertext 70
The Caesar cipher K=3 71
Caesar Cipher Mathematically, map letters to numbers: a, b, c,..., x, y, z 0, 1, 2,..., 23, 24, 25 Then the general Caesar cipher is: c = E K (p) = (p + k) mod 26 p = D K (c) = (c k) mod 26 Can be generalized with any alphabet. 72
Classical Cryptography Polyalphabetic Ciphers Each alphabetic character of a plaintext can be mapped onto m alphabetic characters of a ciphertext. Usually m is related to the encryption key. The Vigenère Cipher The Permutation Cipher 73
Substitution Cipher For each letter, substitute some other letter(randomly) A key determines what the substitution is E.g., 4, 8, 1, 26,... 1 st letter in the alphabet will be represented by the 4 th letter A D 2 nd letter will be represented by the 8 th B H 3 rd letter will be represented by the 1 st C A 4 th letter will be represented by the 26 th D Z 74
Example of Vigenère Cipher Keyword: deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ 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 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 75
Long Random Number Sequences Vernam Cipher A one-time Pad Cipher Use Numbers Mod 26 to represent Letters Use A two-digit Random Numbers Add the two numbers and take Mod 26 76
Vernam Cipher Example 77
Transpositions (Permutations) 78
Row Transposition Ciphers Plaintext is written row by row in a rectangle. Ciphertext: write out the columns in an order specified by a key. Key: 3 4 2 1 5 6 7 Plaintext: Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ 79 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
Product Ciphers Uses a sequence of substitutions and transpositions Harder to break than just substitutions or transpositions ADFGVX Product Cipher This is a bridge from classical to modern ciphers. 80