Mod_BN

Computes modular reduction for input integer big number with respect to specified modulus.

Syntax

IppStatus ippsMod_BN(IppsBigNumState *a, IppsBigNumState *m, IppsBigNumState * r);

Parameters

a

Integer big number of IppsBigNumState.

m

Modulus integer of IppsBigNumState.

r

Modular reduction result.

Description

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.

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.

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.

Note iconNote

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


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.