hu_ECCalcECPointSet()

Create an elliptic curve point object, and set an elliptic curve point value if supplied.

Synopsis:

#include "hueccalc.h"
 
int hu_ECCalcECPointSet(sb_Params eccParams, size_t pointLen, const unsigned char *pointValue, sb_ECCalcECPoint *point, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

ECC parameters object.

pointLen

The length (in bytes) of the elliptic curve point value.

pointValue

The elliptic curve point value.

point

The elliptic curve point object.

sbCtx

SB context or memory callback data.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

If the value is not supplied, then this function generates an empty object.

When supplied, the elliptic curve point value must be represented as an octet string. The supplied point must belong to the subgroup specified by the ECC domain parameter, including point at infinity.

An empty elliptic curve point object represents a two-tuple with both x- and y-coordinates are 0. It acts as a point at infinity.

To generate an empty elliptic curve point object, set pointValue to NULL.

The appropriate length can be determined by using the hu_ECCalcECPointGet() function.

Returns:

SB_ERR_NULL_PARAMS

ECC parameters object is NULL.

SB_ERR_BAD_PARAMS

ECC parameters object is invalid.

SB_ERR_NULL_ECPOINT_PTR

The elliptic curve point object pointer is NULL.

SB_ERR_BAD_INPUT_BUF_LEN

The value length is invalid.

SB_ERR_BAD_INPUT

The value is invalid.

SB_FAIL_ALLOC

Memory allocation failure.

SB_FAILURE

Operation failed.

SB_SUCCESS

Success.