微软CCID智能卡读卡器驱动(Microsoft Class Drivers for USB CCID Smart Cards)

前言:

遇到CCID读卡器,在win7有些指令不能正常使用。找到官方的介绍,原来是因为微软修改了CCID读卡器在注册表中的位置。
具体位置在
  • HKLM\SYSTEM\CCS\Enum\USB\Vid*Pid*\*\Device Parameters (win7之前,如xp,2003).
  • HKLM\SYSTEM\CCS\Enum\USB\Vid*Pid*\*\Device Parameters\WUDFUsbccidDriver (Windows 7 和以后的操作系统).
## CCID协议
读卡器和电脑通信的USB链路协议


## PSSC协议
电脑和智能卡直接的通讯标准结构

Microsoft Class Drivers for USB CCID Smart Cards

微软CCID智能卡读卡器驱动

原文地址: http://msdn.microsoft.com/en-us/library/windows/hardware/dn653571(v=vs.85).aspx

This article addresses issues related to the development of the Microsoft CCID class driver for Windows, including a list of the features in the USB CCID (Chip/Smart Card Interface Devices) specification that the driver will support.

This article provides USB smart card class-driver (Usbccid.sys) release information for devices that are compliant with the USB Chip/Smart Card Interface Devices (CCID) Specification (revision 1.0 or later). Usbccid.sys is compliant with all supported versions of Microsoft Windows operating systems, and is available on Windows Update.

For additional details on the class-driver architecture as well as the guidelines associated with USB CCID device development and testing requirements, read this article and see Smart Card Technology.

Introduction

The USB CCID class driver reduces the need for hardware vendors to create a device-specific driver for smart card readers. Eliminating the need for a device-specific driver will potentially reduce the driver development cost, improve driver and system stability, reduce time to market, and lead to a simplified plug and play experience for customers using devices compliant with the USB Chip/Smart Card Interface Devices (CCID) Specification (revision 1.0 or later).

The USB CCID class driver is compatible with all SKUs and locales that are associated with Windows.

The USB CCID class driver is currently available on Windows Update and also through the Windows Update Catalog. This article provides details on Windows support for USB CCID devices.

The “USB CCID Architecture” section later in this article describes the structure of the USB CCID stack. The “USB CCID Class Driver Details” section later in this article describes the features that are explicitly supported by this release of the USB CCID driver. The features planned for future releases are also discussed in the “USB CCID Class Driver Details” section.

The last section provides references to related information and action items to enhance your USB CCID device experience.

USB CCID Architecture

Figure 1 illustrates the functionality of the USB CCID class driver and the associated smart-card subsystem. The USB CCID class driver (Usbccid.sys) is the only driver, developed outside of the original Windows development cycle, to support USB CCID compliant devices. The balance of the class-driver infrastructure is already in-box in Windows.

USB CCID Architecture Stack

Figure 1: USB CCID Architecture Stack

To confirm that you have the latest USB CCID driver, the following components must be included in your system.

Prior to Windows 7:

  • INF (this INF will be an OEN*.inf file if obtained from Windows Update):
    • DriverVer: 04/01/2003,5.2.3790.0
    • ID match: USB\Class_0B&SubClass_00
  • Driver file (Usbccid.sys):
    • File Version: 5.2.3788.0

For Windows 7 and later:

  • INF:
    • DriverVer: 06/21/2006,6.1.7601.17514
    • ID match: USB\Class_0B&SubClass_00
  • Driver file (WUDFUsbccidDriver.dll):
    • File Version: 6.1.7601.17514

Driver or INF version information that is newer (later date or higher version number) than the information listed above is acceptable.

To ensure compatibility with the USB CCID class driver, the Windows USB Team encourages all CCID-compliant devices to be qualified by the latest compatibility tests found on the WHDC Web site.

USB CCID Class Driver Details

The Microsoft CCID class driver is compatible with the USB Chip/Smart Card Interface Devices (CCID) Specification (revision 1.0 or later), which specifies a protocol that a host (computer) can use to interact with CCID class devices or interface (on a composite device). Neither the mechanics of the smart-card interface or the content of the data are described in the CCID specification. However, the CCID specification does provide detailed information with respect to the USB-related configuration and communication channels.

