Lecture 6: Classical Encryption Part 2 (polyalphabetic substitution ciphers, Vigenere cipher, other polyalphabetic ciphers, Hill cipher) Flashcards

1
Q

Define polyalphabetic substitution

A
  • Using multiple mappings from plaintext to ciphertext
  • Given d ciphertext alphabets C0, C1, … Cd-1, let fi: A→ Ci be a mapping from plaintext alphabet A to ith ciphertext alphabet Ci for 0 <= i <= d - 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the point of using multiple alphabets in polyalphabetic substitution

A

smooths frequency distribution → direct frequency analysis not effective

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are typical polyalphabetic ciphers?

A

periodic substitution ciphers based on period d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the encryption process for polyalphabetic ciphers?

A

Plaintext message M = M0 … Md-1Md … M2d-1Md …

encrypted to

E(K,M) = f0(M0)…fd-1(Md-1)f0(Md)…fd-1(M2d-1)f0(M2d)…,

where d ≡ 0 mod d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In terms of polyalphabetic ciphers’ encryption process, what is the special case?

A
When d = 1
Monoalphabetic cipher (simple substitution cipher)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Briefly outline the key generation process for a random polyalphabetic substitution cipher

A

1) select block length d

2) generate d random simple substitution tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Briefly outline the encryption process for a random polyalphabetic substitution cipher

A

encrypt ith char using substitution table number j s.t. i ≡ j (mod d)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Briefly outline the decryption process for a random polyalphabetic substitution cipher

A

using same substitution table as in encryption to reverse simple substitution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the example of the polyalphabetic substitution encryption in slide 8 of set 6.

A

TODO

let X be number of value
then X mod 3 ≡ Y

Cy is the value it corresponds to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Vigenere Ciphers based on?

A

shifted alphabets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the key K in the Vigenere Cipher?

A

seq of chars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you compute the amount of shift in the ith alphabet in the Vigenere Cipher?

A

For 0 <= i <= d-1, K gives amount of shift in ith alphabet, i.e. fi(M) = (M+Ki) mod n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain the example of the Vigenere Cipher on slide 10, set 6

A

Use a word as the period and repeat for each section of the message M.

Use the word’s char’s corresponding number as the shift amount for each ith char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How you can identify the period length during cryptanalysis of the Vigenere Cipher?

A

1) Kasiski method

2) CrypTool uses autocorrection to estimate period

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How you can attack separately d substitution tables during cryptanalysis of the Vigenere Cipher?

A

Each substitution is a shift (Caesar cipher) → if there is sufficient ciphertext then straightforward

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do you determine from cryptanalysis for Vigenere Cipher?

A

1) Identify period length

2) Attack separately d substitution tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the purpose of identifying the period using autocorrelation?

A

Method used to find period length d of any periodic polyalphabetic cipher

18
Q

Explain what identifying the period using autocorrelation is

A

Given ciphertext C, computing correlation between C and its shift Ci for all vals i of period

Plotting results on histogram and identifying period

19
Q

When do we see peaks in value Ci when doing period identification using autocorrelation for a periodic polyalphabetic cipher?

A

when i is multiple of period

20
Q

Explain the Kasiski method used in identifying period length d

A

1) note which sequences of letters appear multiple times
2. guage the number of chars that separate these pairs of strings
3. check common divsors of these numbers –> period is likely one of these common divisors

21
Q

Explain the crytanalysis example for polyalphabetic cipher on slides 13-15 in set 6

A

TODO - note sure about part 2

22
Q

Briefly outline the beaufort cipher

A

polyalphabetic cipher similar to Vignere cipher but using substitution fi(M) = (Ki - M) mod n

23
Q

Briefly outline the autokey cipher

A

polyalphabetic cipher starting off as Vigenere cipher but using plaintext to define subsequent alphabets once the alphabets defined by the key have been used → not periodic cipher as change key

24
Q

Briefly outline the running key cipher

A

polyalphabetic cipher using (practically) infinite set of alphabets from shared key → in practice, shared key is extract from book (book cipher)

25
Q

Briefly outline rotor machines’ purpose

A

electromechanical machines developed for encryption using rotors as moving alphabets

26
Q

What type of cipher is Hill cipher?

A

Polygram cipher (aka polygraphic cipher) → simple substitution cipher on extended alphabet consisting of multiple characters

27
Q

What is the major weakness of the Hill cipher?

A

linearity so known plaintext attacks are easy

28
Q

Briefly outline the encryption in the Hill cipher

A

Encryption involves multiply d x d matrix K by block of plaintext M → C = KM

linear transformation of d plaintext chars to get d ciphertext chars

29
Q

Briefly outline the decryption in the Hill cipher

A

Decryption involves multiplying matrix K^(-1) by block of ciphertext C → M = K^(-1)*C

linear transformation of d ciphertext chars to get d plaintext chars

30
Q

How are plaintext pairs represented in the Hill cipher?

A

Plaintext pairs written as col vector, letters encoded as numbers

31
Q

What do we do if there are insufficicent numbers to fill block?

A

Pad

32
Q

What is n in Hill cipher?

A

27 –> mod 27

33
Q

What should K*(K^(-1)) give for the Hill cipher?

A

identity matrix

34
Q

How is the size of a matrix written? What must be satisfied when multiplying matrices?

A

cols * # rows

inner values same

35
Q

Do the encryption and decryption example for the Hill cipher on slide 22 of set 6

A

TODO

36
Q

What attack is possible on Hill cipher?

A

Known plaintext attacks possible given d plaintext-ciphertext matching blocks → since linear function and need enough elements to solve eqn and get K

37
Q

How can you perform a known plaintext attack on the Hill cipher?

A

Given blocks (col vectors) Mi and Ci for 0 <= i <= d-1

C = [C0C1…Cd-1]
M = [M0M1…Md-1]
Solving C = KM for K
M = K-1C

38
Q

Explain the cryptanalysis example of the Hill cipher on slides 24-27 of set 6

A

TODO

39
Q

What attack follows from the known plaintext attack on Hill cipher?

A

ciphertext only attack

40
Q

What else needs to be done to do a ciphertext only attack on the Hill cipher, knowing that known plaintext attacks are possible?

A

extra task of finding probable blocks of matching plaintext-ciphertext