BALTECH SDK wrapper functions reference

§ brp_Mif_VirtualCardSelect()

brp_errcode brp_Mif_VirtualCardSelect ( brp_Mif_VirtualCardSelect_t  params)

Command is only supported by MIFARE Plus EV1 cards.

Selected in ISO14443-3 mode the VCSupportLastISOL3 command is executed. Selected in ISO14443-4 mode the IsoSelect command is executed If the card answers in the latter case with a Payload (UID does not match or authentication with VCSelection is mandatory) the reader executes an additional ISOExternalAuthentication command

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_Mif_VcsAndProxCheckError
  • UseExtVcSelectKeys (in) Authenticates to a virtual card. A MAC and an encryption key have 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) Type of File Control Information returned.
  • 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