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 Lp (length of the pin to be entered) respectively.
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).
![](https://private-user-images.githubusercontent.com/120099096/277252756-055f302a-19e1-42ac-909e-953b3c6b6302.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3ODk4MjYsIm5iZiI6MTcyNDc4OTUyNiwicGF0aCI6Ii8xMjAwOTkwOTYvMjc3MjUyNzU2LTA1NWYzMDJhLTE5ZTEtNDJhYy05MDllLTk1M2IzYzZiNjMwMi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMDEyMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNTJiNTNkM2M2NWE1ZDkwMGFiYmE5OGY2ODczOWU5ZDA2Yjk3N2RjMjg2NGNhOTBhNzUwYjc1YmFlZjQyM2U4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3vBwLYDv2ATcjm_OBe-dX5asD_2PkDNZVCHFo9W3lSM)
![](https://private-user-images.githubusercontent.com/120099096/277252887-3ca7bdf7-b78d-4365-9188-f9b52e85fac6.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3ODk4MjYsIm5iZiI6MTcyNDc4OTUyNiwicGF0aCI6Ii8xMjAwOTkwOTYvMjc3MjUyODg3LTNjYTdiZGY3LWI3OGQtNDM2NS05MTg4LWY5YjUyZTg1ZmFjNi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMDEyMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mODQyMmI4NTk5NTkyNDUxZDRlNDMwMWY3NjIzZWZlZTA0YWZiNmM0MDMyY2QwMjU0NmZlYmM4NjZmZTlkYTk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-53wdsTyIeccFMbBWuHOt7vxomPeneLKEKO2wul7njY)
![](https://private-user-images.githubusercontent.com/120099096/277252830-70bc14ab-5b9e-478d-887d-e1413209ebaa.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3ODk4MjYsIm5iZiI6MTcyNDc4OTUyNiwicGF0aCI6Ii8xMjAwOTkwOTYvMjc3MjUyODMwLTcwYmMxNGFiLTViOWUtNDc4ZC04ODdkLWUxNDEzMjA5ZWJhYS5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMDEyMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMDNjMTQ5YzUyNGE2MDkzMTkyZDA4YmE1OGFlZWVkNzIzNjUzMTBiNzhlNjAzODIwZTQ0M2RmMGYwODBkNjBhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AaK3mWHx7pKmMgeGjLXjXvH3ajpnuRArUekWr5nK1Ho)
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