W3C is working on a http://www.w3.org/TR/WebCryptoAPI/
to define a way to generate digital signatures, encrypton and so on from javascript. Basically defines a
You need to write active component that will access MS Crypto Store and peform cryptographic operation. It can be either Java applet or Chrome browser extension utilizing NativeClient SDK. Java applet will run in MSIE, Firefox, Chrome and most other browsers but requires JRE (Java runtime environment) installed on the client computer.