Michaela Merz
unread,Mar 6, 2013, 4:51:57 PM3/6/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sjcl-d...@googlegroups.com
Hey there:
While trying to get sjcl compatible with JAVA/PHP, I ran into trouble with pbkdf2. I wasn't even able to verify SJCL's pbkdf2 against the reference of RFC6070. I am sure, I am to blame, but
var s = sjcl.codec.utf8String.toBits("salt");
var a =sjcl.misc.pbkdf2("password",s,1,160);
var raw = sjcl.codec.String.fromBits(a);
console.log(bin2hex(raw))
resulted in 120fb6cffcf8b32c43e7225256c4f837a86548c9 and not the expected result:
Input:
P = "password" (8 octets)
S = "salt" (4 octets)
c = 1
dkLen = 20
Output:
DK = 0c 60 c8 0f 96 1f 0e 71
f3 a9 b5 24 af 60 12 06
2f e0 37 a6 (20 octets)
Any pointers are greatly appreciated.
Michaela