MontForm
MontForm
Converts input positive integer big number into Montgomery form.
Syntax
IppStatus ippsMontForm(const IppsBigNumState*
pA
, IppsMontState*
pCtx
, IppsBigNumState*
pR
);
Include Files
ippcp.h
Parameters
- pA
- Pointer to the input integer big number within the range[0,pCtx- 1].
- pCtx
- Pointer to the input big number modulus ofIppsBigNumState.
- pR
- Pointer to the resulting Montgomery formpR=pA*RmodpCtx.
Description
The function converts an input positive integer big number into the Montgomery form with respect to the big number modulus and stores the conversion result.
The following pseudocode represents this function:
pR
←
pA
*
R
mod
pCtx
.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 isNULL.
- ippStsBadArgErr
- Indicates an error condition ifpAis a negative integer.
- ippStsScaleRangeErr
- Indicates an error condition ifpAis more thanpCtx.
- ippStsOutOfRangeErr
- Indicates an error condition ifIppsBigNumState*pRis larger thanIppsMontState*m.
- ippStsContextMatchErr
- Indicates an error condition if any of the context parameters does not match the operation.
The size of
IppsBigNumState *
pR
should not be less than the data length of the modulus pCtx
.