2 Classical Encryption
2 Classical Encryption
Basic terminology
Plaintext: original message to be encrypted Ciphertext: the encrypted message
Deciphering or decryption: recovering plaintext from ciphertext Decryption algorithm: performs decryption
Two inputs: ciphertext and secret key
Cipher or cryptographic system : a scheme for encryption and decryption Cryptography: science of studying ciphers
Cryptanalysis: science of studying attacks against cryptographic systems Cryptology: cryptography + cryptanalysis
Ciphers
Symmetric cipher: same key used for encryption and decryption
Block cipher: encrypts a block of plaintext at a time (typically 64 or 128 bits) Stream cipher: encrypts data one bit or one byte at a time
Symmetric Encryption
or conventional / secret-key / single-key sender and recipient share a common key all classical encryption algorithms are symmetric The only type of ciphers prior to the invention of asymmetric-key ciphers in 1970s by far most widely used
7
Cryptanalysis
Objective: to recover the plaintext of a ciphertext or, more typically, to recover the secret key. Kerkhoffs principle: the adversary knows all details about a cryptosystem except the secret key. Two general approaches:
brute-force attack non-brute-force attack (cryptanalytic attack)
8
Classical Ciphers
Plaintext is viewed as a sequence of elements (e.g., bits or characters) Substitution cipher: replacing each element of the plaintext with another element. Transposition (or permutation) cipher: rearranging the order of the elements of the plaintext. Product cipher: using multiple stages of substitutions and transpositions
9
Caesar Cipher
Earliest known substitution cipher Invented by Julius Caesar Each letter is replaced by the letter three positions further down the alphabet.
Plain: 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 Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
10
11
Playfair Cipher
Not even the large number of keys in a monoalphabetic cipher provides security.
One approach to improving security is to encrypt multiple letters at a time. The Playfair Cipher is the best known such cipher.
Invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair.
13