Solving Vigenère encryption.
- Install
python3. - Install the following libraries:
re,colorama,collections,functools. - Run
main.py.
-
Suppose length of key is k. Calculate Index-of-coincidence (IC) for groups of interval k.
---> Key length.
-
With known key length k, we find character or group of characters that have the highest occurrence. One of them should be letter e.
-
From that groups of characters, we construct all possible keys.
-
Then apply some filter methods to get most likely key:
- Calculate IC in text decrypted by a key.
- Detect sequence of English words in text decrypted by a key.
- Vote for which character should be used based on majority vote.
- Take a random one.
- Reduce to minimum key.
- Improve method to get key length
- Add words to wordlist
- Syntax analysis
- Optimize with less for-loops
- Implement algorithms in a faster language (ex: Go, C, Java)