Document Version 1.00
Last revised on
Page 78 of 87
2020-04-10
Reference Manual for uTrust 3720F and uTrust 3721F Readers
MIFARE key data
Key Number
(1 byte)
Key Type
(1 byte)
Key
(6 bytes)
Where,
Key Number – any value from 0x00 to 0x4F
Key Type
- 0x60 (Key Type A) for 0x61 (Key Type B)
Response:
Data
Status Word
-
SW1
SW2
Example to load MIFARE keys with PCD Key Number = 0x00, Key Type = Key A
APDU: FF 00 00 00 0A 07 00 00 60 FF FF FF FF FF FF
RESPONSE: 90 00
6.4.2.3.
Load DESFire Authentication Keys into Reader
The following command can be used to load DESFire authentication keys into the reader.
Command APDU:
CLA
NS
P1
P2
Lc
Data
Le
0xFF
0x00 0x00 0x00 0x1F 0x07
0x01
DESFire key data
(as shown below)
-
DESFire key data
PCD Key Number
(1 byte)
AID
(3 bytes)
PICC Key Number
(1 byte)
Key 1
(8 bytes)
Key 2
(8 bytes)
Key 3
(8 bytes)
Where,
PCD Key Number
– any value from 0x00 to 0x04
Key number 0x00 refers to PICC master key
Key numbers 0x01 to 0x03 refer to Application keys
AID
- Application identifier in the card to which the key belongs
Must be 000000 for PICC master key
PICC Key Number
- Key number to be used in the DESFire Authenticate command
Key (1-2-3)
- Can be DES/TDES or AES key
DES key: (Key 1 = Key 2)
TDES key: (Key 1 ≠ Key 2); (Key 1 = Key 3)
AES key: (Key 3 = all zeros)