-3

What APDU command gets the PIN from the smart card and write the Changed PIN into the card?

For writing the code on card I have found 80 D4 00 00 08 01 02 03 04 05 06 07 08 to set pin 1 2 3 4 5 6 7 8 but we got 6D 00 in response i.e Instruction code not supported or invalid.

Or are there any WIN APIs that can be used?

Thanks in advance.

Harish
  • 1,841
  • 1
  • 13
  • 26

1 Answers1

5

Severe misunderstanding: Nothing gets the stored PIN from the card. Using the VERIFY command you can only supply a comparison value and find out, whether it is correct - if it is not, the retry counter will decrease and the PIN may block. There is the standard command CHANGE REFERENCE DATA, see ISO 7816-4, but standard commands have CLA=00 while you currently try CLA=80 (first byte of the command). 6D00 can also be found there and since it means "wrong INS code" the whole command may be wrong. (A PIN consisting of non-printable bytes is also somewhat untypical.)

Without knowing, which card you have and which specification it complies to, you will not make significant progress.

While WINSCARD may be your friend to get the command transported, it will not help in the respect of finding the correct bytes.

guidot
  • 5,095
  • 2
  • 25
  • 37