Substitution ciphers Flashcards

1
Q

What is a substitution cipher?

A
  1. A substitution cipher is one in which the letters of plaintext are replaced by other letters or by numbers or symbols.
  2. If the plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the Caesar cipher?

A
  1. each plaintext character is replaced by character 3 to the right modulo 26.
  2. For example, A in plaintext replaced with D in ciphertext.
  3. Give each letter in the plaintext a number from 0 to 25 so, C = E(3, P) = (P + 3) mod 26
  4. In general, for K ∈ {1, . . . , 25}:
    C = E(K, P) = (P + K) mod 26
    P = D(K, C) = (C − K) mod 26
  5. modulo 26 is used because from 0 to 25 there are 26 numbers - wrap around after 26.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is ROT13?

A
  1. shift each letter in the plaintext by 13 places to obtain the ciphertext.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is alpha-numeric?

A
  1. substitute numbers for letters - if the plaintext is of letters - label alphabets from 0 -> 25 and substitute each alphabet with a number to obtain ciphertext.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is brute-force cryptanalysis possible for current Caesar cipher? why is it still easy to decrypt?

A

Three reasons making the attack possible:
1. The encryption and decryption algorithms are known.

  1. There are only 25 keys to try.
  2. The language of the plaintext is known and is easily recognisable.

BUT if the language of plaintext is unknown, then output may not be recognizable AND there could also be two possible sensible plaintexts in two different languages.

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

What makes a brute-force attack impractical?

A
  1. use an algorithm that uses a large number of keys such as DES - 168 bit key (2^168) possible keys.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the mono-alphabetic substitution cipher?

A
  1. Generalises the Caesar cipher by allowing arbitrary substitutions via permutation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is permutation?

A
  1. Permutation of a finite set S of elements: an ordered sequence of all elements of S, each element appearing exactly once.
    For example: 6 permutations of S = {a, b, c}: abc, acb, bac, bca, cab, cba.
  2. In general: n! permutations of a set of n elements
  3. For the caesar cipher, there are 26 elements so, 26! permutations/possible keys.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the mathematic definition of monoalphabetic suubstitution ciphers?

A
  1. K be the set of all permutations on the alphabet A.
  2. Define for each e ∈ K an encryption transformation Ee on strings m = m1 m2 · · ·mn ∈ M as
    Ee(m) = e(m1) e(m2)· · · e(mn) = c1 c2 · · · cn = c (encrypting each letter m to obtain c)
  3. To decrypt c, compute the inverse permutation
    d = e^−1 and compute Dd(c) = d(c1) d(c2)· · · d(cn) = m
  4. Ee is a mono-alphabetic substitution cipher.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the security of mono-alphabetic ciphers?

A
  1. Easy to crack using frequency-analysis as the structure is preserved.
  2. If the plaintext has a lot of “e” -> the ciphertext would have a lot of the same alphabet that corresponds to e in the plaintext.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly