RNCryptor.KeyForPassword for both JNCrypto and rncryto-js whith the same input , but result return is not the same

51 views
Skip to first unread message

Trunk B

unread,
Aug 25, 2015, 10:26:03 AM8/25/15
to rncryptor

HI all , 
I tried to call the RNCryptor.KeyForPassword for both JNCrypto and rncryto-js whith the same input , but result return is not the same. EX as result after call RNCryptor.KeyForPassword , JNCrypto return me an array with 32 elements each element is a number which not bigger than 128, and rncryto-js return a array with 8 elements and each element is a number which number's count =10. 
JNCrypto :[xxxxxxxxx, xxxxxxxxxx, -xxxxxxxxxx, -xxxxxxxxxx, -xxxxxxxxx, -xxxxxxxxxx, xxxxxxxxxx, -xxxxxxxxx]
rncrypto-js :[-xx, -x, -xx, xx, -xx, -xx, xxx, -xx, -xxx, -xx, xx, -xx, -xx, -xx, -xxx, xxx, -xx, -xx, -x, -xx, -xx, -xx, -xxx, -xx, xx, xx, xx, xxx, xxx, xx, -xxx -xxx]
I think that in rncrypto.js ---->  RNCryptor.KeyForPassword -----> sjcl.misc.pbkdf2(password, salt, 10000, 32 * 8, hmacSHA1) may be i should but another option ? 
Regards,
Trunk

Christian Gutierrez

unread,
Sep 1, 2015, 5:01:04 PM9/1/15
to rncryptor
If you require running js on server side, you can give a try to this module: https://github.com/chesstrian/JSCryptor

Rob Napier

unread,
Sep 1, 2015, 8:40:46 PM9/1/15
to rncr...@googlegroups.com
Didn't know about that one. I'm not a huge fan of my JS attempt (https://github.com/RNCryptor/rncryptor-js) and I very seldom work in JS myself. Are you interested in bringing this into the RNCryptor org? It looks like you're passing the test vectors.

-Rob

--
You received this message because you are subscribed to the Google Groups "rncryptor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rncryptor+...@googlegroups.com.
Visit this group at http://groups.google.com/group/rncryptor.
For more options, visit https://groups.google.com/d/optout.



--
Rob Napier
Cocoaphony blog -- http://robnapier.net/blog
iOS Programming Pushing the Limits -- http://robnapier.net/book
Reply all
Reply to author
Forward
0 new messages