# How do I find the key of the Vigenere cipher is if I already know the key length?

Hi I am stuck in trying to crack the code of finding the key to decrypt a huge message. I have the frequencies of the letters:

A 121
B 0
C 10
D 60
E 39
F 100
G 123
H 19
I 0
J 74
K 87
L 119
M 35
N 8
O 30
P 2
Q 27
R 0
S 135
T 26
U 47
V 47
W 140
X 24
Y 29
Z 78
A 121
B 0
C 10
D 60
E 39
F 100
G 123
H 19
I 0
J 74
K 87
L 119
M 35
N 8
O 30
P 2
Q 27
R 0
S 135
T 26
U 47
V 47
W 140
X 24
Y 29
Z 78


So far I figured out that the first letter is an "S" since W = 22 so 22-4 = 18 which is "S"

## 1 Answer

If you know the key length of a Vigenere cipher, you should group the letters in the given huge message by each of the key letters, then compute the frequencies for each group separately. If I understand right, you are doing a total frequency analysis, which is of no use.

• If it's any consolation, that trick is famous now because people have learned it from people who've learned it from people, but for hundreds of years, Vigenere was popularly considered to be completely uncrackable because so few people thought of that on their own :) – Simpson17866 May 22 '18 at 20:05