I have a piece of encrypted text and the clear text. Do any open source tools (with sourcecode) exist that can help determine the type of cipher and the key? (Operating system or language is irrelevant.)

  • Is this some “pen-and-paper” cipher from before the computer era? Or a modern algorithm (in which case you will not find the key unless it was derived from a weak password)? In what context did you get this text? Do you have a single (ciphertext, cleartext) pair or many? Can you get more? How long are they? Aug 11, 2015 at 15:58

2 Answers 2


Detection and identification

While it is possible to identify a cryptographic algorithm by way of cipher bit sequences, you should know that it can be difficult and (more important) reverse-engineering protection mechanisms like encryption may be illegal in your country.

Assuming your country does not uphold any related restrictions, and depending the individual data available to you, one or more of the following open-source tools may or may not be appropriate:

Tip: Check for classic cipher algorithms first!

It may very well be that you are looking at the output of one of the classic cryptographic algorithms. Therefore, my personal tip would be to start out by trying to check if you’re dealing with ciphertext from a simple transposition cipher, or something smarter. See, simple transposition ciphers are easier to analyze and (if not applicable) to exclude. Analyzing for potential monogram frequencies can provide good hints and tools like this online calculator combined with tables like this one may already suffice.


As crypto algorithm identification is part of cryptanalysis and a very broad area, you might also want to read papers like “Block cipher identification using support vector classification and regression” which may help understand why it can be difficult and (in a worst case scenario) offer endless options.


I have tried password crackers like Hashcat in the past. Hashcat can perform an educated guess based on the length and format of the hash. You may also find their hash format table of use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy