Bug 1520084

Summary: Incompatibility with previous version of openssl -- decrypt impossible.
Product: [Fedora] Fedora Reporter: guilde.nt
Component: opensslAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 27CC: jorton, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-04 08:56:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description guilde.nt 2017-12-02 18:51:13 UTC
Description of problem:

In September 2017, using openssl-1.0.2j-3.fc25.x86_64, I encrypted a file ;
 in November 2017, using openssl-1.1.0g-1.fc27.x86_64, decrypting, I get :

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

The file decrypts correctly with openssl-1.0.2j-1.fc24.i686.

Version-Release number of selected component (if applicable):

  openssl-1.1.0g-1.fc27.x86_64

How reproducible:

  At each attempt to decrypt.

Steps to Reproduce:

1. With openssl-1.0.2j-3.fc25.x86_64 :

   $ openssl bf -a <clear >crypted

2. With openssl-1.1.0g-1.fc27.x86_64 :

   $ openssl bf -d -a <crypted >clear

Actual results:

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

Expected results:

  Uneventful decryption.

Additional info:

  With openssl-1.1.0g-1.fc27.x86_64, encrypted files are larger than with
openssl-1.0.2j-3.fc25.x86_64.

Comment 1 Tomas Mraz 2017-12-04 08:56:25 UTC
Just add -md md5 to the openssl 1.1.0 command line. See the HISTORY section of the enc(1) manual page.