4 Comments - Last post 11 minutes ago by ArtemB1988
82 Comments - Last post 19 minutes ago by GarlicToast
71 Comments - Last post 1 hour ago by LighteningOne
149 Comments - Last post 3 hours ago by mikotomaki
145 Comments - Last post 4 hours ago by seaman
253 Comments - Last post 5 hours ago by Bum8ara5h
46 Comments - Last post 7 hours ago by MeguminShiro
28,635 Comments - Last post 2 minutes ago by kolja300314
757 Comments - Last post 9 minutes ago by Nobodynone
2,432 Comments - Last post 11 minutes ago by Specter360
8,140 Comments - Last post 14 minutes ago by ThePonz
71 Comments - Last post 16 minutes ago by ConanOLion
39 Comments - Last post 18 minutes ago by DogOnSG
111 Comments - Last post 20 minutes ago by CakeGremlin
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.