Developer Reference

Contents

MontSet

Sets the input integer big number to a value and computes the Montgomery reduction index.

Syntax

IppStatus ippsMontSet(const Ipp32u *
pModulo
, int
size
, IppsMontState *
pCtx
);
Include Files
ippcp.h
Parameters
pModulo
Pointer to the input big number modulus.
size
The size of the modulus in
Ipp32u
chunks.
pCtx
Pointer to the context
IppsMontState
capturing the modulus and the least significant word of the multiplicative inverse
Ni
.
Description
The function sets the input positive integer big number
pModulo
to be the modulus for the context
IppsMontState *
pCtx
, computes the Montgomery reduction index
k
with respect to the input big number modulus
pModulo
and the least significant 32-bit word of the multiplicative inverse
Ni
with respect to the modulus
R
, that satisfies
R
*
R
-1
-
pModulo
*
Ni
= 1.
Return Values
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
.
ippStsBadModulusErr
Indicates an error condition if the modulus is not a positive odd integer.
ippStsLengthErr
Indicates an error condition if
size
is less than or equal to 0.
ippStsOutOfRangeErr
Indicates an error condition if
size
is larger than
IppsMontState
*
pCtx
.
ippStsContextMatchErr
Indicates an error condition if
pCtx
does not match the operation.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804