Computes modular reduction for input integer big number with respect to specified modulus.
IppStatus ippsMod_BN(IppsBigNumState *a, IppsBigNumState *m, IppsBigNumState * r);
a |
Integer big number of IppsBigNumState. |
m |
Modulus integer of IppsBigNumState. |
r |
Modular reduction result. |
This function is declared in the ippcp.h file. The function computes the modular reduction for an input integer big number with respect to the modulus specified by a positive integer big number and returns the modular reduction result in the range of [0, (m-1)].
The following pseudocode represents this function:
r ← a mod m.
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsNullPtrErr |
Indicates an error condition if any of the specified pointers is NULL. |
ippStsOutOfRangeErr |
Indicates an error condition if IppsBigNumState *r is smaller than the length of IppsBigNumState *m. |
ippStsBadModulusErr |
Indicates an error condition if the modulus IppsBigNumState *m is not a positive integer. |
The size of IppsBigNumState *r should not be less than the length of IppsBigNumState *m.
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.