On Sat, Apr 26, 2014 at 3:18 PM, Anant Rao <a...@noknok.com> 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 generate a secret key with the above data, I get the same output with
> multiple runs of the program.
>
> In C, I tried doing something similar using OpenSSL:
>
> EVP_BytesToKey(EVP_aes_128_cbc(), EVP_sha1(), salt, passphrase,
> strlen(passphrase), nrounds, key, NULL /*iv*/);
How about PKCS5_PBKDF2_HMAC?

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 editor.

Jeff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to