Skip to content

pypassport is library to read and parse biometric passport.

License

Notifications You must be signed in to change notification settings

beaujeant/pypassport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pypassport

This project has been developed by the Information Security Group (ISG) from the University of Louvain (ULC). The tool allows everyone to check whether a passport resists to the attacks known in the literature.

For more information, you can read the paper from the ISG and al. published the in ACM journal: A Survey of Security and Privacy Issues in ePassports.

Installation guide

Here is the complete installation guide for pypassport on Linux (tested on Ubuntu 18.08 64bit) with an ACR122 using python 3.11.

Install pypassport

You first need to download the latest version of pypassport:

sudo apt install git
git clone https://github.com/beaujeant/pypassport.git

Once the repository cloned, you need to install the dependencies:

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install pycryptodome
pip install ecdsa
pip install pyasn1
pip install Pillow
pip install pyscard

Install driver

You then need to unplug the reader, then install the following resource:

sudo apt install libusb-dev
sudo apt install pcscd

ACR

For the ACR122 from acs, you need to unplug the reader, then install the driver available here: https://www.acs.com.hk/en/driver/3/acr122u-usb-nfc-reader/

For instance, if you are on Ubuntu 18.08 64-bit:

cd /tmp/
wget https://www.acs.com.hk/download-driver-unified/10312/ACS-Unified-PKG-Lnx-116-P.zip
unzip ACS-Unified-PKG-Lnx-116-P.zip
cd ACS-Unified-PKG-Lnx-116-P/acsccid_linux_bin-1.1.6/ubuntu/bionic/
sudo dpkg -i libacsccid1_1.1.6-1~ubuntu18.04.1_amd64.deb

Once installed, you need to unload the pn533:

sudo rm -r /lib/modules/*/kernel/drivers/nfc/pn533

Now you should be able to use your reader. You can connect your reader and test if the driver has been properly installed with the following command:

sudo service pcscd stop
sudo pcscd -f -d
# "Ctrl + C" to quit

When placing your passport on the reader, you should see something similar to:

00001241 eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000010 eventhandler.c:421:EHStatusHandlerThread() Card inserted into ACS ACR122U 00 00
00000008 Card ATR: 12 23 34 45 56 67 78 89 90 01 12 23 34 45 56 67 78 89 90 01

Troubleshooting

Failure to list reader

If you have the following error message:

'Failure to list readers: Service not Available.'.
Please check your passport is on the reader

Close ePassportViewer and run the following command:

sudo service pcscd restart

About

pypassport is library to read and parse biometric passport.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages