https://github.com/githuseyingur/acs_pinpad_tc_identity_pin_verify
ACS Smart Card Reader (Pinpad) TC Identity Card Pin Verification (ACS Smart Card Pinpad Türkiye Cumhuriyeti Kimlik Kartı Pin Doğrulama)
https://github.com/githuseyingur/acs_pinpad_tc_identity_pin_verify
acs acs-id-card-pin-verify acs-pin-verify acs-smart-card acs-smartcard acs-tc-id-card pin-pad pin-verify pinpad smart-card smart-card-reader smartcard smartcard-io smartcard-reader smartcardio
Last synced: about 2 months ago
JSON representation
ACS Smart Card Reader (Pinpad) TC Identity Card Pin Verification (ACS Smart Card Pinpad Türkiye Cumhuriyeti Kimlik Kartı Pin Doğrulama)
- Host: GitHub
- URL: https://github.com/githuseyingur/acs_pinpad_tc_identity_pin_verify
- Owner: githuseyingur
- Created: 2023-09-09T11:13:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-18T06:33:44.000Z (8 months ago)
- Last Synced: 2025-01-28T14:19:17.087Z (4 months ago)
- Topics: acs, acs-id-card-pin-verify, acs-pin-verify, acs-smart-card, acs-smartcard, acs-tc-id-card, pin-pad, pin-verify, pinpad, smart-card, smart-card-reader, smartcard, smartcard-io, smartcard-reader, smartcardio
- Language: Java
- Homepage:
- Size: 3.33 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Verify TC Identity Card PIN from ACS Smartcard Reader
NOTE : This code is originally sourced from the "ACS Smart Card Reader Code Sample For Android" and has been modified.
We need APDU commands for PIN Verification. These APDU commands vary according to the type of the card. Since the card we will use is a TC ID card, we need to work with IAS-specific APDU commands. These values are as follows:
![]()
Since a 6-digit pin will be entered, we need to enter a minimum value of 6 and a maximum value of 6, that is 0606, in the Pin Extra Digit field. The data in the 'abData' section is important. This data is CLA, INS, P1, P2 and L*p* (length of the pin to be entered) respectively.#### abData : CLA, INS, P1, P2, Lp
***CLA (Class Byte):*** The class indicates the type of operation to be performed, e.g. whether it is a basic operation or a special operation. For example, the CLA byte "00" often represents basic operations, while the CLA byte "80" may represent special operations.
***INS (Instruction Byte):*** The INS byte specifies the specific instruction to be executed. This byte tells the board what operation to perform.
***P1 (Parameter 1):*** The P1 byte indicates whether the command is associated with a specific parameter. For example, in a command to change a PIN code, the P1 byte can specify which PIN to change.
***P2 (parameter 2):*** The P2 byte, used in conjunction with P1, specifies how the command is further associated with additional parameters. It is particularly used for more specific commands. For example, if the P1 byte indicates that a PIN is to be changed, the P2 byte can specify what operation is to be performed (e.g. changing the PIN code).
![]()
![]()
![]()
#### Response : *90 00* (Successful)
A response is returned as a result of the pin verification process.
If this response is *90 00*, it means that the pin verification process was successful.Complete list of APDU responses : https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses
##### Thanks to Muhammed Hoşgör : https://github.com/muhammedhosgor