The Vigenère cipher is a type of encryption method for alphabetic text that involves a series of Caesar shift ciphers .
To encrypt a plaintext message such as
ILOVEBRILLIANT
with the Vigenère cipher, we perform these steps:
MATH
.
MATHMATHMATHMA
.
A
to the corresponding letter in the key message. For example, the first letter
I
of the original message becomes
U
in the encoded message, because we performed the Caesar shift
A -> M
on it. The second letter
L
is unchanged because
A -> A
does nothing.
ULHCQBKPXLBHZT
.
The following text has been encrypted with the Vigenère cipher. What is the length of the key? Input if you think the length of the key cannot be determined.
uyqcemeavpstghsjibppvcutzkvvwcamhqgucfvxizzepmnpacfvxpatamhqguofd
Hint: This problem is not meant to be solved by programming!
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There is an easily seen repetition... uyqcemeavpstghsjibppvcutzkvvwcamhqgu cfvx izzepmnpa cfvx patamhqguofd
The distance between the repetitions of cfvx is 13
So, the length of the key could only be 13 or 1 and I went for 13 ;-)
EDIT : cracking the code
Firstly I subtracted the first 13 letters (concatenated 5 times) of the cipher text from the cipher text: In this way we get rid of the key but also we encrypt the cipher text using its 13 first letters as new key
u y q c e m e a v p s t g h s j i b p p v c u t z k v v w c a m h q g u c f v x i z z e p m n p a c f v x p a t a m h q g u o f d − u y q c e m e a v p s t g u y q c e m e a v p s t g u y q c e m e a v p s t g u y q c e m e a v p s t g u y q c e m e a v p s t g and got
a a a a a a a a a a a a a n u t g x d l v h f b g e b x g a w a d q l f k m p d k j x a d i n u l k m p d r k r w a d q l f w m x
I knew that those were the 13 groups of 5 letters each but I needed to find the right shift for every group
then I thought to use "brilliant" as the first word and... bingo!
here is the secret message
b r i l l i a n t i s c o o l b r i l l i a n t i s c o o l h i d d e n c o d e b r i l l i a n t c o d e i s c h i d d e n o o l
and the original key (that we didn't use) is t h i r t e e n c h a r s