Welcome Guest [Log In] [Register]
Welcome to Crypto. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Hill Cipher
Topic Started: Nov 29 2005, 02:10 AM (1,563 Views)
rot13
Elite member
[ *  *  *  *  * ]
Have you guys been following the cipher challenge that cows first told us about? It has been an interesting challenge. Part B of challenge 7 is a 3x3 Hill Cipher.

I had never attacked one of these before, so I thought I'd tackle it. Stop reading now if you want to go off and try it yourself first.

My basic attack is to try all 17576 possible combinations for each row in the matrix. For the cipher challenge, I first took advantage of the fact that the Russians always start their messages with "COMRADES". For the first row in the matrix, I looked for combinations that would yield C for the first block and R for the second. There were quite a few. I then did a frequency analysis of the decrypted values for the first character in each of the rest of the blocks and found the row that produced characters that correlated most closely with English. I repeated this procedure for the next two rows.

A little while later, it occurred to me that I don't need any probable text at all. I try all 17576 row combinations for a row value. The decryption matrix has 3 rows, but they are independent of each other. I reasoned that it was likely that the 3 rows that scored the highest in the correlation with English were probably the 3 rows of the decryption matrix. Once I had my top 3 rows, all I needed to do was find out the relative positions of the rows in the matrix. I just looped through all 6 permutations of 3 rows looking for the one that produces trigraphs that correlate most closely with English, and sure enough, I got back the correct plaintext.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · General · Next Topic »
Add Reply