I need to identify the encryption algorithm used to encrypt some files. I have the key, but I can't decrypt it using OpenSSL, because I don't know what algorithm was used to encrypt it. Is there any way to identify these files' encryption algorithm?

  • So, it's not possible !! – Mohamed Shibo Jul 2 '15 at 1:59
  • Unless there is metadata in the file headers that gives this information, then no, you don't know what was used. – schroeder Jul 2 '15 at 5:07

You can identify:

a) metadata embedded in the encrypted file by many encryption tools - including algorithm name and mode

b) several old, weak encryption algorithms (so weak, that it's possible to detect them by patterns or by statistic analysis in encrypted file - for example Caesar Cipher, but also many more algorithms used in 20th century even for military purposes)

c) what algorithms were possibly/impossibly used to encrypt the data, based on the encryption key structure (sizes of individual parts of the key, or simply metadata embedded in the key file)

Unfortunately that's all.

If you have "raw" encrypted file, without any headers, then you can try to analyze the internal key structure, and then try to decrypt the file using all algorithms that use decryption key with the same sizes of individual parts.

However, it's also possible, that your encryption key is not "raw" but just an input data to some transformation, eg. PBKDF2. If so, it might be impossible to decrypt your encrypted file without knowing all details about used encryption mode.

| improve this answer | |
  • Caesar Cipher is indeed a very old one! :-) – user69377 Aug 1 '15 at 7:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.