Lecture 2 - Classical Encryption Techniques Flashcards
What are Classical Encryption Techniques?
- Recall: secret key ciphers use a secret key for encryption
- Almost all secret key ciphers (no matter how complicated) are essentially a combination of two simple techniques:
-
Substitution: replace characters of plaintext by other characters
- Example: Rot-n (also called Caesar cipher), which replaces each letter with a letter n positions down the alphabet
- Transposition: permuting order of the plaintext characters
Give an example of a Monoalphabetic cipher?
- Recall Rot-n: shift letters n positions
- Rot-n is easy to break
- The search space is small (only 25 possible key values)
- Each letter shifted by the same fixed amount
- 26 Possible different substitutions
What is a weekness of Monoalphabetic ciphers?
- Weakness of monoalphabetic ciphers: letter frequency remains
- In normal English, different letters have different frequencies
- If you are the attacker and check that “q” ~ 13% in the ciphertext, what would you guess?
- Given enough ciphertext, these statistics can aid cryptanalysis
- Ways to lessen the survival of plaintext structures
- Encrypts a letter into a number of ciphertext symbols
- Encrypts multiple letters of plaintext as a unit
- Use multiple cipher alphabets
What is a Polyalphabetic Cipher and give an example of one?
- Polyalphabetic cipher
- A set of monoalphabetic ciphers is used
- Some rule determines which to be applied to a particular position
-
Vigenère cipher: generalize the rotate cipher by shifting different plaintext letters by different amounts
- Shift amount determined by the letter in the key (a: shift 0, b: shift 1, …, z: shift 25)
- Repeat the key if necessary
Weakness of Vigenère - How to decrypt & how to break Vigenère?
- How to decrypt?
- Reverse process of encryption
- How to break Vigenère?
- Observation: Repeated plaintext patterns separated by integer multiples of key length results in repeated ciphertext patterns
Weakness of Vigenère - What are the 3 steps in breaking Vigenère?
1) Attacker looks for repeated ciphertext patterns and guess key length
2) If (say) key length = 9, the 1st, 10th, 19th, … letter is encrypted using same key letter
3) The problem reduces to solving a number of monoalphabetic ciphers
- Break each such monoalphabetic cipher as before
- Combine results
What is an Autokey Version of Vigenère?
- The idea of appending plaintext as a key
- However still there are statistical relationships remaining
What is One Time Pad?
- Use a truly random key that is as long as the message
- An unconditionally secure type of cipher
- A brute force attack will fail: you will decrypt into many possible plaintexts
- There is no way to distinguish which is the correct plaintext
Why is a One Time Pad Unconditionally Secure?
- There are no statistical relationship between plaintext and ciphertext
- The ciphertext contains no information about the plaintext
- In fact, there is always a key to decrypt into whatever plaintext you want
- However, usually not feasible in practice
- Need huge amount of random numbers
- How to securely distribute the secret key, which is as long as the message?
What is Transposition Ciphers?
- Change ordering of letters
- Example: writing letters in columns (“rail fence”)
- Better to have permuting columns
- Using key e.g. 2413
- How to decrypt?
- Easy to cryptanalyze (frequencies unchanged)
- Can combine with substitution ciphers