Javascript asymmetric encryption and authentication

北城余情 提交于 2019-11-30 15:55:34

Don't do this. Please use SSL/TLS. See Javascript Cryptography Considered Harmful.

If you can provide a single SSL site to deliver your JavaScript securely (to avoid the attack mentioned above), then you can use the opensource Forge library to provide cross-domain TLS connections to your other sites after generating self-signed certificates for them. The Forge library also provides other basic crypto stuff if you opt to go in a different direction. Forge has an XMLHttpRequest wrapper that is nearly all JavaScript, with a small piece that leverages Flash's socket API to enable cross-domain communication.

http://digitalbazaar.com/2010/07/20/javascript-tls-1/

https://github.com/digitalbazaar/forge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!