How to solve: WARNING : deprecated key derivation used. Using -iter or -pbkdf2 would be better

encryptionopenssl

I am using OpenSSL version 1.1.1b (26 Feb 2019) to encrypt/decrypt files.

Everything is working fine but I am getting a Warning I do not understand.

openssl enc -d -aes-256-cbc -a -pass pass:$pwd -in $file

*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.

Can anyone explain to me what is it about and how to solve it?

Best Answer

The file was probably encrypted by LibreSSL (using Mac?) and you are decrypting it with OpenSSL (Linux).

You don't face this problem if you encrypt and decrypt using LibreSSL for both.