hu_ECCalcAdd()

Adds two elliptic curve points.

Synopsis:

#include "hueccalc.h"
 
int hu_ECCalcAdd(sb_Params eccParams, sb_ECCalcECPoint pointA, sb_ECCalcECPoint pointB, sb_ECCalcECPoint resultPoint, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

The ECC parameters object.

pointA

Point A.

pointB

Point B.

resultPoint

Sum of Point A and Point B.

sbCtx

A global context

Library:

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

Description:

resultPoint = pointA + pointB

Any or all of the input and output elliptic curve point objects can be the same.

Returns:

SB_ERR_NULL_PARAMS

ECC parameters object is NULL.

SB_ERR_BAD_PARAMS

ECC parameters object is invalid.

SB_ERR_NULL_ECPOINT

The elliptic curve point object is NULL.

SB_ERR_BAD_ECPOINT

The elliptic curve point object is invalid.

SB_FAIL_ALLOC

Memory allocation failure.

SB_FAILURE

Operation failed.

SB_ERR_POINT_AT_INFINITY

Operation resulted in point at infinity (caller to interpret as error or not).

SB_SUCCESS

Success.