BALTECH SDK wrapper functions reference

§ brp_Desfire_VirtualCardSelect()

brp_errcode brp_Desfire_VirtualCardSelect ( brp_Desfire_VirtualCardSelect_t  params)

This command selects a virtual card.

Parameters
[in]paramsStruct with the following fields:
  • protocol used to execute the command
  • ForceVcsAuthentication (in) Forces authentication to a virtual card. A card without encryption returns BRP_Desfire_VcsAndProxCheckError
  • UseExtVcSelectKeys (in) Authenticates to a virtual card. A MAC and a encryption key has to be specified. Use (external) Virtual Card keys given as command parameter.
  • DiversifyMacKey (in) Diversifies VC Mac key. Remarks for use of divinput: VC-UID is obtained by decryption of the card response. If VC-UID is concatenated with divinput the input wil be limited to 31 bytes.
  • DiversifyEncKey (in) Diversifies VC Encryption key
  • UseVcSelectKeys (in) Authenticates to a virtual card. A MAC and a encryption key has to be specified. Use Keys stored in CryptoMemory or SAM.
  • IID (in) Virtual Card Identifier.
  • IID_len (in) Length of IID (in bytes).
  • EncKeyIdx (in) Crypto Memory Index (SAM or CryptoMemory) of virtual card select key * SAM: MSByte: Key version / LSByte: KeyIdx * Crypto Memory: MSByte: Page (0..15) / LSByte: KeyIdx (0x80-0xBF)
  • MacKeyIdx (in) Crypto Memory Index (SAM or CryptoMemory) of MAC key * SAM: MSByte: Key version / LSByte: KeyIdx * Crypto Memory: MSByte: Page (0..15) / LSByte: KeyIdx (0x80-0xBF)
  • DivData (in) Key diversification according to NXP AN10922.
  • DivData_len (in) Length of DivData (in bytes).
  • EncKey (in) VC encryption key
  • EncKey_len (in) Length of EncKey (in bytes).
  • MacKey (in) VC MAC key
  • MacKey_len (in) Length of MacKey (in bytes).
  • FciType (out) 0: raw data 1: uid_len(1) and card type(1) 2: uid_len(1), card type(1) and memory size(1)
  • Fci (out) File control information
  • Fci_len (out) Length of Fci (in bytes).
  • mempool (in) is used to store response data. Maybe NULL to use an internal mempool, in this case the data is only available until another command uses the internal mempool