NXP Reader Library  v17.1.0.2535
Commands_CryptographicSupport

Describes about the MIFARE DUOX Cryptographic Support commands. More...

Collaboration diagram for Commands_CryptographicSupport:

Modules

 Defines
 Macro Definitions for Cryptographic Support commands.
 

Functions

phStatus_t phalMfDuoX_CryptoRequest (void *pDataParams, uint8_t bComOption, uint8_t bAction, uint8_t *pInputData, uint16_t wInputLen, uint8_t **ppResponse, uint16_t *pRspLen)
 Executes a cryptographic operation. More...
 
phStatus_t phalMfDuoX_CryptoRequestECCSign (void *pDataParams, uint8_t bComOption, uint8_t bOperation, uint8_t bAlgo, uint8_t bKeyNo, uint8_t bInputSource, uint8_t *pInputData, uint8_t bInputLen, uint8_t **ppSign, uint16_t *pSignLen)
 Executes an ECC signature generation. More...
 
phStatus_t phalMfDuoX_CryptoRequestEcho (void *pDataParams, uint8_t bComOption, uint8_t *pInputData, uint8_t bInputLen, uint8_t **ppResponse, uint16_t *pRspLen)
 Performs echoing of the data being transmitted. More...
 

Detailed Description

Describes about the MIFARE DUOX Cryptographic Support commands.

Function Documentation

◆ phalMfDuoX_CryptoRequest()

phStatus_t phalMfDuoX_CryptoRequest ( void *  pDataParams,
uint8_t  bComOption,
uint8_t  bAction,
uint8_t pInputData,
uint16_t  wInputLen,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Executes a cryptographic operation.

This is the generic API definition, including common error codes

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • The values provided in bComOption is not supported.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bComOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]bAction[In] Targeted action to perform. One of the below values.
[in]pInputData[In] Input data for which the cryptographic operation needs to be performed.
[in]wInputLen[In] Length of bytes available in pInputData buffer.
[out]ppResponse[Out] Cryptographic output for the provided input.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalMfDuoX_CryptoRequestECCSign()

phStatus_t phalMfDuoX_CryptoRequestECCSign ( void *  pDataParams,
uint8_t  bComOption,
uint8_t  bOperation,
uint8_t  bAlgo,
uint8_t  bKeyNo,
uint8_t  bInputSource,
uint8_t pInputData,
uint8_t  bInputLen,
uint8_t **  ppSign,
uint16_t pSignLen 
)

Executes an ECC signature generation.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • If the InputType is not supported (bInputType).
  • The values provided in bComOption is not supported.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bComOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]bOperation[In] Target Operation to use. One of the below values.
[in]bAlgo[In] Target Algorithm to use. One of the below values ECDSA with SHA256
[in]bKeyNo[In] Key number of the targeted key. One of the following
  • At PICC Level: 0x00 - 0x01 keys are supported.
  • At APP Level : 0x00 - 0x04 keys are supported.
[in]bInputSource[In] Input Source to use. One of the below values. Command Buffer with explicit length
[in]pInputData[In] Input data to be signed. Can be one of the following.
[in]bInputLen[In] Length of bytes available in pInputData buffer.
[out]ppSign[Out] ECDSA Signature for the provided input.
[out]pSignLen[Out] Length of bytes available in ppSign buffer.

◆ phalMfDuoX_CryptoRequestEcho()

phStatus_t phalMfDuoX_CryptoRequestEcho ( void *  pDataParams,
uint8_t  bComOption,
uint8_t pInputData,
uint8_t  bInputLen,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Performs echoing of the data being transmitted.

This allows to easily test the communication interface.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • If the InputType is not supported (bInputType).
  • The values provided in bComOption is not supported.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bComOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]pInputData[In] Input data to be echoed.
[in]bInputLen[In] Length of bytes available in pInputData buffer.
[out]ppResponse[Out] Cryptographic output for the provided input.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.