I will assume that anyone who entered already knows what an affine cipher is and also familiar with frequency analysis. Therefore, I'll just go straight into the subject.

There is a methode to decipher an affine code without knowing the keys(A and B), it's called "Known Plaintext Attack". It uses the fact that we know a segment of the plaintext and where it sites in the sentence/paragraph, therefore we use the letters indexes of the segment and their ciphers. My question is, can we do that using frequency analysis? i.e we don't have any segment of the plaintext, but we can use the very same method to figure out A and B.

For example we can cipher ESPAACE with the keys A=5 and B=7. The cipher obtained is: BTEHHRB.

According to frequency analysis, the most frequent letters in the cipher(in this case B and H) are the ciphers of the most frequents letters in latin alphabet(E and A) which is true in our case. Therefore, applying the "Known Plaintext Attack", we will obtain two equations:

{1=4A+B
{7=0
A+B

B=7 is true, the problem lies in A, why? When we transform the first equation we get:

A=4^-1(1-B)

the term 4^-1 means the inverse of 4 modulo 26. This inverse is IMPOSSIBLE because 4 and 26 aren't coprime.

Is this method not effective? Can it be improved or rather altered in a certain way?

8 years ago

Comment has been collapsed.

yes

8 years ago
Permalink

Comment has been collapsed.

I'm expecting a precised explanation, not just a yes. It's pleasant to know it can be done though!

8 years ago
Permalink

Comment has been collapsed.

Why do you keep making these kind of questions in a videogame forum¿?¿?

8 years ago
Permalink

Comment has been collapsed.

Because it's fun :D

8 years ago
Permalink

Comment has been collapsed.

But maybe you won't get the answers you expected fo find :/

8 years ago
Permalink

Comment has been collapsed.

Or maybe I don't expect any answers, just participation as I already know the answer.

8 years ago
Permalink

Comment has been collapsed.

Closed 7 years ago by Meetrock.