Verify / erase application zone apdu – MagTek IntelliStripe65 99875161 User Manual
Page 100

IntelliStripe 65 Command Reference
94
Possible SW1/SW2 combinations:
SW1/SW2
Meaning
9000
Normal completion, no errors
6581
Memory Failure, some bits were not erased
Verify / Erase Application Zone APDU
This command is used to do two types of security operations on the card. First, it is used to
present the User Code which unlocks further functionality. Second, it is used to erase/reload
application zones by presenting the Memory Code.
Command APDU:
CLA
INS
P1
P2
Lc
Data Field
D0/D1
20/22
Tries
Adr
Len
Data to be verified
CLA is always D0 or D1 (the lowest bit specifies the state of C4)
INS is either 20(Verify) or 22(Erase Application Zone)
P1 specifies Tries, the maximum number bits which will be searched for a ‘1’ value to
write to ‘0’ in preparation for the erase sub-operation that completes the Verify/Erase
command. For application zones that do not require writing of a bit to cause erasure, use
a 00 in Tries. This will cause the erase operation to be performed on the next bit after
presentation of the Memory Code.
P2 is the byte address of the code to be verified (usually called User Code or Memory
Code). NOTE: WHEN USING Lc=0, THIS ADDRESS MUST BE THE ADDRESS OF
THE COUNTER TO BE EVALUATED (I.E. IN A 4404 THE USER CODE IS AT
ADDRESS 08H AND THE CORRESPONDING ERROR COUNTER IS AT ADDRESS
0AH. TO EVALUATE THIS COUNTER THE COMMAND APDU WOULD BE:
D0 20 04 0A 00).
Lc is the number of bytes for verification:
If the value is 00, the status 63Cx will be returned where x indicates the number
of further retries allowed, if x is F, there may be even more than 15 retries
remaining. This mode does not
use up any retries!
Response APDU:
SW1
SW2
Possible SW1/SW2 combinations:
SW1/SW2
Meaning
9000
Normal completion for Verify (INS 20). Verification was successful.
6200
Normal completion for Erase Application Zone (INS 22), no errors, but user must
verify erasure. This status could be returned even though erasure did not occur.
63Cx
Verification failed, x indicates number of further retries allowed