I am looking for a JS crypto lib (similar to, say, OpenSSL's libcrypto) that facilitates digital signing of data in the browser.
I want to sign form form data on the client side using a private key (RSA, PKI certificates or similar).
EXAMPLE
signature=RSA_encrypt(A_private_key, hash(data))
The form data and signature is sent to the server and stored
Another user (B) can check the validity of the signature by comparing hash(data)
with RSA_decrypt(A_public_key, signature)
If someone alters the form data the signature will no longer be valid.
EDIT
https://developer.mozilla.org/en/javascript_crypto
http://www.hanewin.net/encrypt
http://tomas.styblo.name/cryptoapplet/
VIA APPLETS
Best way to sign data in web form with user certificate
! => http://www.nakov.com/research/documents-signing/digital-document-signing-in-java-based-web-applications/
http://www.nakov.com/research/documents-signing/
http://www.developer.com/java/other/article.php/10936_3587361_1
http://www.developer.com/java/web/article.php/3083161
http://blogs.nologin.es/rickyepoderi/index.php?/archives/12-Signature-Applet.html
RELATED
http://ccff02.minfin.fgov.be/CCFF_Authentication/views/login/signature/signatureHelp.html
http://msdn.microsoft.com/en-us/library/cc778518%28VS.85%29.aspx
This library should help.
website: http://www.ohdave.com/rsa/ library: http://www.ohdave.com/rsa/RSA.js