NXP Reader Library  v17.1.0.2535
Commands_Miscellaneous

These Components implement the MIFARE DESFire Light Miscellaneous functions. These are not part of actual DESFire Light data sheet rather its for internal purpose. More...

Collaboration diagram for Commands_Miscellaneous:

Functions

phStatus_t phalMfdfLight_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue)
 Perform a GetConfig command. More...
 
phStatus_t phalMfdfLight_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
 Perform a SetConfig command. More...
 
phStatus_t phalMfdfLight_ResetAuthentication (void *pDataParams)
 Reset the authentication. More...
 
phStatus_t phalMfdfLight_CalculateTMV (void *pDataParams, uint16_t wOption, uint16_t wKeyNoTMACKey, uint16_t wKeyVerTMACKey, uint16_t wRamKeyNo, uint16_t wRamKeyVer, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t *pTMC, uint8_t *pUid, uint8_t bUidLen, uint8_t *pTMI, uint32_t wTMILen, uint8_t *pTMV)
 Computed the Transaction MAC input as performed on the PICC. More...
 
phStatus_t phalMfdfLight_DecryptReaderID (void *pDataParams, uint16_t wOption, uint16_t wKeyNoTMACKey, uint16_t wKeyVerTMACKey, uint16_t wRamKeyNo, uint16_t wRamKeyVer, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t *pTMC, uint8_t *pUid, uint8_t bUidLen, uint8_t *pEncTMRI, uint8_t *pTMRIPrev)
 Decrypted the reader ID as performed on the PICC. More...
 

The configuration to be used for SetConfig / GetConfig.

#define PHAL_MFDFLIGHT_ADDITIONAL_INFO   0x00A1
 Option for getconfig to get additional info of a generic error.
 
#define PHAL_MFDFLIGHT_WRAPPED_MODE   0x00A2
 Option to get / set current status of command wrapping in ISO 7816-4 APDUs.
 
#define PHAL_MFDFLIGHT_SHORT_LENGTH_APDU   0x00A3
 Option to get / set Short Length APDU wrapping in ISO 7816-4 APDUs.
 

Detailed Description

These Components implement the MIFARE DESFire Light Miscellaneous functions. These are not part of actual DESFire Light data sheet rather its for internal purpose.

Function Documentation

◆ phalMfdfLight_GetConfig()

phStatus_t phalMfdfLight_GetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t pValue 
)

Perform a GetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration to read. Will be one of the below values.
[out]pValue[Out] The value for the mentioned configuration.

◆ phalMfdfLight_SetConfig()

phStatus_t phalMfdfLight_SetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Perform a SetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration to set. Will be one of the below values.
[in]wValue[In] The value for the mentioned configuration.

◆ phalMfdfLight_ResetAuthentication()

phStatus_t phalMfdfLight_ResetAuthentication ( void *  pDataParams)

Reset the authentication.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phalMfdfLight_CalculateTMV()

phStatus_t phalMfdfLight_CalculateTMV ( void *  pDataParams,
uint16_t  wOption,
uint16_t  wKeyNoTMACKey,
uint16_t  wKeyVerTMACKey,
uint16_t  wRamKeyNo,
uint16_t  wRamKeyVer,
uint8_t pDivInput,
uint8_t  bDivInputLen,
uint8_t pTMC,
uint8_t pUid,
uint8_t  bUidLen,
uint8_t pTMI,
uint32_t  wTMILen,
uint8_t pTMV 
)

Computed the Transaction MAC input as performed on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Diversification option. 0xFFFF is for No Diversification.
[in]wKeyNoTMACKey[In] Key number in key store of Software.
[in]wKeyVerTMACKey[In] Key version in key store of Software.
[in]wRamKeyNo[In] Key number of Destination Key where the computed session TMAC key will be stored. To be used for SAM AV3 only.
[in]wRamKeyVer[In] Key version of Destination Key where the computed session TMAC key will be stored. To be used for SAM AV3 only.
[in]pDivInput[In] Diversification input to diversify TMACKey.
[in]bDivInputLen[In] Length of byte available in DivInput buffer.
[in]pTMC[In] 4 bytes Transaction MAC Counter. It should be 1 time subtracted from the actual value and shold be LSB first.
[in]pUid[In] UID of the card.
[in]bUidLen[In] Length of UID supplied.
[in]pTMI[In] Transaction MAC Input.
[in]wTMILen[In] Length of bytes available in TMI buffer.
[out]pTMV[Out] The computed Transaction MAC Value.

◆ phalMfdfLight_DecryptReaderID()

phStatus_t phalMfdfLight_DecryptReaderID ( void *  pDataParams,
uint16_t  wOption,
uint16_t  wKeyNoTMACKey,
uint16_t  wKeyVerTMACKey,
uint16_t  wRamKeyNo,
uint16_t  wRamKeyVer,
uint8_t pDivInput,
uint8_t  bDivInputLen,
uint8_t pTMC,
uint8_t pUid,
uint8_t  bUidLen,
uint8_t pEncTMRI,
uint8_t pTMRIPrev 
)

Decrypted the reader ID as performed on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Diversification option. 0xFFFF is for No Diversification.
[in]wKeyNoTMACKey[In] Key number in key store of Software.
[in]wKeyVerTMACKey[In] Key version in key store of Software.
[in]wRamKeyNo[In] Key number of Destination Key where the computed session TMAC key will be stored. To be used for SAM AV3 only.
[in]wRamKeyVer[In] Key version of Destination Key where the computed session TMAC key will be stored. To be used for SAM AV3 only.
[in]pDivInput[In] Diversification input to diversify TMACKey.
[in]bDivInputLen[In] Length of byte available in DivInput buffer.
[in]pTMC[In] 4 bytes Transaction MAC Counter. It should be 1 time subtracted from the actual value and shold be LSB first.
[in]pUid[In] UID of the card.
[in]bUidLen[In] Length of UID supplied.
[in]pEncTMRI[In] Encrypted Transaction MAC ReaderID of the latest successful transaction.
[out]pTMRIPrev[Out] Decrypted Reader ID of the last successful transaction.