Important!

Blog moved to https://blog.apdu.fr/

I moved my blog from https://ludovicrousseau.blogspot.com/ to https://blog.apdu.fr/ . Why? I wanted to move away from Blogger (owne...

Sunday, June 23, 2013

CCID descriptor statistics: bMaxCCIDBusySlots

Article from the serie "CCID descriptor statistics"

The bMaxCCIDBusySlots field is a number value from the CCID USB descriptor: Maximum number of slots which can be simultaneously busy.
If the CCID does not support queuing, it reports bMaxCCIDBusySlots equal to 01h; which means that the CCID will treat all commands synchronously.

bMaxCCIDBusySlots#%
125198.82 %
010.39 %
210.39 %
510.39 %


The normal value for a CCID interface is 1.

The value 0 is bogus. If only 0 slot can be busy (used) then the reader can be used at all. This is the case of the Feitian Technologies FT SCR310 reader.

The value 2 is used by the COVADIS Auriga reader. This reader also declares 3 slots (bMaxSlotIndex: 0x02) so 2 slots (among 3) can be used at the same time.

The value 5 is used by Teridian Semiconductors TSC12xxFV.09. This reader has 5 slots (bMaxSlotIndex: 0x04). So all the 5 slots can be used at the same time.

My CCID driver do not use this value. Only one slot of a reader can be used at the same time. This may evolve but only few readers would benefit some this improvement.

CCID descriptor statistics: bInterfaceNumber

Article from the serie "CCID descriptor statistics"

The bInterfaceNumber field is a number value from the USB descriptor: Number of this interface. Zero-based value identifying the index in the array of concurrent interfaces supported by this configuration.

bInterfaceNumber#%
020781.50 %
13614.17 %
2103.94 %
410.39 %


Many CCID readers only have 1 interface. So the CCID interface is numbered 0.

Readers with 2 or more interfaces are composite devices. They can be either a reader with 2 CCID interfaces or a device with a CCID interface and other interfaces like a mass storage.

Readers with 2 (or more) CCID interfaces are listed in more than one list. For example the "Gemalto Prox Dual USB PC LinkReader" is listed in bInterfaceNumber = 1 and also in bInterfaceNumber = 2 because one CCID interface has bInterfaceNumber = 1 and the other has bInterfaceNumber = 2. And in this the interface number 0 is HID.

The "Gemalto IDBridge K3000" is listed only in the list bInterfaceNumber = 2 because the interfaces 0 and 1 are HID and mass storage.

Readers with bInterfaceNumber = 1:
  • Broadcom Corp 5880
  • C3PO LTC32
  • C3PO TLTC2USB
  • Cherry GmbH SmartBoard XX1X
  • Cherry GmbH SmartBoard XX33
  • Cherry GmbH SmartBoard XX44
  • Dell Dell Smart Card Reader Keyboard
  • Dell keyboard SK-3106
  • Fujitsu Siemens Computers SmartCard Keyboard USB 2A
  • Fujitsu Siemens Computers SmartCard USB 2A
  • FujitsuTechnologySolutions GmbH SmartCase KB SCR eSIG
  • Gemalto Gem e-Seal Pro USB Token
  • Gemalto Prox Dual USB PC LinkReader
  • Gemalto Prox SU USB PC LinkReader
  • Gemalto Smart Enterprise Guardian Secure USB Device
  • Hewlett-Packard Company HP USB CCID Smartcard Keyboard
  • Hewlett-Packard Company HP USB Smart Card Keyboard
  • Identive Identive CLOUD 4500 F Dual Interface Reader
  • Identive Identive CLOUD 4510 F Contactless + SAM Reader
  • Identive Identive CLOUD 4700 F Dual Interface Reader
  • Identive Identive CLOUD 4710 F Contactless + SAM Reader
  • KOBIL Systems mIDentity M
  • KOBIL Systems mIDentity XL
  • MYSMART MySMART PAD V2.0
  • Morpho MSO1350 Fingerprint Sensor & SmartCard Reader
  • Morpho MSO350/MSO351 Fingerprint Sensor & SmartCard Reader
  • Neowave Weneo
  • Verisign Secure Storage Token
  • Yubico Yubikey NEO OTP+CCID

Readers with bInterfaceNumber = 2:
  • Broadcom Corp 5880
  • C3PO KBR36
  • Gemalto IDBridge K3000
  • Gemalto Prox Dual USB PC LinkReader
  • Gemalto Prox SU USB PC LinkReader
  • KOBIL Systems mIDentity 4smart AES
  • KOBIL Systems mIDentity 4smart
  • KOBIL Systems mIDentity fullsize AES
  • KOBIL Systems mIDentity fullsize
  • KOBIL Systems mIDentity visual

Readers with bInterfaceNumber = 4
  • KOBIL Systems IDToken

Wednesday, June 12, 2013

New version of libccid: 1.4.11

I just released a version 1.4.11 of libccid the free software CCID class smart card reader driver.

Changes:
1.4.11 - 12 June 2013, Ludovic Rousseau
  • Add support of
    • Gemalto IDBridge CT30
    • Gemalto IDBridge K30
    • SCM Microsystems Inc. SCL010 Contactless Reader
    •  SCM Microsystems Inc. SDI011 Contactless Reader
    • THRC reader
  • Better management of time extension requests
  • parse: better support of devices with bInterfaceClass = 0xFF
  • udev rule file: Remove setting group to pcscd, remove support of Linux kernel < 2.6.35 for auto power up management
  • some minor bugs removed

