hufon/cnie-python-tools — explained in plain English
Analysis updated 2026-05-18
Research how the chip in a French national identity card authenticates and protects its data.
Extract the machine readable text and photo stored on your own identity card for testing.
Verify that the data read from a card's chip matches its stored security hashes.
Learn how PACE-CAN authentication and secure messaging work on real government issued smart cards.
| hufon/cnie-python-tools | agricidaniel/claude-shorts | calesthio/generative-media-skills | |
|---|---|---|---|
| Stars | 93 | 93 | 93 |
| Language | Python | Python | Python |
| Setup difficulty | hard | moderate | easy |
| Complexity | 5/5 | 3/5 | 2/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a compatible PC/SC smart card reader plus OS-level driver packages before the Python tool will work.
This is an experimental Python toolkit for reading the chip inside the newer French national identity card, using a physical smart card reader plugged into your computer. It is built for education and research, and the author says it should only be used on cards you own or have explicit permission to read. Since 2021, French identity cards have carried a chip that stores a person's basic details and photo in a standardized format used on passports and ID cards worldwide. To talk to that chip, the tool first proves it has permission by using a six digit access code printed on the front of the card, then sets up an encrypted channel so nothing sent back and forth can be read by anyone else nearby. Once connected, it reads the different sections of data stored on the chip: the machine readable text at the bottom of the card, the passport style photo, and some additional personal fields such as address, birth place, and height, though those extra fields are read on a best effort basis since their exact layout is not fully documented. It also checks the digital hash values on the card to confirm the data has not been tampered with, though it does not yet verify the full certificate chain behind those hashes. Importantly, the tool cannot read fingerprints or iris scans stored on the chip, since those are locked behind a separate government controlled security layer that requires an official terminal certificate the tool does not have. It needs a compatible smart card reader, works primarily with a handful of tested contact readers, and one contactless reader has also been confirmed to work by the community. Setup requires installing a smart card driver stack on Linux, then installing the Python package itself, after which a single command line tool dumps the card's contents to a folder as both raw files and a structured summary file. The project is released under the MIT license.
An experimental Python tool that reads the chip in newer French ID cards through a smart card reader, extracting the photo and printed personal data.
Mainly Python. The stack also includes Python, pyscard, PC/SC.
Use, modify, and share freely, including for commercial purposes, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
double-check against the repo, no cap.