PBKDF2-SHA256.txt at [59eac2fc22]

File tests/test_vectors/KDF/PBKDF2-SHA256.txt artifact ecc15b287a part of check-in 59eac2fc22


# PBKDF2
# From RFC 6070 - PBKDF2 with HMAC SHA-1
# SHA2 from https://github.com/brycx/Test-Vector-Generation/blob/master/PBKDF2/pbkdf2-hmac-sha2-test-vectors.md
# and RFC 7914 scrypt

# Test Case 1
Hash = SHA256
Plen = 8
Slen = 4
P = "password"
S = "salt"
c = 1
dkLen = 20
DK = 120fb6cffcf8b32c43e7225256c4f837a86548c9

# Test Case 2
Hash = SHA256
Plen = 8
Slen = 4
P = "password"
S = "salt"
c = 2
dkLen = 20
DK = ae4d0c95af6b46d32d0adff928f06dd02a303f8e

# Test Case 3
Hash = SHA256
Plen = 8
Slen = 4
P = "password"
S = "salt"
c = 4096
dkLen = 20
DK = c5e478d59288c841aa530db6845c4c8d962893a0

# Test Case 4
Hash = SHA256
Plen = 8
Slen = 4
P = "password"
S = "salt"
c = 16777216
dkLen = 20
DK = cf81c66fe8cfc04d1f31ecb65dab4089f7f179e8

# Test Case 5
Hash = SHA224
Plen = 24
Slen = 36
P = "passwordPASSWORDpassword"
S = "saltSALTsaltSALTsaltSALTsaltSALTsalt"
c = 4096
dkLen = 25
DK = 348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c

# Test Case 6
Hash = SHA224
Plen = 9
Slen = 5
P = "pass\0word"
S = "sa\0lt"
c = 4096
dkLen = 16
DK = 89b69d0516f829893c696226650a8687

# Test Case 7
Hash = SHA224
Plen = 6
Slen = 4
P = "passwd"
S = "salt"
c = 1
dkLen = 128
DK = 55ac046e56e3089fec1691c22544b605f94185216dde0465e68b9d57c20dacbc49ca9cccf179b645991664b39d77ef317c71b845b1e30bd509112041d3a19783c294e850150390e1160c34d62e9665d659ae49d314510fc98274cc79681968104b8f89237e69b2d549111868658be62f59bd715cac44a1147ed5317c9bae6b2a

# Test Case 8
Hash = SHA224
Plen = 8
Slen = 4
P = "Password"
S = "NaCl"
c = 80000
dkLen = 128
DK = 4ddcd8f60b98be21830cee5ef22701f9641a4418d04c0414aeff08876b34ab56a1d425a1225833549adb841b51c9b3176a272bdebba1d078478f62b397f33c8d62aae85a11cdde829d89cb6ffd1ab0e63a981f8747d2f2f9fe5874165c83c168d2eed1d2d5ca4052dec2be5715623da019b8c0ec87dc36aa751c38f9893d15c3

# Test Case 9
Hash = SHA224
Plen = 8
Slen = 4
P = "Password"
S = "sa\0lt"
c = 4096
dkLen = 256
DK = 436c82c6af9010bb0fdb274791934ac7dee21745dd11fb57bb90112ab187c495ad82df776ad7cefb606f34fedca59baa5922a57f3e91bc0e11960da7ec87ed0471b456a0808b60dff757b7d313d4068bf8d337a99caede24f3248f87d1bf16892b70b076a07dd163a8a09db788ae34300ff2f2d0a92c9e678186183622a636f4cbce15680dfea46f6d224e51c299d4946aa2471133a649288eef3e4227b609cf203dba65e9fa69e63d35b6ff435ff51664cbd6773d72ebc341d239f0084b004388d6afa504eee6719a7ae1bb9daf6b7628d851fab335f1d13948e8ee6f7ab033a32df447f8d0950809a70066605d6960847ed436fa52cdfbcf261b44d2a87061

# RFC 7914 Test Case 1
Hash = SHA256
Plen = 6
Slen = 4
P = "passwd"
S = "salt"
c = 1
dkLen = 64
DK = 55ac046e56e3089fec1691c22544b605f94185216dde0465e68b9d57c20dacbc49ca9cccf179b645991664b39d77ef317c71b845b1e30bd509112041d3a19783

# RFC 7914 Test Case 2
Hash = SHA256
Plen = 8
Slen = 4
P = "Password"
S = "NaCl"
c = 80000
dkLen = 64
DK = 4ddcd8f60b98be21830cee5ef22701f9641a4418d04c0414aeff08876b34ab56a1d425a1225833549adb841b51c9b3176a272bdebba1d078478f62b397f33c8d