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

Saturday, April 20, 2013

CCID descriptor statistics: iManufacturer

Article from the serie "CCID descriptor statistics"

The iManufacturer field is a text field from the USB descriptor: describing manufacturer

iManufacturer#%
Gemalto228.66 %
SCM Microsystems Inc.176.69 %
VASCO114.33 %
ACS103.94 %
Identive103.94 %
SpringCard103.94 %
KOBIL Systems93.54 %
ATMEL83.15 %
OMNIKEY AG83.15 %
Cherry GmbH72.76 %
C3PO62.36 %
Eutron62.36 %
Inside Secure62.36 %
Bit4id51.97 %
Broadcom Corp51.97 %
XIRING51.97 %
Aktiv41.57 %
Alcor Micro41.57 %
KOBIL41.57 %
Neowave41.57 %
OMNIKEY41.57 %
Athena31.18 %
COVADIS31.18 %
Giesecke & Devrient GmbH31.18 %
Precise Biometrics31.18 %
id3 Semiconductors31.18 %
ActivIdentity20.79 %
Avtor20.79 %
BIFIT20.79 %
Dell20.79 %
Feitian20.79 %
Fujitsu Siemens Computers20.79 %
Hewlett-Packard Company20.79 %
Morpho20.79 %
O220.79 %
Philips Semiconductors20.79 %
REINER SCT20.79 %
Todos20.79 %
Verisign20.79 %
Yubico20.79 %
ASK-RFID10.39 %
ActivCard10.39 %
Akasa10.39 %
Aktiv Co., ProgramPark10.39 %
Aladdin10.39 %
Axalto10.39 %
BLUTRONICS10.39 %
CCB10.39 %
Dectel10.39 %
Feitian Technologies10.39 %
Free Software Initiative of Japan10.39 %
FujitsuTechnologySolutions GmbH10.39 %
GIS Ltd10.39 %
Gemplus10.39 %
Generic10.39 %
German Privacy Foundation10.39 %
GoldKey Security10.39 %
HDZB10.39 %
Hewlett Packard10.39 %
KEBTechnology10.39 %
Kingtrust10.39 %
Lenovo10.39 %
MSI10.39 %
MYSMART10.39 %
Macally10.39 %
NTT Communications Corp.10.39 %
NXP10.39 %
OBERTHUR TECHNOLOGIES10.39 %
OCS ID-One Cosmo Card10.39 %
Panasonic10.39 %
RSA10.39 %
Raritan10.39 %
SYNNIX10.39 %
SafeTech10.39 %
SchlumbergerSema10.39 %
Secure Device Solutions10.39 %
Sitecom10.39 %
Softforum Co., Ltd10.39 %
Teridian Semiconductors10.39 %
TianYu CCID Key10.39 %
Tianyu10.39 %
VMware10.39 %
Validy10.39 %
Winbond10.39 %
charismathics10.39 %
ubisys10.39 %


A lot of readers are from different manufacturers. If you group the manufacturers by the number of readers they have produced we have:

# of reader per iManufacturer# of iManufacturer%
14653.49 %
21416.28 %
355.81 %
455.81 %
533.49 %
633.49 %
711.16 %
822.33 %
911.16 %
1033.49 %
1111.16 %
1711.16 %
2211.16 %


More than half (53%) of the readers are from a manufacturer that made only one CCID reader. 16% are from manufacturers with 2 readers.

My interpretation is that the reader chip has been designed by one of the major reader manufacturers and the reader chip has been sold to another manufacturer.

Wednesday, April 17, 2013

CCID descriptor statistics: section

Article from the serie "CCID descriptor statistics"

section#%
Should work readers17968.32 %
Supported readers5922.52 %
Unsupported readers166.11 %
Disabled readers83.05 %



Readers in the Disabled list are either completly bogus or the reader manufacturer requested me to remove them so they are supported by another CCID driver.

If we ignore the readers in the "disabled" list we have:



A large part of the readers (70%) have not been tested by me. It is not a problem if the reader is working correctly. It is more problematic if the reader is bogus. If a user reports a problem I can identify as a bug in the reader then the reader is moved in the "Unsupported list" with a note about the problem.

CCID descriptor statistics

The list of readers that do work with my CCID driver is now big enough (262 readers) to do some statistics.

I don't know how many CCID readers are available worldwide. I guess that with 262 of them I cover a large part of the market.

I do plan to do statistics with these different fields:

I will create a new blog article for each field and update the list above with links to the articles.

Tuesday, April 16, 2013

New version of libccid: 1.4.10

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