Friday, June 7, 2013

CCID descriptor statistics: bLength

Article from the serie "CCID descriptor statistics"

The bLength field is a number value from the USB descriptor: Size of this descriptor in bytes

bLength#%
0x36254100.00 %


The CCID descriptor has a fixed size. So all the CCID devices use the same value.

CCID descriptor statistics: bInterfaceSubClass

Article from the serie "CCID descriptor statistics"

The bInterfaceSubClass field is a number value from the CCID USB descriptor: Subclass code.

bInterfaceSubClass#%
024897.64 %
9251.97 %
110.39 %


The only value documented in the CCID specification is 0. I have no idea why some readers use a different value.

According to USB specification version 2.0:
Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bInterfaceClass field.
If the bInterfaceClass field is reset to zero, this field must also be reset to zero.
If the bInterfaceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.

Device with bInterfaceSubClass = 1 is:
  • ActivCard ActivCard USB Reader V2

Devices with bInterfaceSubClass = 92 are:
  • Dell keyboard SK-3106
  • Gemalto Gem e-Seal Pro USB Token
  • MYSMART MySMART PAD V2.0
  • Verisign Secure Storage Token
  • Verisign Secure Token

CCID descriptor statistics: bInterfaceProtocol

Article from the serie "CCID descriptor statistics"

The bInterfaceProtocol field is a number value from the CCID USB descriptor: Protocol code
For Integrated Circuit(s) Cards Interface Devices (CCID) 00h
Note: For competitiveness, values 01h and 02h are reserved for Integrated Circuit(s) Cards Devices (USB-ICC) and other values are reserved for future use. USB-ICCs are out of the scope of this specification.

bInterfaceProtocol#%
024395.67 %
283.15 %
131.18 %




USB-ICC devices are USB devices with the same chip for reader and smart card. They are aften called token.
They follow a different USB specificiation: "Device Class: Smart Card ICCD", Revision 1.0, April 2005.
According to this specification:
The given value indicates the transfer mode used for the communication between the host and the USB-ICC.
00h bulk transfers optional interrupt-IN
01h version A, Control transfers, (no interrupt-IN)
02h version B, Control transfers (optional interrupt-IN).
Version A ICCD tokens are:
  • ActivCard ActivCard USB Reader V2
  • BIFIT iBank2Key
  • SchlumbergerSema SchlumbergerSema Cyberflex Access

Version B ICCD tokens are:
  • Gemalto PDT
  • Giesecke & Devrient GmbH Star Sign Card Token 350 (ICCD)
  • Giesecke & Devrient GmbH Star Sign Card Token 550 (ICCD)
  • KEBTechnology KONA USB SmartCard
  • OCS ID-One Cosmo Card USB Smart Chip Device
  • Philips Semiconductors JCOP41V221
  • Philips Semiconductors SmartMX Sample

CCID descriptor statistics: bInterfaceClass

Article from the serie "CCID descriptor statistics"

The bInterfaceClass field is a number value from the USB descriptor: Class code (assigned by the USB-IF).
A value of zero is reserved for future standardization.
If this field is set to FFH, the interface class is vendor-specific.
All other values are reserved for assignment by the USB-IF.

bInterfaceClass#%
0x0B [Chip Card Interface Device Class (CCID)]24094.49 %
0xFF145.51 %


The CCID 1.1 specification gives/imposes the value 0Bh. FFh is for proprietary devices.

As with the bDescriptorType field it is not suprising that thevast majority of devices use the standardized value 0Bh.

The 14 devices with bInterfaceClass = 0xFF are:
  • Cherry GmbH SmartTerminal ST-2xxx
  • Dell keyboard SK-3106
  • Gemalto Gem e-Seal Pro USB Token
  • MYSMART MySMART PAD V2.0
  • NTT Communications Corp. SCR3310-NTTCom USB SmartCard Reader
  • OCS ID-One Cosmo Card USB Smart Chip Device
  • SCM Microsystems Inc. SCR 331-DI
  • SCM Microsystems Inc. SCR331-DI USB Smart Card Reader
  • SCM Microsystems Inc. SDI010 Smart Card Reader
  • SCM Microsystems Inc. SDI011 Contactless Reader
  • SCM Microsystems Inc. SPR 532
  • SchlumbergerSema SchlumbergerSema Cyberflex Access
  • Verisign Secure Storage Token
  • Verisign Secure Token


CCID descriptor statistics: bDescriptorType

Article from the serie "CCID descriptor statistics"

The bDescriptorType field is a number value from the USB CCID descriptor: Functional Descriptor type.

bDescriptorType#%
0x2124998.03 %
0xFF51.97 %


The CCID 1.1 specification gives/imposes the value 21h. FFh is for proprietary devices.
It is then not suprising that thevast majority of devices use the standardized value 21h.

The 5 devices with bDescriptorType = 0xFF are:
  • Dell keyboard SK-3106
  • Gemalto Gem e-Seal Pro USB Token
  • MYSMART MySMART PAD V2.0
  • Verisign Secure Storage Token
  • Verisign Secure Token