PBKDF2-HMAC-SHA256 (v2)

Revision 2 of this benchmark created by vibornoff on


Description

Perform key derivation with PBKDF2 over HMAC-SHA256.

Preparation HTML

<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/hmac-sha256.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/pbkdf2.js"></script>
<script src="http://bitwiseshiftleft.github.io/sjcl/sjcl.js"></script>
<script src="http://vibornoff.com/asmcrypto.js"></script>

Setup

var password = 'My53cr3tPa55w0rd',
        salt = 'My5a1t',
        iterations = 1000,
        dklength = 32;

Test runner

Ready to run.

Testing in
TestOps/sec
CryptoJS
var key = CryptoJS.PBKDF2( password, salt, { hasher:CryptoJS.algo.SHA256, iterations: iterations, keySize: dklength/32 });
ready
SJCL
var key = sjcl.misc.pbkdf2( password, sjcl.codec.utf8String.toBits(salt), iterations, dklength*8 );
ready
asmCrypto.js
var key = asmCrypto.PBKDF2_HMAC_SHA256.hex( password, salt, iterations, dklength );
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.