Developer Reference for Intel® Integrated Performance Primitives Cryptography 2018
Computes Montgomery modular multiplication for positive integer big numbers of Montgomery form.
IppStatus ippsMontMul(const IppsBigNumState *a, const IppsBigNumState *b, IppsMontState *m, IppsBigNumState *r);
ippcp.h
a |
Multiplicand within the range [0, m - 1]. |
b |
Multiplier within the range [0, m - 1]. |
m |
Modulus. |
r |
Montgomery multiplication result. |
The function computes the Montgomery modular multiplication for positive integer big numbers of Montgomery form with respect to the modulus IppsMontState *m. As a result, IppsBigNumState *r holds the product.
The following pseudocode represents this function:
r←a*b*R-1mod m.
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsBadArgErr |
Indicates an error condition if a or b 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 b 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.