The current release of the Microsoft CCID class driver implements a majority of the features defined in the USB CCID specification. The Microsoft CCID class driver will support the following items that are based on the USB CCID Class specification:

  • 5.0V, 3.0V, and 1.8V cards.
  • Both T=0 and T=1 protocols.
  • Variable clock frequencies and data rates.
  • All features in the dwFeatures field, including Character, TPDU, APDU, and extended APDU levels, although TPDU is the preferred exchange level.
  • In order to send or receive an Escape command to a reader, the DWORD registry value EscapeCommandEnable must be added and set to a non-zero value under one of the following keys.
    • HKLM\SYSTEM\CCS\Enum\USB\Vid*Pid*\*\Device Parameters (prior to Windows 7).
    • HKLM\SYSTEM\CCS\Enum\USB\Vid*Pid*\*\Device Parameters\WUDFUsbccidDriver (Windows 7 and later).
  • Then the vendor IOCTL for the Escape command is defined as follows: #define IOCTL_CCID_ESCAPE SCARD_CTL_CODE(3500).
  • With the enabled Escape command, security against malicious escape commands becomes the reader's responsibility.
  • USB CCID readers should implement the GET_CLOCK_FREQUENCIES and GET_DATA_RATES properties, even if bit 20h in dwFeatures is set. The values of the bNumDataRatesSupported andbNumClockSupported functions should also be non-zero accordingly. This is due to a problem with the USB CCID Class specification where the driver is supposed to send a PPS request; however, if bit 20h and the values associated with the PPS request are zero, the driver does not know what values to set in the PPS request. If bNumDataRatesSupported and/or bNumClockSupported are set to zero, the driver will make a guess as to what baud rates the reader supports, which may or may not be correct.
  • The following features are not currently supported in this initial release of the Microsoft CCID class driver. These features may be supported in future releases of the driver on future operating systems, and will be prioritized based on customer demand.
  • Keypad or LCD display support. If these features need to be provided on a smart card, a different interface (generally HID) must be defined.
  • Vendor/device-specific string name support in the device manager. Since the INF to load USBCCID is not included with Windows, the INF will be renamed as OEM*.INF. Vendors can not refer to this INF through Include/Needs. This feature may be supported in future Windows operating systems.
  • Support for multiple slots on readers. If the reader has multiple slots, only slot 0 will be used. Devices that wish to expose multiple readers may develop a composite device (a CCID-compliant interface would then be required for each reader).
  • Driver support for system wake from suspend/hibernate state on card insertion (even if the reader sets the remote wake bit). This feature may be made available as more smart-card readers provide remote wake functionality.
  • Selective suspend support. The Windows team did not have selective suspend-capable hardware at the time of driver RTM to test this feature. This feature will be supported depending on the availability of readers that support selective-suspend and errata that are appended to the USB CCID specification to support selective suspend.
  • Support for issuing multiple commands to a reader that implements queuing capabilities.
  • Support for any of the mechanical driver features. Future support plans will be determined when the driver features are standardized. For more information, see section 4.1.12 of the USB Chip/Smart Card Interface Devices (CCID) Specification.

Windows Logo Program

Future requirements for the “Designed for Windows” logo program, which pertain to USB CCID class devices, may include the following:

USB smart card CCID reader complies with USB Device Class Specification for USB Chip/Smart Card Interface Devices. To ensure that USB smart-card readers interface with the USB host properly, chip/smart card interface device (CCID) readers must comply with all requirements identified in USB Device Class Specification for USB Chip/Smart Card Interface Devices, Revision 1.0 or later.

USB CCID reader issues NAK on the interrupt pipe when device has no interrupt data to transmit. USB smart-card readers must issue negative acknowledgment code (NAK) on an interrupt pipe, unless there is a change in state. This requirement prevents the need to repeatedly poll the device for status from the device’s function driver.

To review future requirements of the logo program, see New Logo Requirements for Hardware.

