Is it possible to know in which method a file was encrypted?

604 Views Asked by At

I'm trying to get this file:

Https://mmg-fna.whatsapp.net/d/f/AnYg9tpOOhcsIPJJmd8vPYSK9sh_IkOGdw44XmT1swMz.enc

And decrypts, but I do not know how or which method it was encrypted.

I tried using the command below, but I do not know if I am using the right method "aes-256-cbc", or if the password is incorrect.

openssl enc -d -aes-256-cbc -in file.enc -out file.jpg
1

There are 1 best solutions below

0
On BEST ANSWER

Is it possible to know in which method a file was encrypted?

If encryption was applied "properly", then NO, it is not possible to know. That's called semantic security and its a very desirable property. Effectively it means an attacker gains no advantage over space and time; and all messages look random.

I had to quote "properly" because semantic security may not be a security goal or a requirement of the program. Most folks cobbling together a system don't think about it, so many systems lack semantic security.


Regarding the WhatsApp tag, you might be interested in Which Cryptography algorithm is used in WhatsApp end-to-end security? on the Security Stack Exchange.