Hill cipher decryption tool
Regularly the database is updated and new ciphers are added which allows to refine the results. At the input layer there are the coded messages (with ngrams), and at the output layer the different types of known and referenced ciphers on dCode. The program is based on a neural network type architecture, more precisely a multilayer perceptron (MLP). The encryption used is very rare: dCode can detect nearly 200 different ciphers and continues to improve thanks to your feedback and messages, but it is not impossible that some ciphers are still unknown/missing.
Identification is, in essence, difficult. The encryption used is recent: modern cryptography techniques are such that it is impossible to recognize an encrypted message from a random message, it is moreover a quality of a good encryption. The message is over-encrypted: several successive encodings / ciphers have been applied, the over-encryption tends to mask the characteristic signatures of the original encryption. Furthermore, nearly all messages can be stored in binary, identifying the encryption precisely is difficult. The message has a low entropy: it is composed of few distinct characters (a binary message containing only 0s and 1s has a low entropy). The possibilities become very numerous without a way to precisely identify the encryption. The message is too short: a message containing not enough characters does not allow a good frequency analysis to be performed.
The first paramater is plaintext, second is ciphertext of p/c pair, and the third paramater is the cipher text you wish to decode.Sometimes the cipher identifier finds little or no relevant result, several reasons are possible: Total.py is the automated decoder it tries all possible keys of all possible lengths given the restrictions of the p/c pair length. enc.py will also check to make sure that your key can be used to decipher and warn you if it cannot.ĭec.py is made for quick decoding: the first paramater is the path to the ciphertext, and the second paramater is the path to the key (cPickle'd numpy array format- what anal.py produces). The key must be supplied in a text file as a string of numbers seperated by spaces. Individual CommandsĪnal.py takes 3 paramaters: the first is the plaintext of the plaintext/ciphertext (p/c) pair, the second is the ciphertext of the p/c pair, and the third is the suspected key length.įor greater control, anal.py's global variable MKEY_LENGTH can be manually edited to return a greater or smaller number of possible keys.Įnc.py is for quick encoding & key creation the first argument is the thing to encode, second is the key to use, third is where to save enciphered text, and fourth is where to save dec.py compatible key. Python total.py plaintext.txt ciphertext.txt to-decode.txtĪnd it will do its thing.