Developer Reference for Intel® Integrated Performance Primitives Cryptography 2018

GFpInitFixed

Initializes the context of a prime finite field GF(q) with a predefined modulus q.

Syntax

IppStatus ippsGFpInitFixed(int primeBitSize, const IppsGFpMethod* method, IppsGFpState* pGF);

Include Files

ippcp.h

Parameters

primeBitSize

Size, in bytes, of the odd prime number q (modulus of GF(q)).

method

Pointer to the implementation of a basic arithmetic (methods) over the prime finite field GF(q) with a predefined q.

pGF

Pointer to the context of the GF(q) field being initialized.

Description

The function initializes the memory buffer pGF associated with the IppsGFPState context and sets up the specific value of the GF(q) modulus corresponding to the chosen method. The initialized context is used in the functions that create contexts of elements of the GF(p) field, which, in turn, are used to perform operations with the field elements.

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 in the following cases:
  • method is not a pointer to an implementation of a prime finite field arithmetic with a predefined modulus
  • method does not correspond to the size of modulus q defined in a ippsGFpGetSize() call.