40 Comments - Last post 30 minutes ago by devotee
8 Comments - Last post 51 minutes ago by BargainSeeker
109 Comments - Last post 2 hours ago by LoGic17
192 Comments - Last post 3 hours ago by pb1
1,276 Comments - Last post 3 hours ago by FranckCastle
1,473 Comments - Last post 7 hours ago by devotee
108 Comments - Last post 8 hours ago by MeguminShiro
401 Comments - Last post 7 minutes ago by Xiangming
48 Comments - Last post 1 hour ago by Filipousis
7,677 Comments - Last post 1 hour ago by vigaristti
5 Comments - Last post 1 hour ago by OmegaRozenkreuz
245 Comments - Last post 2 hours ago by Utamy
2 Comments - Last post 3 hours ago by DeadKanekiNote
579 Comments - Last post 3 hours ago by DeadKanekiNote
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.