netlink.lua: peek into the world-readable contents of NETLINK healthcare smartcards
NETLINK has been a project founded by the European Commission to establish the processes and technology needed to create and pilot a well-documented, cross-country technical standard for healthcare cards.
The objective: simplification of administrative procedures for EU citizens, introduction of smart-cards with personal data protected by a PIN but also retrievable from a certified doctor, and basic "free" data readable by any smart card reader.
The pilot countries were Italy, France, Germany and the Province of Quebec (Canada). Some other countries likely started compatible pilots after the first wave (to be verified). Confirmed is the current usage of NETLINK cards in Italy, under the names CRS (Carta Regionale dei Servizi), CNS (Carta Nazionale dei Servizi) or TS (Tessera Sanitaria) for patient cards.
The script
The netlink.lua
script (and libraries in the "netlink" subdirectory) are designed for
Cardpeek, a tool to read and interpret smart card contents. Cardpeek can
be easily extended to recognize additional cards by writing new scripts and hooking them into the graphical UI, which
is exactly what netlink.lua
does.
The card structure is very much a small set of huge TLV-coded files, the real challenge was navigating through the tags and finding out their names and correct interpretation. Also, since many extension or finer details are country-specific, the script is shipped with a l10n directory; the only localisation is the Italian subroutine that uses national codes to detect cities and organisations, and look for extensions which are regularly shipped with national cards.
I only own two cards, none of which has had its PIN set, so I can't access the protected area, nor have I implemented the logic to unlock it. Nevertheless, the card free data contains detailed information such as:
- Patient identification: names, birth, addresses, national ID, issuer organisation
- Administrative data: insurance code, validity, known doctors' details
- Emergency data: illnesses, current medications and prescription
- (Italian cards only) Certificates: X.509 certificate for document signature
License
The specification source is the Agenzia per l'Italia Digitale, whose documents have been released under the CC-BY 3.0. Nevertheless, this software is not a derivative work but merely follows the specification, and is thus released under the terms of the GPLv3 or any later version. See the details.
Download
Version | Format | Download | Size |
---|---|---|---|
0.1 | zip | netlink.lua-0.1.zip | 38.31k |
tar.xz | netlink.lua-0.1.tar.xz | 26.11k |