Hello there.

I have tried to use aes functions in openssl.
The problem is that the data encrypted by AES_cbc_encrypt() functions
between WIN32 and Linux are different.
Of course, openssl version is same.
The IV value and the key value are also same.
The only difference between Win32 and Linux is how to use.
I tried to use aes fuctions in a static library(already built) on
Linux and
as a source code on Win32(XP).

I also tried to use static library on Win32, exactly the library from
slproweb.com,
but it did not work correctly. So, I just use aes functions from the
source code it works fine.
As far as I know, static library for Linux is built with assembly
code, and the static library from slproweb.com as well.

There are some part of my source below.



....

#define AES_IV_SIZE 16

static const unsigned char s_InitialVector[] = { 0x11, 0x22, 0x33,
0x44, 0x55, 0x66, \
0x66, 0x77, 0x88, 0x88, 0x22, 0x44, 0x55, 0x53, 0x22, 0x55 };

....

AES_set_encrypt_key(key, m_nBlockSizeInByte * 8, &m_keyEncrypt);
AES_set_decrypt_key(key, m_nBlockSizeInByte * 8, &m_keyDecrypt);


// encrypt

// init iv
memcpy(iv, s_InitialVector, AES_IV_SIZE);

// use cbc mode
AES_cbc_encrypt(in, out, len, &m_keyEncrypt, iv, AES_ENCRYPT);

....

// decrypt
// init iv
memcpy(iv, s_InitialVector, AES_IV_SIZE);

// use cbc mode
AES_cbc_encrypt(in, out, len, &m_keyDecrypt, iv, AES_DECRYPT);


I tried to use same codes among Linux and Win32.

I look forward to be given any answer about the problem.

Thank you for your reading.

(I am afraid I am not good at english. Sorry. I don't speak english in
my contury.)