hu_ECCalcLinMult()

Computes linear combination of two points (sum of two integer multiplies).

Synopsis:

#include "hueccalc.h"
 
int hu_ECCalcLinMult(sb_Params eccParams, sb_ECCalcOrderInt multIntA, sb_ECCalcECPoint pointA, sb_ECCalcOrderInt multIntB, sb_ECCalcECPoint pointB, sb_ECCalcECPoint resultPoint, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

ECC parameters object.

multIntA

The multiplying integer to Point A.

pointA

Point A.

multIntB

The multiplying integer to Point B.

pointB

Point B.

resultPoint

The result linear combination (containing only x-coordinate value).

sbCtx

A global context.

Library:

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

Description:

If the second EC point (pointB) is NULL, the generating point is used.

resultPoint = multIntA * pointA + multIntB * 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_ORDER_INT

The point order integer object is NULL.

SB_ERR_BAD_ORDER_INT

The point order integer 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.