Changes:
1.4.10 - 16 April 2013, Ludovic Rousseau
  • Add support of
    • ACS APG8201 USB Reader with PID 0x8202
    • GIS Ltd SmartMouse USB
    • Gemalto IDBridge K3000
    • Identive CLOUD 2700 F Smart Card Reader
    • Identive CLOUD 2700 R Smart Card Reader
    • Identive CLOUD 4500 F Dual Interface Reader
    • Identive CLOUD 4510 F Contactless + SAM Reader
    • Identive CLOUD 4700 F Dual Interface Reader
    • Identive CLOUD 4710 F Contactless + SAM Reader
    • Inside Secure AT90SCR050
    • Inside Secure AT90SCR100
    • Inside Secure AT90SCR200
    • SCR3310-NTTCom USB SmartCard Reader
    • SafeTech SafeTouch
    • SpringCard H512 Series
    • SpringCard H663 Series
    • SpringCard NFC'Roll
    • Yubico Yubikey NEO CCID
    • Yubico Yubikey NEO OTP+CCID
  • Add support of time extension for Escape commands

Monday, April 1, 2013

New version of pcsc-perl: 1.4.13

I just released a new version 1.4.13 of pcsc-perl, the Perl wrapper for PC/SC.
This version just fixes a warning when you use Perl 5.16.

 

See the article "PCSC sample in Perl" for code sample of PC/SC in Perl.

pcsc-perl is also available at CPAN: pcsc-perl-1.4.13 with the online API documentation for Chipcard::PCSC and Chipcard::PCSC::Card.

Wednesday, March 27, 2013

Comments are now disabled

Since the beginning of this blog the comments were possible. The comment introduction text said:
Please, do only post comments related to the article above.

For general questions or bug reports, subscribe to and use the muscle mailing list.

Your comment may be moderated and will not appear until then. No need to repost the same comment.

But many readers of my blog used the comment system to ask for support on subject unrelated to the blog article. Many of the questions should have been asked on the MUSCLE mailing list. Many questions were not accepted in the (manual) moderation step.

My blog is NOT a support forum or something similar. Support request should go to the MUSCLE list. To enforce that I decided to suspend the comments from my blog.

Tuesday, March 12, 2013

Oracle, javax.smartcardio failures

In the article PCSC sample in Java I presented the javax.smartcardio package to use PC/SC from a Java application. It works except that SUN/Oracle made 2 mistakes related to the same problem: PC/SC is an API not an ABI.

API

An API is an interface used at the source code level. In C langage, you include a header file and link to the associated library. In the PC/SC case you use something like:

#ifdef __APPLE__
#include <PCSC/winscard.h>
#include <PCSC/wintypes.h>
#else
#include <winscard.h>
#endif

And then use the PC/SC functions as provided in the header file.

ABI

The ABI is an interface used at the binary level.
At the API level the type int is used. At the ABI level the representation of int is used. The difference is that the C language do not define what int is. At the ABI level the representation of int is fixed by the compiler.

Evolution of API and/or ABI

The API may evolve if a new function is added, an existing function is removed or a function signature is changed (a function parameter is added or removed for example).

Each time the API change the ABI also changes. The ABI may also evolve even if the API do not change. This is more rare but happened with C++ when GCC changed the way to pass parameters to a function/method.

To avoid incompatibility problems on GNU/Linux the library contains an versioning. It is called soname. Applications using the old API/ABI will use libfoo version n. Applications using the new API/ABI will use libfoo version n+1. It is possible to have the two library versions installed at the same time (I don't know if it is possible to do that on a Windows system).

The JVM problems

SUN/Oracle made 2 mistakes in its use of the PC/SC library.

Direct use of libpcsclite.so

As written above a library is versioned. In the case of PC/SC the library is called libpcsclite.so.1 on a GNU/Linux system. The previous version was libpcsclite.so.0. I changed the API in version 1.2.9-beta1 (May 2004). I then increased the ABI version from 0 to 1.

The file libpcsclite.so is a symbolic link pointing to the version corresponding to the installed header files. Only the linker should use that file when building an application. On a Debian (or Ubuntu) system the file libpcsclite.so is provided by the libpcsclite-dev package and not by the libpcsclite1 package.

The Oracle JVM tries to loads libpcsclite.so directly. This is wrong because:
  • This file is not installed by default when the PC/SC library is installed
  • This file do not reference a particular library version. So if the PC/SC API change again then the JVM will miserably fail.

I get many bug reports because of that. But the problem is not on the pcsc-lite side. So I can't do much.

Direct definition of DWORD


Oracle think a DWORD is a 64-bit entity on a 64-bit system. This is not always the case and is wrong on Mac OS X in 64-bits mode.

Apple defines DWORD as:
typedef uint32_t DWORD;

On Linux it is defined as:
typedef unsigned long DWORD;

If the application (the JVM in this case) and the library (PCSC framework) do not agree on the ABI (the size of a DWORD parameter) then bad things happen.

See the bug report javax.smartcardio package not working in Java 7 on OS X ML for a solution to this problem.

Conclusion

I wrote this blog article so that I can refer people at it. And so that you can refer Oracle at it.

I do not use Java. I do not know how to report a JVM bug at Oracle. If you know then please send them a link of this article.