TweetNaCl.js
dchest.github.io
dchest.github.io
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.
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.