Describes about the NTAG X DNA Crypto API commands. More...

Modules | |
| Defines | |
| Macro Definitions for Crypto API commands. | |
Functions | |
| phStatus_t | phalNtagXDna_CryptoRequestSHA (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bAlgorithm, uint8_t bInputDataSource, uint8_t bResultDst, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest SHA. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestRNG (void *pDataParams, uint8_t bOption, uint8_t bNumBytes, uint8_t bResultDst, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest RNG. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestECCSign (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bPrivateKeyID, uint8_t bInputDataSource, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest ECC Signature generation. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestECCVerify (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bCurveID, uint8_t *pHostPubKey, uint8_t bHostPubKeyLen, uint8_t *pSignature, uint8_t bSigLen, uint8_t bInputDataSource, uint8_t *pInputData, uint8_t bInputDataLen) |
| Perform CryptoRequest ECC Signature verification. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestECCDH (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bKeyPairID, uint8_t bSSDestination, uint8_t *pHostPubKey, uint8_t bHostPubKeyLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest ECC Diffie-Hellman. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestAES (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bPrimitive, uint8_t bKeyID, uint8_t bKeyLen, uint8_t bICVSource, uint8_t *pICV, uint8_t bICVLen, uint8_t bInputDataSource, uint8_t bResultDst, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest AES ECB / CBC Encryption or Decryption. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestAESCMAC (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bPrimitive, uint8_t bKeyID, uint8_t bKeyLen, uint8_t *pCMACSignature, uint8_t bCMACSignLen, uint8_t bInputDataSource, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest AES CMAC Signing or Verification. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestAESAEAD (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bPrimitive, uint8_t bKeyID, uint8_t bKeyLen, uint8_t bNonceSource, uint8_t *pNonce, uint8_t bNonceLen, uint16_t wTotal_AAdLen, uint16_t wTotal_InputDataLen, uint8_t bAADSource, uint8_t *pAAD, uint8_t bAADLen, uint8_t bInputDataSource, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t *pTagData, uint8_t bTagDataLen, uint8_t bResultDst, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest AES AEAD Encryption / Signing or Decryption / Verification. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestWriteInternalBuffer (void *pDataParams, uint8_t bOption, uint8_t bDestination, uint8_t *pData, uint8_t bDataLen) |
| Perform CryptoRequest Write Internal Buffer. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestHMAC (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bPrimitive, uint8_t bDigestAlgo, uint8_t bKeyID, uint8_t bKeyLen, uint8_t *pHMac, uint8_t bHMacLen, uint8_t bInputDataSource, uint8_t *pInputData, uint8_t bInputDataLen, uint8_t bResultDst, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest HMAC (Hash-Based Message Authentication Code) Signature generation and verification. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestHKDF (void *pDataParams, uint8_t bOption, uint8_t bOperation, uint8_t bDigestAlgo, uint8_t bKeyID, uint8_t bKeyLen, uint8_t bSaltSource, uint8_t *pSaltData, uint8_t bSaltDataLen, uint8_t bInfoSource, uint8_t *pInfoData, uint8_t bInfoDataLen, uint8_t bResultDst, uint8_t bResultLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest HKDF (HMAC Key Derivation function) Extract and Expand. More... | |
| phStatus_t | phalNtagXDna_CryptoRequestECHO (void *pDataParams, uint8_t bOption, uint8_t *pData, uint8_t bDataLen, uint8_t **ppResponse, uint16_t *pRspLen) |
| Perform CryptoRequest ECHO. More... | |
Describes about the NTAG X DNA Crypto API commands.
| phStatus_t phalNtagXDna_CryptoRequestSHA | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bAlgorithm, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t | bResultDst, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest SHA.
It is possible to execute an SHA calculation using a single command or as a series of commands.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bAlgorithm | [In] Indicates the Algorithm to be used. One of the following, |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [in] | pInputData | [In] Input data to be hashed. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [out] | ppResponse | [Out] Buffer containing the Hashed information. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestRNG | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bNumBytes, | ||
| uint8_t | bResultDst, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest RNG.
It is possible to generate random data, which is compliant with NIST SP800-90B using a 256-bit key. The Maximum number of generated bytes is 128.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bNumBytes | [In] The number of bytes to generate random bytes. |
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [out] | ppResponse | [Out] Buffer containing the Random data. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestECCSign | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bPrivateKeyID, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest ECC Signature generation.
The ECC signature generation API supports signing of a data stream or a pre-computed hash.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bPrivateKeyID | [In] Id of the ECC key pair containing the private key to use. Note a key pair must be marked as Crypto API Signature. |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | pInputData | [In] Input data to be Signed. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [out] | ppResponse | [Out] Buffer containing the Signature information. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestECCVerify | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bCurveID, | ||
| uint8_t * | pHostPubKey, | ||
| uint8_t | bHostPubKeyLen, | ||
| uint8_t * | pSignature, | ||
| uint8_t | bSigLen, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen | ||
| ) |
Perform CryptoRequest ECC Signature verification.
The ECC signature verification API supports verification of a data stream or data, which has already been hashed.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| PHAL_NTAGXDNA_ERR_SIGNATURE_VERIFICATION_FAILURE | Verification of Message / Signature combination failed. |
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bCurveID | [In] The targeted curve. Should be one of the below values. |
| [in] | pHostPubKey | [In] The public key to use for signature verification provided in uncompressed format. i.e. leading 0x04 byte |
| [in] | bHostPubKeyLen | [In] Length of Bytes available in pHostPubKey buffer. |
| [in] | pSignature | [In] Signature to verify. |
| [in] | bSigLen | [In] Length of Bytes available in pSignature buffer. |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | pInputData | [In] Input data to be verified. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| phStatus_t phalNtagXDna_CryptoRequestECCDH | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bKeyPairID, | ||
| uint8_t | bSSDestination, | ||
| uint8_t * | pHostPubKey, | ||
| uint8_t | bHostPubKeyLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest ECC Diffie-Hellman.
The ECC Diffie-Hellman API supports the use of static keys or ephemeral keys. In addition, it allows the shared secret to be generated using a single or two-step approach.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bKeyPairID | [In] Should be one of the below values.
|
| [in] | bSSDestination | [In] Crypto API Shared Secret destination Selection.
|
| [in] | pHostPubKey | [In] The host's public key to use for shared secret generation, provided in uncompressed format I.e leading 0x04 byte |
| [in] | bHostPubKeyLen | [In] Length of Bytes available in pHostPubKey buffer. |
| [out] | ppResponse | [Out] Buffer containing,
|
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestAES | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bPrimitive, | ||
| uint8_t | bKeyID, | ||
| uint8_t | bKeyLen, | ||
| uint8_t | bICVSource, | ||
| uint8_t * | pICV, | ||
| uint8_t | bICVLen, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t | bResultDst, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest AES ECB / CBC Encryption or Decryption.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bPrimitive | [In] One of the following Primitive. |
| [in] | bKeyID | [In] Id of the AES key.
|
| [in] | bKeyLen | [In] Length of AES key, only present when the key source is an internal buffer. |
| [in] | bICVSource | [In] Crypto API ICV Source Selection. Only present for CBC operations.
|
| [in] | pICV | [In] Only present for CBC operations and the ICV is in the command buffer. |
| [in] | bICVLen | [In] Length of Bytes available in pICV buffer. |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [in] | pInputData | [In] Data to be Encrypted or Decrypted. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [out] | ppResponse | [Out] Buffer containing the Encrypted or Decrypted data. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestAESCMAC | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bPrimitive, | ||
| uint8_t | bKeyID, | ||
| uint8_t | bKeyLen, | ||
| uint8_t * | pCMACSignature, | ||
| uint8_t | bCMACSignLen, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest AES CMAC Signing or Verification.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| PHAL_NTAGXDNA_ERR_SIGNATURE_VERIFICATION_FAILURE | Verification of Message / Signature combination failed. |
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bPrimitive | [In] One of the following Primitive. |
| [in] | bKeyID | [In] Id of the AES key.
|
| [in] | bKeyLen | [In] Length of AES key, only present when the key source is an internal buffer. |
| [in] | pCMACSignature | [In] CMAC Signature to be verified.
|
| [in] | bCMACSignLen | [In] Length of Bytes available in pCMACSignature buffer. |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | pInputData | [In] Data to be Signed or Verified. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [out] | ppResponse | [Out] Buffer containing the following,
|
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestAESAEAD | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bPrimitive, | ||
| uint8_t | bKeyID, | ||
| uint8_t | bKeyLen, | ||
| uint8_t | bNonceSource, | ||
| uint8_t * | pNonce, | ||
| uint8_t | bNonceLen, | ||
| uint16_t | wTotal_AAdLen, | ||
| uint16_t | wTotal_InputDataLen, | ||
| uint8_t | bAADSource, | ||
| uint8_t * | pAAD, | ||
| uint8_t | bAADLen, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t * | pTagData, | ||
| uint8_t | bTagDataLen, | ||
| uint8_t | bResultDst, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest AES AEAD Encryption / Signing or Decryption / Verification.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| PHAL_NTAGXDNA_ERR_SIGNATURE_VERIFICATION_FAILURE | Verification of Message / Signature combination failed. |
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bPrimitive | [In] One of the following Primitive.
|
| [in] | bKeyID | [In] Id of the AES key.
|
| [in] | bKeyLen | [In] Length of AES key, only present when the key source is an internal buffer. |
| [in] | bNonceSource | [In] Crypto API Nonce Source Selection. Not present when bPrimitive is AES Primitive for CCM Encryption / Signing with Internal Nonce or AES Primitive for GCM Encryption / Signing with Internal Nonce
|
| [in] | pNonce | [In] Nonce to be used. One of the following,
|
| [in] | bNonceLen | [In] Length of Nonce.One of the following,
|
| wTotal_AAdLen | Total length of AAD information that will be exchanged. This will be application for below primitives, | |
| wTotal_InputDataLen | Total length of Input data that will be exchanged. This will be application for below primitives, | |
| [in] | bAADSource | [In] Crypto API AAD Source Selection.
|
| [in] | pAAD | [In] AAD data. One of the following
|
| [in] | bAADLen | [In] Length AAD as mentioned below
|
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | pInputData | [In] Data to be Encrypted / Signed or Decrypted / Verified. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [in] | pTagData | [In] Tag Data to be used. One of the following
|
| [in] | bTagDataLen | [In] Tag length as mentioned below
|
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [out] | ppResponse | [Out] Buffer containing the following
|
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestWriteInternalBuffer | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bDestination, | ||
| uint8_t * | pData, | ||
| uint8_t | bDataLen | ||
| ) |
Perform CryptoRequest Write Internal Buffer.
It is possible to write a specific value to an internal buffer using this command option. This allows data to be loaded for use within other crypto API operations
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bDestination | [In] Crypto API Data Destination Selection.
|
| [in] | pData | [In] Data to write to the internal buffer. |
| [in] | bDataLen | [In] Length of Bytes available in pData buffer. |
| phStatus_t phalNtagXDna_CryptoRequestHMAC | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bPrimitive, | ||
| uint8_t | bDigestAlgo, | ||
| uint8_t | bKeyID, | ||
| uint8_t | bKeyLen, | ||
| uint8_t * | pHMac, | ||
| uint8_t | bHMacLen, | ||
| uint8_t | bInputDataSource, | ||
| uint8_t * | pInputData, | ||
| uint8_t | bInputDataLen, | ||
| uint8_t | bResultDst, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest HMAC (Hash-Based Message Authentication Code) Signature generation and verification.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| PHAL_NTAGXDNA_ERR_SIGNATURE_VERIFICATION_FAILURE | Verification of Message / Signature combination failed. |
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bPrimitive | [In] One of the following Primitive. |
| [in] | bDigestAlgo | [In] Indicates the Algorithm to be used. One of the following, |
| [in] | bKeyID | [In] Id of the HMAC key.
|
| [in] | bKeyLen | [In] Length of HMAC key, only present when the key source is an internal buffer. |
| [in] | pHMac | [In] Hash MAC Signature to be verified.
|
| [in] | bHMacLen | [In] Length of Bytes available in pHMac buffer. |
| [in] | bInputDataSource | [In] Crypto API Data Source Selection.
|
| [in] | pInputData | [In] Data to be Signed or Verified. One of the following
|
| [in] | bInputDataLen | [In] Length Input Data as mentioned below
|
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [out] | ppResponse | [Out] Buffer containing the following,
|
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestHKDF | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bOperation, | ||
| uint8_t | bDigestAlgo, | ||
| uint8_t | bKeyID, | ||
| uint8_t | bKeyLen, | ||
| uint8_t | bSaltSource, | ||
| uint8_t * | pSaltData, | ||
| uint8_t | bSaltDataLen, | ||
| uint8_t | bInfoSource, | ||
| uint8_t * | pInfoData, | ||
| uint8_t | bInfoDataLen, | ||
| uint8_t | bResultDst, | ||
| uint8_t | bResultLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest HKDF (HMAC Key Derivation function) Extract and Expand.
HKDF, as defined in RFC5869, requires execution of the extract operation followed by the expand operation. The API uses a secure SHA implementation
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | bOperation | [In] Indicates the Operation to be used. One of the following, |
| [in] | bDigestAlgo | [In] Indicates the Algorithm to be used. One of the following, |
| [in] | bKeyID | [In] Id of the HMAC key.
|
| [in] | bKeyLen | [In] Length of HMAC key, only present when the key source is an internal buffer. |
| [in] | bSaltSource | [In] Crypto API Salt Source Selection.
|
| [in] | pSaltData | [In] Salt data. One of the following
|
| [in] | bSaltDataLen | [In] Length of Salt data as mentioned below
|
| [in] | bInfoSource | [In] Crypto API Info Source Selection.
|
| [in] | pInfoData | [In] Context data. One of the following
|
| [in] | bInfoDataLen | [In] Length Input Data as mentioned below
|
| [in] | bResultDst | [In] Crypto API Data Destination Selection.
|
| [in] | bResultLen | [In] Number of bytes to output |
| [out] | ppResponse | [Out] Buffer containing HKDF result. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |
| phStatus_t phalNtagXDna_CryptoRequestECHO | ( | void * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t * | pData, | ||
| uint8_t | bDataLen, | ||
| uint8_t ** | ppResponse, | ||
| uint16_t * | pRspLen | ||
| ) |
Perform CryptoRequest ECHO.
It is possible to have the device echo the command data provided to it. This may be useful to verify system setup.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
|
| XXXX |
|
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Indicates the mode of communication to be used while exchanging the data from tag. |
| [in] | pData | [In] Data to be Echoed back. |
| [in] | bDataLen | [In] Length of Bytes available in pData buffer. |
| [out] | ppResponse | [Out] Buffer containing the transmitted data. |
| [out] | pRspLen | [Out] Length of Bytes available in ppResponse buffer. |