On Thu, Mar 09, 2006 at 05:33:42AM -0600, uno wand wrote: > 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 salt, and the Java app is using > AES/128/CBC > to do the encryption. > > I just want an example on how to generate key using Openssl, especially on > how > to get to same result as in Java.
HMAC-SHA1 is explained in RFC 2104, with some test cases in RFC 2202, so you can check both your Java and C implementations are correct independently. HMAC does not define how to use a salt. Therefore, you will need to take apart your Java application, and work out exactly how it combines the password and salt before passing them to the HMAC function. Then you can implement the same in your C program. HTH, Brian. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]