OpenSSL cryptography fails in release mode, but no in debug

2009-04-14 Thread Atti
Hy, I'm using an older version of OpenSSL (the new one has errors in X509.h), on a Win32 machine, installed as binaries. I'm using the EVP_Encrypt/Decrypt functions and a generated key to encrypt my data, and everything works fine in debug mode. When I try to run the release mode, it still runs fin

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-14 Thread Atti
Sorry, I made a mistake when I wrote the first text, I'm using libeay32MDd.lib - /MDd for debug and libeay32MD.lib - /MD for release. I only made the mistake writing this, I'm linking against the correct .libs in my project. On Tue, Apr 14, 2009 at 2:03 PM, Atti wrote: > Hy, I'm using an older v

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Atti
I built the new OpenSSL (1.0.0) and tried to run the blowfish encryption example from the OpenSSL docs ( http://openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES) but this time I used the same library to compile the application, because this build only made this one. I made one debug and one re

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Atti
I built the new OpenSSL (1.0.0) and tried to run the blowfish encryption example from the OpenSSL docs (http://openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES) but this time I used the same library to compile the application, because this build only made this one. I made one debug and one rel

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Victor Duchovni
On Wed, Apr 15, 2009 at 11:46:56AM +0300, Atti wrote: > I built the new OpenSSL (1.0.0) and tried to run the blowfish > encryption example from the OpenSSL docs > (http://openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES) but > this time I used the same library to compile the application, beca

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Atti
I get always the same output for debug / and the "different" same each time for the release, if I use the same key and the same input data. I'm using the following EVP_* functions: EncryptInit(), EncryptUpdate(), EncryptFinal(). Using the 3DES cbc algorithm, but I tried the blowfish too, with the s

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Victor Duchovni
On Wed, Apr 15, 2009 at 08:05:55PM +0300, Atti wrote: > I get always the same output for debug / and the "different" same each > time for the release, if I use the same key and the same input data. Clearly you have a constant IV with the debug library and a "random" IV otherwise. > I'm using the

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Atti
Okay, well as I said, I compiled and ran the example from the OpenSSL docs (http://openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES), which has an IV, and the application still behaves the same. On Wed, Apr 15, 2009 at 8:15 PM, Victor Duchovni wrote: > On Wed, Apr 15, 2009 at 08:05:55PM +030

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-15 Thread Victor Duchovni
On Wed, Apr 15, 2009 at 08:19:34PM +0300, Atti wrote: > Okay, well as I said, I compiled and ran the example from the OpenSSL > docs (http://openssl.org/docs/crypto/EVP_EncryptInit.html#EXAMPLES), > which has an IV, and the application still behaves the same. What key and IV sizes does the follow

Re: OpenSSL cryptography fails in release mode, but no in debug

2009-04-16 Thread Atti
I couldn't make the new version work, but I installed 0.9.8g, from binaries, deleted everything related to OpenSSL, and recompiled the example. It now generated the same output, but in my actual project it still wasn't working. I found some errors in the key handling, and after I fixed that, the bl