Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I know there are many ways to crack basic ciphers were each letter is mapped to

ID: 651759 • Letter: I

Question

I know there are many ways to crack basic ciphers were each letter is mapped to some other letter, but what ways are there to decode something that was encrypted using a cipher that changed after every letter, in a way that is based on the letter just coded?

For example, imagine using a Caesar cipher where the number of letters the alphabet was shifted over changes by n after every letter coded, where n is the position in the alphabet of the letter just encoded.

That would seem to null the efficacy of observing letter frequency, double letter patters, common short words, etc. How would a code like this be cracked?

Sorry, I might have been unclear. The Caesar cipher was just an example, but say that the positions shift over f(n) letters instead of just n, how would f(n) be determined?

Explanation / Answer

This is a variant of the Vigenere cipher, which is called autokey cipher most of the time.Your assumption, that frequency analysis is nullified is quite wrong. Bigram and trigram analysis still works, the basic principle is: The chances are relatively high, that both the key and the cipher belong to the most frequent bigrams or trigrams. Just because the key does not repeat does not mean, you can't find characteristics of natural language.

Ow, and like pretty much any classical cipher: A single known pair of plaintext & ciphertext fully breaks the system (reveals the key). In today's understanding this is really, really bad. But for toy encryption and practice, it is okay.