Developer Reference for Intel® Integrated Performance Primitives Cryptography 2019
Initializes the context of an arbitrary prime finite field GF(q).
IppStatus ippsGFpInitArbitrary(const IppsBigNumState* pPrime, int primeBitSize, IppsGFpState* pGF);
ippcp.h
pPrime |
Pointer to the Big Number context storing the GF(q) modulus. |
primeBitSize |
Size, in bytes, of the odd prime number q (modulus of GF(q)). |
pGF |
Pointer to the context of the GF(q) field being initialized. |
The function initializes the memory buffer pGF associated with the IppsGFPState context and sets the GF(q) modulus to the value specified by pPrime. This function uses ippsGFpMethod_pArb() to get an implementation of the finite field arithmetic. 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.
This function does not check if pPrime actually refers to a prime value.
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. |
ippStsSizeErr |
Indicates an error condition if primeBitSize is less than 2 or greater than 1024. |
ippStsContextMatchErr |
Indicates an error condition if the pPrime context does not match the operation. |
ippStsBadArgErr |
Indicates an error condition in the following cases:
|