Developer Reference for Intel® Integrated Performance Primitives Cryptography 2018
Computes Montgomery exponentiation.
IppStatus ippsMontExp(const IppsBigNumState *a, const IppsBigNumState *e, IppsMontState *m, IppsBigNumState *r);
ippcp.h
a |
Big number Montgomery integer within the range of [0, m - 1]. |
e |
Big number exponent. |
m |
Modulus. |
r |
Montgomery exponentiation result. |
The function computes Montgomery exponentiation with the exponent specified by the input positive integer big number to the given positive integer big number of the Montgomery form with respect to the modulus m.
The following pseudocode represents this function:
r←aeR-(e-1)mod m.
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsBadArgErr |
Indicates an error condition if a or e is a negative integer. |
ippStsNullPtrErr |
Indicates an error condition if any of the specified pointers is NULL. |
ippStsScaleRangeErr |
Indicates an error condition if a or e is more than m. |
ippStsOutOfRangeErr |
Indicates an error condition if IppsBigNumState*ris larger than IppsMontState*m. |
The size of IppsBigNumState *r should not be less than the data length of the modulus m.