Developer Reference for Intel® Integrated Performance Primitives Cryptography 2018

Gcd_BN

Computes greatest common divisor.

Syntax

IppStatus ippsGcd_BN(IppsBigNumState *a, IppsBigNumState *b, IppsBigNumState * g);

Include Files

ippcp.h

Parameters

a

First integer big number of IppsBigNumState.

b

Second integer big number of IppsBigNumState.

g

Greatest common divisor to a and b.

Description

The function computes the greatest common divisor (GCD) for two positive integer big numbers.

The following pseudocode represents this function:

g gcd (a , b).

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*g is smaller than the length of IppsBigNumState*a or IppsBigNumState*b.

Note

The size of IppsBigNumState *g should not be less than either the length of IppsBigNumState *a and IppsBigNumState *b.