ACR128 Dual Interface Smart Card Reader
7.2 Authentication
The “Authentication command” uses the keys stored in the reader to do authentication with the
MIFARE 1K/4K card (PICC). Two types of authentication keys are used: TYPE_A and TYPE_B.
Table 23-a: Load Authentication Keys APDU Format (6 Bytes) #Obsolete
Command
Class INS P1
P2
P3
Data In
Authentication
FF 88
00
Block
Number
Key
Type
Key Number
Table 23-b: Load Authentication Keys APDU Format (10 Bytes)
Command
Class INS P1
P2
Lc Data In
Authentication
FF
86 00 00 05
Authenticate
Data
Bytes
Table 23-c: Authenticate Data Bytes (5 Byte)
Byte1
Byte 2 Byte 3
Byte 4
Byte 5
Version
0x01
0x00 Block
Number
Key Type
Key Number
Block Number:
1 Byte. This is the memory block to be authenticated.
Key Type
: 1 Byte
0x60 = Key is used as a TYPE A key for authentication.
0x61 = Key is used as a TYPE B key for authentication.
Key Number
: 1 Byte
0x00 ~ 0x1F = Non-volatile memory for storing keys. The keys are permanently stored in the
reader and will not be erased even when the reader is disconnected from the PC. It
can store up to 32 keys.
0x20
= Volatile memory for storing keys. The keys will be erased when the reader is
disconnected from the PC. Only 1 volatile key is provided. The volatile key can be
used as a session key for different sessions.
NOTE:
For MIFARE 1K Card, it has a total of 16 sectors and each sector consists of 4 consecutive
blocks. E.g. Sector 0x00 consists of Blocks {0x00, 0x01, 0x02 and 0x03}; Sector 0x01 consists of
Blocks {0x04, 0x05, 0x06 and 0x07}; the last sector 0x0F consists of Blocks {0x3C, 0x3D, 0x3E and
0x3F}.
Once the authentication is done successfully, there is no need to do the authentication again provided
that the blocks to be accessed belong to the same sector. Please refer to the MIFARE 1K/4K
specification for more details.
Table 23-d: Load Authentication Keys Response Format (2 Bytes)
Response
Data Out
Result SW1
SW2
Table 23-e: Load Authentication Keys Response Codes
Results
SW1
SW2 Meaning
Success 90
00
The operation is completed successfully.
Error
63
00
The operation failed.
Page
27 of 36
ACR128 API
Version 1.7 May 2008