用于数字签名的PC / SC功能 [英] PC/SC Functions for Digital Signature

查看:136
本文介绍了用于数字签名的PC / SC功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用用于智能卡的Micrisift API签名XML文档...



到目前为止,我可以列出读卡器,并连接到右侧卡并建立上下文,但是在那之后我不确定下一步是什么……



我需要调用哪些PC / SC函数来签署文档



预先感谢



Javier

解决方案

如果安装了中间件,则可以使用用于加密功能的Windows CAPI 。一些中间件还附带了您可以使用的PKCS#11库。
如果您没有任何中间件,则必须使用PC / SC接口自己进行操作,如果卡使用的是安全消息传递,则建议您使用ISO / IEC 7816-4和ISO / IEC 7816-8。 (或Sado Machism,如果您问我)。不幸的是,这些ISO规范非常昂贵,但是您可以从ISO / IEC 7816-4中找到一些摘录就在这里
ISO / IEC 7816-4描述了用于与卡交换信息的APDU命令。 PKCS#15 标准对于文件的使用方式也有很大帮助



此外,您可能需要卡片制造商的完整规格。如果幸运的话,您可以在 MuscleCard项目中找到卡的插件。 > OpenSC项目(它们都可以在Windows中使用)。 p>

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

解决方案

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).

这篇关于用于数字签名的PC / SC功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