# How can I break a Vigenère cipher with partial plain text?

I have an exercise to do regarding Vigenère encryption.

I've got the cipher text: WNZTNVIEEGTJYKRRWYUELWNZTNV
and a partial plain text: S''''R''R''''R''''PASS'''''

The key length is unknown.

The question is: is it possible to find the key and the plain text? Regarding what I've seen in class, I don't think it's possible.

But I was wondering if it was possible in some way with a computer to find the rest of the plain text and the key?

PS: neither the plain text or the key are in English.

-
You have a got a massive crib there in "PASS". Did you try plugging in various possible plaintexts, like "password", "passport", "passing", etc... (in other languages, since English is not an option)? Then retrieve part of the key where you know the ciphertext and guessed the plaintext, you might get enough of the key to guess the rest (if it's a meaningful key like a word). –  Thomas Nov 11 '12 at 9:26
@Thomas: The PASS is kind of a red herring in this case, though; it's not actually all part of the same word. –  Ilmari Karonen Dec 9 '12 at 8:54

## 2 Answers

First guess the key length(Just try every plausible length, there aren't many).

Then for each position where you know both plain- and ciphertext, calculate the key char. If you get a contradiction, the guessed key length was wrong. If the key length is short enough compared to the number of known pairs this will probably give you a large part of the key.

-
Thanks for your help, I'm really close to it. I've got almost all of the key which is hopefully : 4-13-?-?-5-4-19. The pattern seems correct but I don't find real words nor for the key or the plain text which has a few holes. Maybe it's not possible to build correct words so it's not "possible" to decrypt the cipher text. –  Pierre Nov 2 '12 at 18:06
@Pierre: Just decode as much of the plaintext as you can and try guessing what the first word might be. (Also, the key itself is a meaningful phrase, too.) –  Ilmari Karonen Nov 2 '12 at 18:48

Strange...

WNZTNV is repeated...
If i'm counting correct on position 1-6 and 22-27.
My guess would be the key length is a divider of 21? 7 seems to be consistent with the other information, but my knowledge of foreign languages is close to none, so i don't recognize anything readable in key or plaintext...

key DM''DDS of EN''EET (depending on your definition...) plain something like: SA''JRPAR''FURNE''PASS''JR

maybe too obvious?

-
Good observation about the repeat. Your guess at the partial key is close, too, although one of the letters is off by one. Anyway, I'm kind of trying not to reveal too much of the solution, since it's pretty obvious (from the plaintext!) that it was meant as a challenge to be worked out by the student. –  Ilmari Karonen Dec 9 '12 at 8:52