views:

122

answers:

3

Is it possible to talk to Microsoft's Crypto API from a client side application in a browser? What should I know? Where should I start? I am looking to make a dummy application where a user can write a message and sign it with his private key, all through his browser using CAPI.

Thanks

A: 

You might be better off to consider redesigning your app to just use client side TLS/SSL certificates to do the signing for non-repudiation. That'd probably have larger support and be least error-prone.

If you need convincing on not rolling you're own crypto, see this.

Jeff Moser
The Silverlight crypto functions do not do asymmetric encryption, which rules out public/private key use.
blowdart
Fair enough, I suppose I should check it out closer next time. Updated my response :)
Jeff Moser
A: 

You can install the certificate in the users key store (the private keys he will use to sign the document with).Then say you need to sign something you can convert the document or what ever to PDF/A (PDF/A supports digital signature + openstandard) and sign it (there are pdf libraries for .net that use the crypto .net stuff to take the certificate from the key store and sign the document).You say message so you write in a text box? if so take content convert to pdf and sign.You can do all what i mentioned.

abmv
A: 

I ended up using C# to make a COM object that I installed on users' computers and interacted with it through the browser via JavaScript.

Petey B

related questions