Read secured data from DESFire cards or tags

MIFARE DESFire cards may contain a number of applications, identified by an application ID. Each application may contain a number of data files and a number of cryptographic keys, for use with either the AES or 3DES ciphers. Each file is identified with a file ID and may be individually protected, requiring authentication with one of the application keys, for read or write access and for communications security.

To read data from a DESFire card, the config.txt file for your VTAP reader must specify the application ID and file ID, where the required data is stored. The VTAP reader supports a number of formats and options to read, decode or output the secure data. To read any protected data you also need to load the appropriate key into one of the VTAP reader’s app key slots, and specify in the config.txt file the crypto algorithm, the key number (within the card’s application) and the corresponding VTAP app key slot, where that key has been loaded.

After looking at reading data from individually secured files on DESFire cards in this section, the next page will look at how to Read data when key diversification is used, which adds an extra layer to the decoding process.

VTAP reader configuration to read your secure DESFire cards

Read multiple applications or files in the same DESFire card

You may need to read and output values from multiple applications or files within the same DESFire card, where all the applications may have different security requirements.

The VTAP readers can read up to 6 applications within the same DESFire card, access them separately (according to their corresponding security requirements), and output the values, concatenated with a defined separator.

To use this feature, DESFire... settings become DESFire#... settings, where # is a number from 1 to 6. The number shows which settings form a group for reading each of 1 to 6 values from separate files and or applications on a DESFire card or tag. If you use multiple DESFire#... settings the values read will be output together, spaced by the DESFireSeparator string. The lowest numbered DESFire read will be first in the output string, then continuing in ascending numeric order.

Note: If a number is not used in DESFire... settings, then the VTAP reader would treat those settings as DESFire1... For example DESFireCrypto or DESFireFileID would be considered as DESFire1Crypto and DESFire1FileID.

Use DESFireSeparator (defaults to ",") to set a separator character(s) between the outputs of all the DESFire applications. Up to 16 characters can be used and URL encoding is also supported.

When using the Wiegand interface, multiple reads are not supported. In this case, only the lowest numbered DESFire#... settings will be used, which might not be DESFire1.... If only DESFire3... and DESFire4... settings are defined in config.txt, the DESFire3... settings would then be used for output over Wiegand.