1.27 CRYPT_ECC_Initialize Function

C

int CRYPT_ECC_Initialize(
    CRYPT_ECC_CTX* ecc
);

Description

This function initializes the context used for Elliptic Curve Cryptography (ECC). The context is then passed to calls to perform key building, encryption, decryption, etc.

Preconditions

None.

Parameters

ParametersDescription
eccPointer to context to initialize.

Returns

  • BAD_FUNC_ARG - An invalid pointer was passed to the function.

  • -1 - Unable to allocate memory for the keys.

  • 0 - An invalid pointer was not passed to the function.

Remarks

None.

Example

CRYPT_ECC_CTX userA; 
int           ret;

ret = CRYPT_ECC_Initialize(&userA);