1.2.2.2 DRV_CRYPTO_ECDH_InitEccParams()

CRYPTO_PKE_RESULT DRV_CRYPTO_ECDH_InitEccParams (PKE_CONFIG * eccData, uint8_t * privateKey, uint32_t privateKeyLength, uint8_t * publicKey, uint32_t publicKeyLength, PKE_ECC_CURVE hwEccCurve)

Initialize the ECDH parameters used for Shared Secret generation.

Parameters:
eccData

Configuration structure to store ECDH information.

privateKey

Private Key input for Shared Secret generation.

privateKeyLength

Length of the private key.

publicKey

Public key input for Shared Secret generation.

publicKeyLength

Length of the private key.

hwEccCurve

ECC Curve used for generation.

Returns:

CRYPTO_PKE_RESULT_SUCCESS on success. CRYPTO_PKE_RESULT_ERROR_FAIL on failure.

Note:

This function initializes eccData with ECDH parameters and sets up the Hardware Crypto Engine.