Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) A ciphertext has been generated with an affine cipher, which is defined as f

ID: 3669470 • Letter: #

Question

(a) A ciphertext has been generated with an affine cipher, which is defined as follows:
C = (a × P + b) mod 26
where C = ciphertext, P = plaintext, a & b are the key
Adversary has the following knowledge: the most frequent letter of the ciphertext is sum of characters
in your first name module 26, and the second most frequent letter of the ciphertext is sum of
characters in your last name module 26. Break this cipher. If it is not breakable, provide an
appropriate justification.
(b) If the cipher is redefined as follows:
C = (a × b + P) mod 26
where C, P, a & b are as defined before, and adversary has the same knowledge as before, discuss
with appropriate justification whether or not this new cipher is breakable.

Explanation / Answer

Recall that the affine transformation cipher encodes the plaintext as

CaP+b(mod 26)

where

Pis a plaintext letter and

Cis the resulting ciphertext letter. To decrypt, we solve for

Pto get

Pa(Cb) (mod 26)Here

a is the inverse of a modulo 26.

For a= 7, it is not hard to see by inspection that

a = 15, so the decryption formula is P15(C10) (mod 26)

code is

unbreakable

if having the ciphertext of a message encrypted with such a code gives no more

information about the original message than if the ciphertext was not present.

(b) One-time pad is a Vigen`ere cipher where the codeword is as long as the message, is randomly chosen,

and is discarded upon decryption.

(c) Since the codeword is random and as long as the plaintext, any sensible statement in English of that

length is a possible plaintext. Ciphertext itself therefore does not help in decryption.

(d) One-time pad is impractical because the distribution of the codewords is sometimes physically impos-

sible and is usually expensive. It is still used in the direct White House-Kremlin phone line, nuclear

launch codes, etc