Computes integer modulo exponentiation.
#include "huzmodcalc.h"
int hu_ZModCalcExpo(size_t baseLen, const unsigned char *baseValue, size_t expoLen, const unsigned char *expoValue, size_t modLen, const unsigned char *modValue, unsigned char *result, sb_YieldCtx yieldCtx, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
Length of the base in bytes.
Value of the base as an integer
Length of the exponent in bytes.
Value of the exponent as an integer.
Length of the modulus in bytes.
Value of the modulus as an integer. The modulus must be a prime number.
The result finite field element.
Yield context.
A global context.
Inputs to this function are integers represented in octet string.
There can be leading 0 octets for base and exponent. However, leading 0 octet is not allowed for modulus.
The result is an element of a finite field. Thus, the result is represented in octet string, where the value is represented in the same number of octets as the modulus. If the value is smaller, it will be padded with 0 octets to the size of the modulus.
Input parameter length is invalid.
Input parameter is NULL.
Input parameter value is invalid.
Memory allocation failure.
Operation failed.
Success.