Re: Encrypt in Java and decrypt in Openssl (and vice versa)

2006-03-11 Thread uno wand
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

Re: Encrypt in Java and decrypt in Openssl (and vice versa)

2006-03-10 Thread uno wand
Thanks for replying. I have been verifying, and re-verifying that my key and IV are in fact the same in both C and Java. The hex printout of the key and IV are exactly the same. Original Text: "This is a test" The hex print of Java cipher text is : 740A5DBD288340D7AC8F9F20587B7F4D And trying

Encrypt in Java and decrypt in Openssl (and vice versa)

2006-03-10 Thread uno wand
Hi all, I've been pulling my hair for two days, trying to figure out why a msg encrypted in Java can not be decrypted with Openssl, and vice versa. It'd be very much appreciated if someone could give a hint. Here's the Java code (apologize for that) (no exception handling): byte[] key; // g

RE: Question about password-based encryption key generation

2006-03-09 Thread uno wand
Never mind, I found the function PKCS5_PBKDF2_HMAC_SHA1(). Hi, Could someone point me to an example on how to generate encryption from password using Openssl? I have a java application that uses HmacSHA to generate encryption key from a password, and the encrypted msg is send to the C ap

Question about password-based encryption key generation

2006-03-09 Thread uno wand
Hi, Could someone point me to an example on how to generate encryption from password using Openssl? I have a java application that uses HmacSHA to generate encryption key from a password, and the encrypted msg is send to the C application. Both Java and C apps shared the same password and sa