CryptoJS and jsenc (also on GitHub)
I came across the CryptoJS, a library with cyptographic functions like MD5, SHA-1, SHA-2, HMAC, HMAC, PBKDF2, AES, DES, 3-DES, Rabbit, RC4, RC4Drop.
An encryption library that runs in your browser – this is simply great!
Okay I admit, at first sight this might not seem to be too handy, but think about it. This way for example you can have your data stored encrypted on your server but in your browser you can decrypt it, modify, re-encrypt and send back – all this in your browser without the data ever transmitted or stored unencrypted.
A little more advanced version: you can store your data online on an “untrusted” website, for example pastebin. You have the key to it, only you can read and write it!
Also… I was playing with CryptoJS a bit and have created some tests, see here: http://github.com/gheja/jsenc and here: http://jsenc.x0.hu/nightly/
I created the jsenc01 example to demonstrate Password Based Key Derivation 2 (SHA256 hashing with configurable salt and iteration count) and AES encryption (with configurable IV). This method is used by default in disk encryption softwares like LUKS and TrueCrypt to encrypt the master key. Also the output and the encryption parameters (without the password) is displayed in JSON and hex encoding.
[...] I have also created a little extension for CryptoJS, the JavaScript based encryption library I have mentioned in a previous post. [...]