This code reads the MyKad identification card using a smart card reader. It selects the JPN (Jabatan Pendaftaran Negara, National Registration Department) application and reads data from various files, including the user's photograph.
To use this code, you will need the following:
- A smart card reader
- The smartcard package for Python (which can be installed via pip)
- A MyKad identification card
This program sends apdu commands to mykad to obtain data from mykad. Different apdu command is needed to read different jpn files. The info read is then stored in json files.
- Extract the zip file.
- Insert a MyKad into the smart card reader.
- Run mykad.exe in /dist/.
- The program is started and running in background (mykad.exe).
- The script will automatically detect the insertion of the card, select the JPN application, and read data from various files, including the user's photograph.
- After reading, data is stored in 2 json file.
- The user's photograph will be saved as a JPEG file named "photo.jpg" in the current directory.
- View data in index.php.
- If user wants to read another myKAD, remove the inserted card and insert another myKAD.
Extract biometric template from MyKAD and use it for biometric verification (Decryption is needed).
Guidelines for Securing MyKAD Enhanced Biometric Access (EBA) Ecosystem