News for hackers. Stuff that matters.
Re:TweetNaCl.js by kibibu on Wednesday August 06, 2014 @08:26PM (#8145663)
I really wish there weren't two popular projects that were abbreviated to NaCl.

For others, this is a port of the "salt" NaCl crypto library, and has nothing to do with Native Client.

The dangers of JS crypto in the browser are well trodden (anybody who can snoop the connection can probably replace the JS, for example), but the rise of JS-based client apps (through node-webkit et al) make this a bit more meaningful.

Re:TweetNaCl.js by nly on Thursday August 07, 2014 @08:32AM (#8147341)
Afaik NaCl from DBJ et al. isn't actively maintained, by them, as an ongoing project. It hasn't been updated since early 2011. libsodium is where it's at now. Going forward, I wouldn't expect TweetNaCl to be either so there's not much of a naming collision.
Re:TweetNaCl.js by CmonDev on Thursday August 07, 2014 @03:54AM (#8146680)
Yes, I was initially excited expecting to see something awesome for Google NaCl, but it turned out to be yet another script written in a legacy language... Well, he did add .js to the name though.
Re:TweetNaCl.js by xiaoma on Thursday August 07, 2014 @04:35AM (#8146758)
What exactly are you referring to with "legacy language"? Could you elaborate?
Re:TweetNaCl.js by kibibu on Thursday August 07, 2014 @04:58AM (#8146808)
I'm pretty sure it was just snark at Javascript/ECMAscript.

IMO it's pretty hard to justify calling it a legacy language when there are 4 major JS JIT engines actively competing for performance, and a pretty thriving developer ecosystem. It's about as young as Ruby, and younger than Python and Haskell.

Re:TweetNaCl.js by hayksaakian on Wednesday August 06, 2014 @09:30PM (#8145849)
thank you for clarifying.

Sometimes these name collisions don't matter because the projects are from two separate groups of software, but in this case, the overlap in 'client facing web apps' makes NaCl downright confusing without clarification.

Re:TweetNaCl.js by jedisct1 on Wednesday August 06, 2014 @09:19PM (#8145821)
Javascript is also a supported target for libsodium, through Emscripten. The Javascript file size (minified/gzipped, with most operations including password hashing using scrypt) is 136K.

TweetNaCl.js doesn't have the same features set, but it is tiny, has been written in Javascript, is easy to use, well-documented, and well-maintained.

This is what Minilock uses. It is a perfect fit for this kind of applications.

Re:TweetNaCl.js by girvo on Wednesday August 06, 2014 @09:54PM (#8145918)
I've actually been looking for a small crypto library for javascript, I'm in the process of building a desktop cross-platform app using node-webkit, and this seems quite interesting!
Re:TweetNaCl.js by deckar01 on Thursday August 07, 2014 @03:05AM (#8146573)
We ended up using tweetnacl for Stellar after switching to Ed25519. We forked it to implement generating keys from a seed.

https://github.com/stellar/tweetnacl-js/commit/063e072

Re:TweetNaCl.js by dchest on Thursday August 07, 2014 @06:10AM (#8146950)
Nice! I've added nacl.sign.keyPair.fromSeed in v0.11.0, though I see that I didn't define seedLength. Will do!
Re:TweetNaCl.js by diafygi on Wednesday August 06, 2014 @11:44PM (#8146191)
The goal of TweetNaCl is to make an auditable crypto library, and this is a JavaScript port of the original C library.

Its goal is not to offer every cipher or algorthim, but its small size allows it to be easily included in unhosted apps like miniLock.

Re:TweetNaCl.js by themadcreator on Wednesday August 06, 2014 @08:33PM (#8145692)
How does this differ from the other javascript NaCl implementations?

https://www.npmjs.org/search?q=nacl

Re:TweetNaCl.js by dchest on Thursday August 07, 2014 @06:14AM (#8146963)
It's a port of TweetNaCl (http://tweetnacl.cr.yp.to), which goal is to be tiny and auditable. If you compare C and JS implementations side-by-side, they look very similar (which was the major goal of this port).
Re:TweetNaCl.js by skion on Thursday August 07, 2014 @03:18AM (#8146600)
For one the fact that (the author of NaCL) Daniel Bernstein is backing it.
Re:TweetNaCl.js by dchest on Thursday August 07, 2014 @06:13AM (#8146960)
DJB wrote the original tweetnacl.c, from which this JavaScript implementation is derived. He doesn't have anything to do with the port.
Re:TweetNaCl.js by skion on Thursday August 07, 2014 @07:19AM (#8147092)
You guys are right of course; I was looking at the C version.
Re:TweetNaCl.js by arnehormann on Thursday August 07, 2014 @06:03AM (#8146926)
I really doubt that, where does it say so? AFAIK, he supported the TweetNaCl in C. That does not mean anything concerning this port.