Cindex.py
implements a method for calculating the Index of Coincidence (I.C) of Cryptotext for the Vignere cipher of different key lengths
The purpose of this attack is to determine the most likely key length.
The formula to calculate I.C is shown below:
- where f_i is the absolute frequency of each letter of the alphabet
- N is the total length of the cryptotext
- k is the number letters in the alphabet in question.
We want to generate sequences of cryptotext letters which were encrypted by the same
for key lengths (n) =
1: We calculate I.C value for 1 sequence (The Whole cryptotext)
2: We want to 2 sequences with letters encrypted by the same
. . . .
n: We want to n sequences with letters encrypted by the same
FreqAnalysis.py
performs a frequency attack on the Shift and multiplicative cipher.