On Thu, Sep 01, 2005, Yongfang Liang wrote:

> Hi, All,
> I am trying to use OpenSSL AES (version 0.9.8) encryption/decryption. But 
> it seems not working properply for me.  I attached the test files. The 
> problems I got are:
> 1. The output of decryption is different if I open the optimization option 
> of gcc (or cc in solaris)
>    gcc -o test test.c -lcrypto
>    gcc -O3 -o test test.c -lcrypto
> 2. For encryption, the output is different when I just changed the order of 
> the buffer definition. (please see test1() and test2() in test.c )
>  gcc -o test test.c -lcrypto
> 
> two questions:
> 1. Am I using the OpenSSl AES library correctly? If not, how am I supposed 
> to do?
>   I am a newer to Openssl. Never mind if I am using the library wrong.
> 

This should be asked in openssl-users.

The block length in AES is 128 bits so the IV length should be 16 bytes not 8
as in your code.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to