From: "Dr. Stephen Henson" <[EMAIL PROTECTED]>
The block size of AES is 128 bits, you therefore need 16 characters or 32
hex
digits in the IV.
Steve.
--
Thanks for the reply, I figured that out earlier too, by re-reading the
documentation
I have on hand. I always had the impression that if I do in Java
Cipher cipher = Cipher.getInstance("AES");
it is equivalent to
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
That is obviously not true. After changing that, that helped a bit.
And after changing the IV to 16 bytes, I got something going, . Now, IV is
hard-coded to
unsigned char * _iv[16];
for (int i = 0; i < 16; i++)
_iv[i] = '1' + i;
in both Java and C.
But it's still not totally right.
Encrypted msg (just text) from Java is decoded "almost" correctly. The msg
consists of multiple lines of text string, but after decrypting it, the
first line
always get screwed up and I get garbage. All other lines are decrypted
correctly.
But encrypted msg from Openssl is decrypted in Java "half correct", meaning
that if I have 8 lines of string, I get about 4 lines correct, the others
are
garbage. And the order is indeterminate, the first line is always screwed
up,
the second line is ok sometimes, not ok other times. Same for the other
lines.
I really have no clue why it's like that. I mean, you either decrypt the
whole
message correctly, or you don't. I really don't understand how did I get
"partially correct" decryption :(
thanks for all.
uw
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]