italia / cie-PN532

Arduino library for SPI and I2C access to the NFC chip in the Italian Electronic Identity Card (CIE)
BSD 3-Clause "New" or "Revised" License
23 stars 8 forks source link

Development of an Arduino library for reading the NIS code #1

Closed alranel closed 6 years ago

alranel commented 6 years ago

Reading most data from an Italian Electronic Identity Card (CIE) requires user interaction for entering a PIN. This is handled by the middleware which runs on a full fledged operating system. Still, there's an important bit of information which can be retrieved from a CIE without any pin, just by swiping it on a NFC reader: it's the NIS code which identifies each card uniquely.

The NIS code can be mapped to the person's Codice Fiscale just by querying a web service operated by the Government (not available yet). Such feature allows third parties to use CIE cards for access turnstiles (offices, gyms, etc.) because users can be mapped to the local database using the Codice Fiscale.

It would be very useful if people could read the NIS code using an Arduino connected to a NFC card reader. Any reader which supports ISO14443 works with CIE. The most common NFC chip for Arduino is the PN532 which supports that standard, so it should just work (although nobody tested so far).

The most complete library for lower level access to PN532 is the one from Adafruit: https://github.com/adafruit/Adafruit-PN532

See https://github.com/italia/cie-nis-sdk/issues/1 for more guidance.

(Hint for people participating in the Hack.Developers code sprint: build an actual physical prototype! We will have test CIE cards in the 5 main locations.)

andreavalle commented 6 years ago

Hi Alex, has anything been developed around this at the Hack Dev? I'm interested to contribute. I would like to know if the APDU specs for the CIE are available somewhere, otherwise I think it would be hard...

ruphy commented 6 years ago

@andreavalle I just merged a PR which should be a great starting point :wink: if you still have issues feel free to open a new report!