PBKDF2-HMAC-SHA256 (v5)

Revision 5 of this benchmark created 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 = 256;

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);
ready
asmCrypto.js
var key = asmCrypto.PBKDF2_HMAC_SHA256.hex(password, salt, iterations, dklength / 8);
ready

Revisions

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