A Machine Learning Approach for Decoding Criminal Cryptography
Keywords:
Cryptanalysis; Cipher identification; Digital forensics; Machine learning; Index of coincidence; BiGRU; Feature fusion; Open-set recognition; Simulated annealing; Law enforcement.Abstract
Criminal communications increasingly rely on custom, obfuscated or hybrid encryption schemes to evade
detection, and manual cipher identification by forensic analysts does not scale to the volume of intercepted digital
evidence in modern investigations. Existing cryptanalysis tools are largely limited to classical substitution or
transposition ciphers and offer little support for identifying the varied cipher types encountered in real casework.
This paper presents Cipher Scan, a machine-learning framework that automatically classifies the type of cipher
used in a suspect ciphertext and assists investigators in decoding it. A triage stage first separates plaintext,
encoded, compressed and encrypted data. A 72-dimensional statistical feature vector — including entropy, index
of coincidence, chi-square, periodic and n-gram statistics, and byte-level structural features — is combined with
a character-level CNN–BiGRU–attention network through weighted late fusion, and an open-set rejection step
flags unknown or custom schemes rather than forcing a wrong label. For supported classical and custom ciphers,
a decoding-assistance engine applies key-space search, period estimation and simulated-annealing hill-climbing
guided by quadgram fitness; for strong modern ciphers, it reports structural properties only. Every case produces
a forensic report with evidence hashes and confidence scores. On a dataset of 15 classical and hybrid cipher
types, the hybrid model is expected to achieve 90.4% accuracy, rising to 98.5% for 500-character ciphertexts,
with decoding success above 90% for most supported ciphers










