220 Comments - Last post 18 minutes ago by Guard1aNRB
16,555 Comments - Last post 23 minutes ago by Masafor
14 Comments - Last post 2 hours ago by Akylen
47,280 Comments - Last post 2 hours ago by Wolterhon
26 Comments - Last post 4 hours ago by Tinfricchiu
2,267 Comments - Last post 5 hours ago by MeguminShiro
111 Comments - Last post 6 hours ago by Gamy7
27 Comments - Last post 1 second ago by wigglenose
90 Comments - Last post 17 minutes ago by sonatamyasa
14 Comments - Last post 20 minutes ago by Carenard
29,198 Comments - Last post 34 minutes ago by Lakraj1209
54 Comments - Last post 59 minutes ago by Icepick87
125 Comments - Last post 59 minutes ago by WaxWorm
55 Comments - Last post 1 hour ago by Garcias
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=0A+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?
Comment has been collapsed.