Initialize the CryptoSym with mBedTLS as sub-component.
More...
Initialize the CryptoSym with mBedTLS as sub-component.
- Note
- CMAC implementation of mBedTLS library is not utilized due to below mentioned reason(s)
- When using MIFARE DESFire EVx AL component, CMAC computation excluding the first call requires IV of the last subsequent calls. Here the IV is only zero for the first call and non zero for the rest of the calls. This behavior is required for EV1 Secure messaging of MIFARE DESFire product.
- Its not possible to update the IV for intermediate / final calls provide by mBedTLS.
- To over come this, CMAC is implemented directly in this component using cipher interfaces of mBedTLS.
- The above limitation is valid only for CalculateMac interface.
- CMAC implementation of mBedTLS library is not utilized due to below mentioned reason(s)
- CMAC implementation provided by mBedTLS library do not support 3DES-2Key key diversification.
- Based on AN10922 CryptoSym should support diversification of 3DES-2Key but mBedTLS CMAC library do not support this key type.
- To over come this, CMAC is implemented directly in this component using cipher interfaces of mBedTLS.
- The above limitation is valid only for below mentioned interfaces.
- Additional Data for CCM or CCM* cipher mode can be set using Load Additional Data interface.
- Tag Length can be configured using GetConfig with Tag Length as configuration identifier.
- Tag information can be configured using Set Authentication Tag for Decryption operation. Refer Decryption interface for more information.
- Tag information can be retrieved using Get Authentication Tag for Encryption operation. Refer Encryption interface for more details.
- Refer Encryption interface for more details on CCM output behavior
- Refer Decryption interface for more details on CCM Input behavior
◆ phCryptoSym_mBedTLS_Init()
Initialize the CryptoSym with mBedTLS as sub-component.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wSizeOfDataParams | [In] Specifies the size of the data parameter structure. |
| [in] | pKeyStoreDataParams | [In] Pointer to a key store structure (can be null). |
| [in] | pAddData_Buffer | [In] Pointer to Additional Data buffer (can be null). This is used for AES-CCM or AES-CCM* Cipher mode |
| [in] | wAddData_Size | [In] Size allocated for pAddData_Buffer.
- Non zero if null is not provided for pAddData_Buffer. Maximum size should be less than 2^16 - 2^8 = 65280.
- Zero if null is provided for pAddData_Buffer
|
◆ phCryptoSym_mBedTLS_DeInit()
De-Initialize the CryptoSym with mBedTLS as sub-component.
- Note
- Its must to call this interface to Un-initialize any used global context from other libraries. If not called, there might be unusual behavior for the next executions.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |