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 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 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).
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.
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.
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.
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.
https://github.com/stellar/tweetnacl-js/commit/063e072
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.
https://www.npmjs.org/search?q=nacl