Does anyone know of an efficient way of breaking a modified Caesar cipher (where the key is a set of numbers (the amount of shift) that is repeated throughout the plaintext, e.g. {1,2,3,4,5}) via brute-force?
The way I'm currently trying to crack it is as follows:
- Generate all possible key combinations ( 5 numbers between 1 & 25)
- Use the generated key to "decipher" the message
- Use frequency analysis on deciphered messages to see which one is the best fit
As you can probably guess, the way I've come up with is the least efficient (in terms of time and memory) and I was wondering what would be the best way to decipher the message.