# Relative security of this polyalphabetic cipher system?

A friend described this cipher to me the other day, but if it has an official name, I'm unaware of it. The same 26 cipher alphabets that are used in the Vigenère cipher are used here, but rather than using a code word to determine which alphabet is used for a given character, the previous characters of the plaintext are used. The numerical value of every letter which comes before a given letter (a=1, b=2 etc) is added - for example, if the first letter of plaintext is H, then the 8th alphabet is used to encrypt the second letter. If the first five letters of plaintext are HELLO, then the 26th alphabet is used to encrypt the sixth letter (8+5+12+12+15 = 52, 52-26 = 26). A randomly chosen alphabet, agreed upon by sender and receiver, is used to encrypt the first letter. How secure is this? Just relative to other polyalphabetic ciphers, like Vigenère, not modern encryption methods, which I know are arbitrarily more secure.

• This sounds a lot like the autokey cipher en.wikipedia.org/wiki/Autokey_cipher However, your cipher can be broken by simply bruteforcing the 26 possible first letters (even by hand) and then checking which plaintext makes sence, so the cipher is really insecure. – VincBreaker Aug 24 '17 at 19:59
• Actually, it sounds like there is no key at all. That means it is not a cipher, similar to ROT13, and has no security at all. – tylo Aug 25 '17 at 9:36

The system as proposed by him, use a keyword $K$ of length $n$ for the first $n$ letters of a text, and then used the plaintext (from the start onwards) as the key for the rest. (it'a a "plain-autokey" cipher). He did not repeat the keyword, which is a somewhat weaker system, which is how his cipher is often represented nowadays.