Developer Reference for Intel® Integrated Performance Primitives Cryptography 2018

MontForm

Converts input positive integer big number into Montgomery form.

Syntax

IppStatus ippsMontForm(const IppsBigNumState* a, IppsMontState* m, IppsBigNumState* r);

Include Files

ippcp.h

Parameters

a

Input integer big number within the range [0, m - 1].

m

Input big number modulus of IppsBigNumState.

r

Resulting Montgomery form r = a*Rmodm.

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:

ra*Rmodm.

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.

ippStsBadArgErr

Indicates an error condition if a is a negative integer.

ippStsScaleRangeErr

Indicates an error condition if a is more than m.

ippStsOutOfRangeErr

Indicates an error condition if IppsBigNumState *r is larger than IppsMontState *m.

Note

The size of IppsBigNumState *r should not be less than the data length of the modulus m.