1
vote
$\begingroup$

Does google's Crypto.JS AES encryption use PBKDF2 as default?

Some references, but I can't figure out the answer myself:

https://code.google.com/p/crypto-js/#The_Cipher_Algorithms

https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js

$\endgroup$
3
votes
$\begingroup$

The documentation says it's OpenSSL, not PBKDF2:

When you use a CipherParams object in a string context, it's automatically converted to a string according to a format strategy. The default is an OpenSSL-compatible format

This can be verified in the source code. The implementation of the OpenSSL KDF is in evpkdf.js.

The key derivation function is usually referenced as EVP_BytesToKey which is the higher level function in the API that implements the KDF.

$\endgroup$
1
vote
$\begingroup$

I assume you are invoking it like this:

CryptoJS.AES.encrypt("Message", "Secret Passphrase");

As of 3.1.2 the default key derivation function is OpenSSLKdf as configured here and implemented here and here.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.