------=_Part_3353_19130637.1176266976903
Content-Type: multipart/alternative;
boundary="----=_Part_3354_10065329.1176266976903"

------=_Part_3354_10065329.1176266976903
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

My previous mail doesn't seem to have appeared on the list, so sending
again:


Hello,

As the maintainer of a package which uses OpenSSL, I've received some
reports
of 0.9.8e failing to decrypt data which was encrypted by previous versions
of
OpenSSL.

Attached is a small bit of C++ code which demonstrates the problem. It uses

the EVP interface with EVP_bf_cfb as the cipher and a 256 bit key (the
reports all point to Blowfish with key length > 128 bits). What it does is
set a key, an IV, and run an encryption pass, then a decryption and compute
checksums of the three arrays (original, encrypted, decrypted).

When built against 0.9.8c, I get:
ort:tmp> g++ -Wall -g -o ssltest ssltest.cpp -lssl -lcrypto -lz
ort:tmp> ./ssltest
src chksum = 698614540
stage2 chksum = 2266501868
final chksum = 698614540

Another machine with 0.9.7a gives an identical result. On a machine I
upgraded to 0.9.8e, I get the following output:

src chksum = 698614540
stage2 chksum = 2108297998
final chksum = 698614540


"stage2" is the encrypted data, and it differs on 0.9.8e. What this means
in
practice is that the program I'm using can encrypt/decrypt data just fine
when run in either version of OpenSSL, but if data is encrypted in an
earlier
version and then OpenSSL is upgraded to 0.9.8e, then decryption fails.

The nearest I've narrowed down is to something changing between 0.9.8c and
0.9.8e, but I've received reports that 0.9.8d -> 0.9.8e also fails. I've
been looking at the diffs between 0.9.8d -> 0.9.8e, but I'm not seeing any
obvious problem. Reports are that only Blowfish with key > 128 bits has a
problem, and AES users are not affected.

Any ideas what's wrong, and if there's a way to get 0.9.8e output to match
earlier versions?

regards,
Valient

------=_Part_3354_10065329.1176266976903
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


My previous mail doesn't seem to have appeared on the list, so sending again:


Hello,

As the maintainer of a package which uses OpenSSL, I've received some reports
of 0.9.8e failing to decrypt data which was encrypted by previous versions of

OpenSSL.

Attached is a small bit of C++ code which demonstrates the problem.  It uses
the EVP interface with EVP_bf_cfb as the cipher and a 256 bit key (the
reports all point to Blowfish with key length > 128 bits).  What it does is

set a key, an IV, and run an encryption pass, then a decryption and compute
checksums of the three arrays (original, encrypted, decrypted).

When built against 0.9.8c, I get:
ort:tmp> g++ -Wall -g -o ssltest
ssltest.cpp -lssl -lcrypto -lz
ort:tmp> ./ssltest
src chksum = 698614540
stage2 chksum = 2266501868
final chksum = 698614540

Another machine with 0.9.7a gives an identical result.  On a machine I

upgraded to 0.9.8e, I get the following output:

src chksum = 698614540
stage2 chksum = 2108297998
final chksum = 698614540


"stage2" is the encrypted data, and it differs on 0.9.8e.  What this means in

practice is that the program I'm using can encrypt/decrypt data just fine
when run in either version of OpenSSL, but if data is encrypted in an earlier
version and then OpenSSL is upgraded to 0.9.8e, then decryption fails.


The nearest I've narrowed down is to something changing between 0.9.8c and
0.9.8e, but I've received reports that 0.9.8d -> 0.9.8e also fails.  I've
been looking at the diffs between 0.9.8d ->
0.9.8e, but I'm not seeing any
obvious problem.  Reports are that only Blowfish with key > 128 bits has a
problem, and AES users are not affected.

Any ideas what's wrong, and if there's a way to get
0.9.8e output to match
earlier versions?

regards,
Valient


------=_Part_3354_10065329.1176266976903--

------=_Part_3353_19130637.1176266976903
Content-Type: text/plain; name=ssltest.cpp; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_f0dax1ft
Content-Disposition: attachment; filename="ssltest.cpp"

Ci8qCiAgICBCdWlsZCB1c2luZzoKCiAgICBnKysgLWcgLW8gc3 NsdGVzdCBzc2x0ZXN0LmNwcCAt
bHNzbCAtbGNyeXB0byAtbHoKCiovCgojaW5jbHVkZSA8b3Blbn NzbC9ldnAuaD4KI2luY2x1ZGUg
PHpsaWIuaD4KI2luY2x1ZGUgPGFzc2VydC5oPgojaW5jbHVkZS A8c3RyaW5nLmg+CgoKaW50IG1h
aW4oKQp7CiAgICBjb25zdCBpbnQga2V5U2l6ZSA9IDMyO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wgTlVMTCwgTl VMTCwgaXZlYyApOwogICAgRVZQ
X0VuY3J5cHRVcGRhdGUoICZzdHJlYW1fZW5jLCBzdGFnZTIsIC Zkc3RMZW4sIHNyYywgc2l6ZSAp
OwogICAgRVZQX0VuY3J5cHRGaW5hbF9leCggJnN0cmVhbV9lbm MsIHN0YWdlMitkc3RMZW4sICZ0
bXBMZW4gKTsKICAgIGFzc2VydChkc3RMZW4gPT0gc2l6ZSk7Ci AgICBhc3NlcnQodG1wTGVuID09
IDApOwoKICAgIHVMb25nIGNoa3N1bTIgPSBhZGxlcjMyKDBMLC BzdGFnZTIsIHNpemUpOwogICAg
cHJpbnRmKCJzdGFnZTIgY2hrc3VtID0gJWx1XG4iLCBjaGtzdW 0yKTsKCiAgICAvKiBkZWNyeXB0
ICovCiAgICBFVlBfRGVjcnlwdEluaXRfZXgoICZzdHJlYW1fZG VjLCBOVUxMLCBOVUxMLCBOVUxM
LCBpdmVjICk7CiAgICBFVlBfRGVjcnlwdFVwZGF0ZSggJnN0cm VhbV9kZWMsIGZpbmFsLCAmZHN0
TGVuLCBzdGFnZTIsIHNpemUgKTsKICAgIEVWUF9EZWNyeXB0Rm luYWxfZXgoICZzdHJlYW1fZGVj
LCBmaW5hbCtkc3RMZW4sICZ0bXBMZW4gKTsKICAgIGFzc2VydC hkc3RMZW4gPT0gc2l6ZSk7CiAg
ICBhc3NlcnQodG1wTGVuID09IDApOwogICAgCiAgICB1TG9uZy BjaGtzdW0zID0gYWRsZXIzMigw
TCwgZmluYWwsIHNpemUpOwogICAgcHJpbnRmKCJmaW5hbCBjaG tzdW0gPSAlbHVcbiIsIGNoa3N1
bTMpOwoKICAgIC8qIGNvbXBhcmUgKi8KICAgIGludCByZXMgPS BtZW1jbXAoc3JjLCBmaW5hbCwg
c2l6ZSk7CiAgICBhc3NlcnQocmVzID09IDApOwoKICAgIHJldH VybiByZXM7Cn0KCg==
------=_Part_3353_19130637.1176266976903--
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org