BALTECH SDK wrapper functions reference

§ brp_Desfire_Authenticate()

brp_errcode brp_Desfire_Authenticate ( brp_Desfire_Authenticate_t  params)

This command authenticates a card with the reader.

All authentication modes of DESFire cards are supported. Subsequent commands, such as brp_Desfire_ExecCommand(), take the authentication mode into account when communicating with a card.

The key used for authentication is specified in the Device / CryptoKey key of the reader's configuration.

Parameters
[in]paramsStruct with the following fields:
  • protocol used to execute the command
  • SecureMessaging (in) Sets the secure messaging mode.
  • DesKeynr (in) DESFire key number.
  • KeyId (in) ID of authentication key in the reader's configuration (0x00-0xBF).
  • KeyHasDivData (in) Specifies external diversification data (KeyDivData parameter) if set.
  • KeyDivMode (in) Specifies diversification algorithm.
  • KeyHasExtIdx (in) Set this flag if extended crypto memory is used (using KeyExtIdx parameter).
  • KeyDivData (in) Diversification data (8 byte for DES / 16 for AES key).
  • KeyDivData_len (in) Length of KeyDivData (in bytes).
  • KeyExtIdx (in) Crypto Memory Index (SAM or CryptoMemory) of authentication key * SAM: Key version (0..0xFF) * Crypto Memory: Page (0..15)