ModInv_BN

Computes multiplicative inverse of a positive integer big number with respect to specified modulus.

Syntax

IppStatus ippsModInv_BN(IppsBigNumState *e, IppsBigNumState *m, IppsBigNumState * d);

Parameters

e

Integer big number of IppsBigNumState.

m

Modulus integer of IppsBigNumState.

d

Multiplicative inverse.

Description

This function is declared in the ippcp.h file. The function uses the extended Euclidean algorithm to compute the multiplicative inverse of a given positive integer big number e with respect to the modulus specified by another positive integer big number m, where gcd (e, m) = 1.

The following pseudocode represents this function:

compute d such that d * e = 1 mod m.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or warning.

ippStsBadArgErr

Indicates an error condition if e is less than or equal to 0.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsBadModulusErr

Indicates an error condition if the modulus e is more than m, or gcd (e,m) is more than 1, or m is less than or equal to 0.

ippStsOutOfRangeErr

Indicates an error condition if IppsBigNumState *d is smaller than the length of IppsBigNumState *m.

Note iconNote

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


Submit feedback on this help topic

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