Desfire.VirtualCardSelect
This command selects a virtual card
Properties
-
Command code: 0x1B0B
-
Command timeout: 2000 ms
-
Possible status codes:
General status codes,
Desfire.ErrIso14NoTag,
Desfire.ErrBreak,
Desfire.ErrIso14Hf,
Desfire.ErrIso14CardInvalid,
Desfire.ErrReaderChipCommunication,
Desfire.ErrIso14ApduCmd,
Desfire.ErrIso14InvalidResponse,
Desfire.ErrIntegrity,
Desfire.ErrPcdKey,
Desfire.ErrPcdParam,
Desfire.VcsAndProxCheckError,
Desfire.ErrFirmwareNotSupported,
Desfire.ErrSamCommunication,
Desfire.ErrSamUnlock,
Desfire.ErrHardwareNotSupported,
Desfire.ErrLength,
Desfire.ErrPermissionDenied,
Desfire.ErrParameter,
Desfire.ErrPiccIntegrity,
Desfire.ErrCommandAborted,
Desfire.ErrIllegalCmd,
Desfire.ErrIllegalCmdLegacy
Parameters (request frame)
|
Name
|
Type/Size
|
Description
|
|
-
|
Bit mask (8 bits)
|
-
|
|
RFU
|
Integer (bit mask area 0xC0)
|
Zero padding
|
|
ForceVcsAuthentication
|
Boolean (bit 0x20)
|
Forces authentication to a virtual card. A card without encryption
returns Desfire.VcsAndProxCheckError
|
|
UseExtVcSelectKeys
|
Boolean (bit 0x10)
|
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
|
Integer (bit mask area 0x0C)
|
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
|
Boolean (bit 0x02)
|
Diversifies VC Encryption key
|
|
UseVcSelectKeys
|
Boolean (bit 0x01)
|
Authenticates to a virtual card. A MAC and a encryption key has to be
specified. Use Keys stored in CryptoMemory or SAM.
|
|
Length of IID
|
Integer (8 bits)
|
Length of IID in bytes
|
|
IID
|
Raw data
|
Virtual Card Identifier.
|
Optional field, condition:
UseVcSelectKeys
|
EncKeyIdx
|
Integer (16 bits)
|
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
|
Integer (16 bits)
|
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)
|
|
Optional field, condition:
(DiversifyMacKey == 0x1) or (DiversifyMacKey == 0x2) or (DiversifyMacKey == 0x3) or DiversifyEncKey
|
Length of DivData
|
Integer (8 bits)
|
Length of DivData in bytes
|
|
DivData
|
Raw data
|
Key diversification according to NXP AN10922.
|
|
Optional field, condition:
UseExtVcSelectKeys
|
Length of EncKey
|
Integer (8 bits)
|
Length of EncKey in bytes
|
|
EncKey
|
Raw data
|
VC encryption key
|
|
Length of MacKey
|
Integer (8 bits)
|
Length of MacKey in bytes
|
|
MacKey
|
Raw data
|
VC MAC key
|
|
Returned values (response frame)
|
Name
|
Type/Size
|
Description
|
|
FciType
|
Integer (8 bits)
|
0: raw data
1: uid_len(1) and card type(1)
2: uid_len(1), card type(1) and memory size(1)
|
|
Length of Fci
|
Integer (8 bits)
|
Length of Fci in bytes
|
|
Fci
|
Raw data
|
File control information
|