OpenSSL – digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:

So, the time has come to retrieve data from your encrypted files / backups but…. OpenSSL throws the following error while you are trying to decrypt your file.

digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:

Don’t panic just yet! OpenSSL has probably been updated since you originally encrypted your files so your file may very well have been encrypted using an older version. You just need to decrypt them with an extra command line argument added -md mda5.

example 1, the following used to work but now throws the digital envelope routines:EVP_DecryptFinal_ex:bad decrypt: error

openssl aes-256-cbc -d -a -in SQL.tgz.enc -out SQL.tgz

example 2, with -md md5 now added the decryption works perfectly! Phew!

openssl aes-256-cbc -md md5 -d -a -in SQL.tgz.enc -out SQL.tgz
Print Friendly, PDF & Email

More Like This


Categories


Linux Security

Tags


  • Post a comment