Tuesday, July 7, 2020

Smart card Usage in Debian: pcscd and drivers

Debian uses a system to evaluate the popularity of packages called: popularity-contest

Each package has a popcon page with the number of installations of the package and its evolution in time.


Not every Debian user has the package popularity-contest installed (and enabled). Example with the graph of popularity-contest itself.
The package is installed on 198 548 Debian systems. But we can imagine that Debian is installed in much more than 200 000 systems.

The popularity-contest package is also available in Ubuntu. The Ubuntu results are also available. On Ubuntu the popularity-contest package is installed in 2 796 046 systems. We have a factor of x14 compared to Debian.

So what is important is not the absolute value of installations but the evolution in time and the percentages of installed systems.
I was not able to find the graphs for Ubuntu. So I will only use the results on Debian.


pcsc-lite software provides 3 packages: the daemon, the library, the development files. Here we see the 3 packages on the same graph.

libpcsclite1 is, by far, the most installed package. This is because (nearly) all smart card application uses PC/SC and so depends on libpcsclite1.

Package # of installation % of Debian systems
libpcsclite1 124551 62.63%
pcscd 23796 11.96%
libpcsclite-dev 1001 0.50%

On Ubuntu we have:
Package # of installation % of Ubuntu systems
libpcsclite1 2019980 72.2%
pcscd 32834 1.17%
libpcsclite-dev 9494 0.34%


The number of installations of libpcsclite1 is much higher than the number of installation of pcscd. But libpcsclite1 is useless without pcscd.

This is because libpcsclite1 is a dependency of some packages that provides a smart card support but not every user is using it. For example wpasupplicant depends on libpcsclite1 but not every users of wpasupplicant are using a smart card.


The two spikes occurred when I changed the dependency between libpcsclite1 and pcscd. When libpcsclite1 depends on pcscd then each installation of libpcsclite1 will also install pcscd. See Debian bugs #476483 and #612971.
After I solved the 2 bugs the level went down.

The rise that starts in 2017 should indicate a real use of smart card since that date. That is a good sign.

From the 2 tables above we can notice that pcscd is installed in x10 more Debian systems (11.96%) than Ubuntu systems (1.17%).
My interpretation is that Debian users are more security conscious and use more smart cards than Ubuntu users.


This package is needed only if you want to build applications using PC/SC. It is expect to have a number of installation far lower than the number of pcscd installations.

Smart card drivers

On Debian, smart card drivers should each provide the virtual package: pcsc-ifd-handler

Package # installations "market share"
libccid 23791 96.06%
libacsccid1 483 1.95%
libifd-cyberjack6 282 1.14%
libasedrive-usb 68 0.27%
libgempc430 54 0.22%
29 0.12%
libasedrive-serial 23 0.09%
libtowitoko2 22 0.09%
libgempc410 15 0.06%


CCID is the USB standard for USB smart card readers.
It is also the default driver installed with pcscd. It is then expected that the pcscd and libccid graphs are quiet similar.


The libacsccid1 driver is a (friendly) fork of my libccid driver adapted to some ACS readers.


This driver is for REINER SCT cyberJack USB chipcard readers.


This driver is for Athena ASEDrive IIIe serial and USB devices.

GemPC 410 & 430

I am also the upstream maintainer of 2 other drivers:
  • libgempc410 is a driver for the Gemplus GemPC 41x serial readers.
  • libgempc430 is a driver for the Gemplus GemPC 43x USB readers.
These readers are older than the CCID specification document.
    I am surprised to see systems with these drivers installed. I have not used them myself since ages.


    This driver is for Gemplus GCR410 serial device.


    This driver is for Towitoko smartcard reader PCSC and CT-API driver.


    Around 12% of Debian users are using smart cards. I would not have expected so much.
    The percentage on Ubuntu, 1%, is (I imagine) more representative of the general population.