You are not logged in.

#1 2017-05-04 16:55:33

vitaliy.kuzmich
Member
Registered: 2015-11-29
Posts: 64

[SOLVED] openssl 1.1.0.e-1 manual file decrypt broked error:06065064

openssl-1.1.0.e-1-x86_64.pkg

decrypt command :  openssl enc -aes-256-cbc -salt -in bup.tar.crypt -d -out bup2.tar

error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:crypto/evp/evp_enc.c:540

after downgrade to openssl-1.0-1.0.2.k-1-x86_64.pkg I was able to decrypt my file...

any ideas ?

Last edited by vitaliy.kuzmich (2017-05-07 09:31:50)

Offline

#2 2017-05-04 23:04:04

mpan
Member
Registered: 2012-08-01
Posts: 1,217
Website

Re: [SOLVED] openssl 1.1.0.e-1 manual file decrypt broked error:06065064

Before going to the solution, fix your command — you have invalid options there. Option -salt makes no sense for decryption and for encryption it is never necessary, as it’s default unless you set -nosalt, which you should never set under normal circumstances. So:

openssl enc -d -aes-256-cbc -in encrypted -out decrypted

As for your particular problem: OpenSSL changed message digest it uses. OpenSSL 1.0.2 still used MD5 and 1.1.0 switched to SHA256. If you have data encrypted with 1.0.2 or older, you have to specify MD5 as the digest algorithm:

openssl enc -d -aes-256-cbc -md md5 -in encrypted -out decrpted

Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2017-05-05 05:37:08

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,911
Website

Re: [SOLVED] openssl 1.1.0.e-1 manual file decrypt broked error:06065064

Mod note: Not an upgrade issue, moving to Applications & DEs.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2017-05-05 07:23:44

vitaliy.kuzmich
Member
Registered: 2015-11-29
Posts: 64

Re: [SOLVED] openssl 1.1.0.e-1 manual file decrypt broked error:06065064

mpan wrote:

Before going to the solution, fix your command — you have invalid options there. Option -salt makes no sense for decryption and for encryption it is never necessary, as it’s default unless you set -nosalt, which you should never set under normal circumstances. So:

openssl enc -d -aes-256-cbc -in encrypted -out decrypted

As for your particular problem: OpenSSL changed message digest it uses. OpenSSL 1.0.2 still used MD5 and 1.1.0 switched to SHA256. If you have data encrypted with 1.0.2 or older, you have to specify MD5 as the digest algorithm:

openssl enc -d -aes-256-cbc -md md5 -in encrypted -out decrpted

it works! thanks a lot!

Offline

#5 2017-05-05 07:40:34

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,911
Website

Re: [SOLVED] openssl 1.1.0.e-1 manual file decrypt broked error:06065064

Remember to mark your thread as solved.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB