PC/SC Functions for Digital Signature

感情迁移 提交于 2019-12-24 11:04:03

问题


I am trying to sign an XML document with the Micrisift API for the smart cards...

So far I can list the card readers, connect to the right card and establish the context but after that I am not sure what is next......

What PC/SC Functions Do I need to call to sign a document with a private smartcard key?

thanks in advance

Javier


回答1:


If you have a middleware installed you can use the Windows CAPI for cryptographic functions. Some middlewares also ship a PKCS#11 library you can use. If you don't have any middleware you have to do it yourself using the PC/SC interface, I suggest you look into ISO/IEC 7816-4 and ISO/IEC 7816-8 if the card is using Secure Messaging (or Sado Machism if you ask me). Unfortunately those ISO specs are quite expensive, however you can find some excerpts from ISO/IEC 7816-4 right here. The ISO/IEC 7816-4 describe the APDU commands for information exchange with the card. The PKCS#15 standard can also be of great help regarding how files are stored on the card.

Also, you might need the full specification from the card manufacturer. If you are lucky you can find a plugin for your card in the MuscleCard project or the OpenSC project (they both work in Windows too).



来源:https://stackoverflow.com/questions/513292/pc-sc-functions-for-digital-signature

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