Call to Action for Building USB CCID-compliant Devices

  • Download and review the complete USB Device Class specification for USB Chip/Smart Card Interface Devices Specification from the USB Web site.
  • Review the Microsoft Smart Card functions, as described in the Microsoft Platform SDK.
  • Build all future USB smart-card devices compliant to the CCID specification to take advantage of the USB CCID class driver.
  • Visit the USB Implementers Forum Web site (http://www.usb.org ) and evaluate the USB CCID specification review requests. Ensure that USB-CCID compliant readers follow the USB CCID RR to support selective suspend and remote wake.

References

General References

### 回答1: USB CCID是一种安全性高、速度快、易于管理的智能卡读取器标准,其全称是Universal Serial Bus Chip/Smart Card Interface Devices,中文译为“通用串行总线芯片/智能卡接口设备”。在智能卡的应用领域,USB CCID提供了一种在电脑与智能卡之间进行数据传输的接口,从而使智能卡可以更加方便地应用于各种领域。 USB CCID支持多种操作系统,包括Windows、Linux和Mac OS等,并且管理也十分方便。在使用过程中,USB CCID的用户可以通过电脑来进行对智能卡的读取、写入、验证以及加密等操作。它可以读取各种类型的智能卡,例如金融卡、医保卡、居民身份证等,因此具有很高的实用价值。 USB CCID不仅可以提高智能卡的使用便捷性,还可以有效提高数据交换的安全性和速度。通过USB CCID可以避免智能卡读取器的驱动程序不兼容或版本不同导致的问题,同时也避免了移动数字签名的复杂程序和安装所需时间。 在国内,智能卡技术的应用已经逐步普及,随着智能卡应用场景的增多,USB CCID的应用也将越来越广泛。 ### 回答2: USB CCIDUSB Chip Card Interface Device)是一种使用USB接口连接智能卡或芯片卡的设备协议。它提供了一种标准化的接口,使得智能卡设备与计算机之间可以进行通信和交互。 USB CCID协议定义了智能卡读卡器与计算机之间的通信规范,包括数据传输协议、命令格式等。智能卡读卡器通过USB接口与计算机连接,将智能卡信息传递给计算机进行处理。在系统层面,操作系统会为智能卡读卡器分配一个设备驱动程序,使其可以被识别和使用。 通过USB CCID协议,智能卡读卡器可以与计算机进行安全的数据交换。智能卡可以存储个人身份认证、支付信息、加密密钥等重要数据。通过智能卡读卡器,计算机可以读取和写入智能卡的数据,并进行相应的验证和处理。这样可以提高数据的安全性,防止未经授权的访问。 USB CCID协议的出现,方便了各个领域对智能卡的应用。例如在金融领域,智能卡读卡器可以用于实现电子银行、电子钱包等支付功能。在身份认证领域,智能卡读卡器可以用于实现电子身份证的读取和验证。在网络安全领域,智能卡读卡器可以用于实现安全存储和传输加密密钥。而USB CCID协议在这些应用中起到了关键的作用。 总之,USB CCID是一种通过USB接口与计算机通信的智能卡读卡器设备协议。它提供了一种标准化的接口,使得智能卡可以与计算机进行安全的数据交互,广泛应用于金融、身份认证、网络安全等领域。 ### 回答3: USB CCID 是指USB智能卡读卡器设备 (USB Smart Card Reader Device Class) 规范,其全称为Universal Serial Bus Chip / Smart Card Interface Devices。USB CCID 是一种基于智能卡技术的USB设备类别,用于连接计算机和智能卡,实现智能卡的读取、写入及交互功能。 CCID 是一个沟通和管理智能卡读卡器设备和计算机之间通信的协议。通过 USB CCID 规范,计算机可以与智能卡读卡器进行数据传输,实现对智能卡上存储的信息的读取和写入。智能卡读卡器通过 CCID 协议将智能卡与计算机进行连接,使得计算机可以与智能卡进行通信,实现对智能卡的各种操作。 使用 USB CCID智能卡读卡器可以通过 USB 接口与计算机连接,并通过 CCID 协议进行数据传输。用户可以通过计算机与智能卡进行交互,如读取智能卡上的身份认证信息、存储电子证书、进行数字签名、加解密等操作。同时,通过 USB CCID 规范,可以方便地使用智能卡进行各种安全认证应用,如电子银行、电子身份认证等。 USB CCID 不仅提供了一个标准的通信协议,也提供了一个标准的设备驱动程序接口,使得不同厂商的智能卡读卡器可以统一兼容,减少了对不同供应商的设备进行适配、驱动的问题。同时,使用 USB 接口也使得智能卡读卡器的使用更加便捷,不再依赖于特定的硬件接口。 总之,USB CCID 是一种用于智能卡读卡器的通信协议和设备类别规范,通过 USB 接口连接计算机和智能卡,实现智能卡的读写、交互功能,为各种安全应用提供了便利性和统一性。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值