BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_Mif_VirtualCardSelect | ( | brp_protocol | protocol, |
bool | ForceVcsAuthentication, | ||
bool | UseExtVcSelectKeys, | ||
unsigned | DiversifyMacKey, | ||
bool | DiversifyEncKey, | ||
bool | UseVcSelectKeys, | ||
brp_buf | IID, | ||
size_t | IID_len, | ||
unsigned | EncKeyIdx, | ||
unsigned | MacKeyIdx, | ||
brp_buf | DivData, | ||
size_t | DivData_len, | ||
brp_buf | EncKey, | ||
size_t | EncKey_len, | ||
brp_buf | MacKey, | ||
size_t | MacKey_len, | ||
unsigned * | FciType, | ||
brp_buf * | Fci, | ||
size_t * | Fci_len, | ||
brp_mempool * | mempool | ||
) |
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
[in] | protocol | used to execute the command |
[in] | ForceVcsAuthentication | Forces authentication to a virtual card. A card without encryption returns BRP_Mif_VcsAndProxCheckError |
[in] | UseExtVcSelectKeys | Authenticates to a virtual card. A MAC and an encryption key have to be specified. Use (external) Virtual Card keys given as command parameter. |
[in] | DiversifyMacKey | 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. |
[in] | DiversifyEncKey | Diversifies VC Encryption key |
[in] | UseVcSelectKeys | Authenticates to a virtual card. A MAC and a encryption key has to be specified. Use keys stored in CryptoMemory or SAM. |
[in] | IID | Virtual Card Identifier. |
[in] | IID_len | |
[in] | EncKeyIdx | 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) |
[in] | MacKeyIdx | 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) |
[in] | DivData | Key diversification according to NXP AN10922. |
[in] | DivData_len | |
[in] | EncKey | VC encryption key |
[in] | EncKey_len | |
[in] | MacKey | VC MAC key |
[in] | MacKey_len | |
[out] | FciType | 0: raw data 1: uid_len(1) and card type(1) 2: uid_len(1), card type(1) and memory size(1) |
[out] | Fci | File control information |
[out] | Fci_len | |
[in] | mempool | 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 |