An artificial neural network approach to finding the key length of the Vigenère cipher
Christian Millichap, Yeeka Yau
TL;DR
The paper tackles the longstanding problem of predicting the key length in Vigenère ciphers. It introduces a feedforward neural network that integrates features from classical attacks (Babbage--Kasiski, index of coincidence) and twist-based algorithms (twist, twist+, twist++) to jointly predict the key length. Empirical results show the final model achieving up to $89.2\%$ test accuracy on ciphertexts of length $200$–$500$, outperforming individual methods, with especially strong performance when the text length to key length ratio is large. The work demonstrates that combining diverse cryptanalytic signals through neural networks can yield robust, high-accuracy key-length predictions and highlights the continued value of integrating classical and modern techniques in cryptanalysis.
Abstract
In this article, we create an artificial neural network (ANN) that combines both classical and modern techniques for determining the key length of a Vigenère cipher. We provide experimental evidence supporting the accuracy of our model for a wide range of parameters. We also discuss the creation and features of this ANN along with a comparative analysis between our ANN, the index of coincidence, and the twist-based algorithms.
