Search code examples
authenticationnfcrfidmifarendef

MIFARE Classic standard keys


I have two NFC tags with different keys for their sectors:

  • Tag 1: This tag contains an NDEF message.

    • Sector 0 = A0:A1:A2:A3:A4:A5 for key A
    • Sector 1 to 15 = D3:F7:D3:F7:D3:F7 for key A
  • Tag 2: No NDEF data on this tag

    • All sectors = FF:FF:FF:FF:FF:FF for key A and B

Are there standard keys for MIFARE Classic tags according NDEF/non-NDEF?


Solution

  • Correct.

    The application note MIFARE Classic as NFC Type MIFARE Classic Tag defines how a MIFARE Classic tag can be used to store NDEF data. This application note defines that all sectors containing NDEF data must be readable with a key A with the value D3 F7 D3 F7 D3 F7. Consequently, all data sectors (sector >= 1) are reable with key A = D3 F7 D3 F7 D3 F7.

    Moreover, the tag must contain a MIFARE application directory where the data sectors are marked as containing the NDEF application. The application note MIFARE Application Directory (MAD) defines the structure of the MAD and it also requires that the MAD sector(s) are readable with a key A with the value A0 A1 A2 A3 A4 A5. Consequently, the MAD sector (sector 0) is reable with key A = A0 A1 A2 A3 A4 A5.

    Finally, the default transport configuration for MIFARE Classic tags (i.e. when they ship from factory) is all sectors readble and writable with key A = FF FF FF FF FF FF.