{
var iterations = 2;
var keySize = 147;
var password = sjcl.codec.hex.toBits("00");
var salt = sjcl.codec.hex.toBits("006ab795cd7d");
var digestFn = sjcl.hash.ripemd160;
var hmac = function (key) {
var hasher = new sjcl.misc.hmac(key, digestFn);
this.encrypt = function () {
return hasher.encrypt.apply(hasher, arguments);
};
};
var derivedKey = sjcl.misc.pbkdf2(password, salt, iterations, keySize * 8, hmac);
console.log(sjcl.codec.hex.fromBits(derivedKey));
}
Expected result:
Actual result
Reproducer for Botan
Reproducer for OpenSSL
May be related to https://github.com/bitwiseshiftleft/sjcl/issues/410