# Hill Cipher - Unknown plaintext attack, known key [duplicate]

I was wondering if I have the key and the encrypted Hill Cipher message(s). I can definitely figure out the charset involved. But the order is missing. Assuming that I use 37 modulo or higher. How would I go about cracking it?

-

## marked as duplicate by rath, e-sushi, Gilles, B-Con, MaeherOct 16 '13 at 6:54

Decrypt to a reasonable $n$ and then use the character frequencies to infer the language (and hence the modulo). Some trial and error may be required untill you get it right but for values of $n$ less than $2^{32}$ it shouldn't give you any practical problems on a desktop computer.