Re: Java and C/OpenSSL

2014-04-26 Thread Anant Rao
As I acknowledged in my prev email, I had a coding error and once corrected, I confirm that c/OpenSSL is able to decrypt the ciphertext that's generated by Java using PKCS5. I may be dumb, but not an ingrate. The help I got on this forum is incredible - so fast, so thorough. I appreciate it all.

Re: Java and C/OpenSSL

2014-04-26 Thread Tom Francis
> On Apr 26, 2014, at 6:25 PM, Anant Rao wrote: > > Hi, > > I see the doc. But, I'm afraid to say my question is still unanswered. Is > this function (PKCS5_PBKDF2_HMAC) supposed to generate same or diff output > over multiple calls with the same input? I see the latter and I want to know >

Re: Java and C/OpenSSL

2014-04-26 Thread Viktor Dukhovni
On Sat, Apr 26, 2014 at 03:25:32PM -0700, Anant Rao wrote: > I see the doc. But, I'm afraid to say my question is still unanswered. Is > this function (PKCS5_PBKDF2_HMAC) supposed to generate same or diff output > over multiple calls with the same input? I see the latter and I want to > know what,

Re: Java and C/OpenSSL

2014-04-26 Thread Anant Rao
Hi, I see the doc. But, I'm afraid to say my question is still unanswered. Is this function (PKCS5_PBKDF2_HMAC) supposed to generate same or diff output over multiple calls with the same input? I see the latter and I want to know what, if any, I'm doing incorrect. Thanks a lot for your help/favor

Re: Java and C/OpenSSL

2014-04-26 Thread Jeffrey Walton
On Sat, Apr 26, 2014 at 5:12 PM, Matt Caswell wrote: > On 26 April 2014 20:38, Jeffrey Walton wrote: >> ... >> There are no docs on it, but a patch is sitting in RT at >> https://rt.openssl.org/Ticket/Display.html?id=3293&user=guest&pass=guest. >> Download the POD file and open it with a text edi

Re: Java and C/OpenSSL

2014-04-26 Thread Matt Caswell
On 26 April 2014 20:38, Jeffrey Walton wrote: > On Sat, Apr 26, 2014 at 3:18 PM, Anant Rao wrote: >> I'm doing password encryption (and decryption) in Java. I need to port this >> to C. >> In Java, I'm doing this: >> >> PBEKeySpec ("somepassphrase", some_salt, some iterations, 128 >> /*key_length

Re: Java and C/OpenSSL

2014-04-26 Thread Jeffrey Walton
On Sat, Apr 26, 2014 at 3:18 PM, Anant Rao wrote: > I'm doing password encryption (and decryption) in Java. I need to port this > to C. > In Java, I'm doing this: > > PBEKeySpec ("somepassphrase", some_salt, some iterations, 128 > /*key_length*/); > Algorithm is "PBKDF2WithHmacSHA1" > > If I gener

Java and C/OpenSSL

2014-04-26 Thread Anant Rao
Hi, I'm doing password encryption (and decryption) in Java. I need to port this to C. In Java, I'm doing this: PBEKeySpec ("somepassphrase", some_salt, some iterations, 128 /*key_length*/); Algorithm is "PBKDF2WithHmacSHA1" If I generate a secret key with the above data, I get the same output wi