GFpxInit¶
Initializes the context of a GF(pd) field.
Syntax¶
IppStatus ippsGFpxInit(const IppsGFpState* pParentGF, int extDeg, const IppsGfpElement* const ppGroundElm[], int polyTerms, const IppsGFpMethod* method, IppsGFpState* pGFpx);
Include Files¶
ippcp.h
Parameters¶
pParentGF |
Pointer to the context of the finite field GF( |
extDeg |
Degree of the extension. |
ppGroundElm[] |
Double pointer to the array of IppsGFpElement contexts representing coefficients of the field polynomial. |
polyTerms |
Number of the field polynomial coefficients. |
method |
Pointer to the implementation of a basic arithmetic (methods) over the extended GF( |
pGFpx |
Pointer to the context of the GF( |
Description¶
The function initializes the memory buffer pGFpx associated with the
IppsGFpState context and sets up the specific irreducible polynomial.
The initialized context is used in the functions that create contexts of
elements of the GF(p
d) field and perform operations with
the field elements. The function assumes the use of a general field
polynomial g
(x
) = x
d + x
:sup:`d
-
1`a
:sub:`d
- 1` + x
:sup:`d
-
2`a
:sub:`d
- 2` + ⋯ + x
1a
1 +
a
0 over GF(p
).
Note
The function does not check the polynomial’s irreducibility.
In general, the GF(
p
d) extension requires a field polynomialg
(x
) of degreed
. However, becauseg
(x
) is considered a monic polynomial (the coefficient ofx
d
is always assumed equal to 1), the leading coefficient is not required: polyTerms <= (extDeg - 1).
Note
Important
When calling the functions over the GF(
p
d) field, a properly initialized pParentGF context of the finite field GF(p
) is required.Do not release the pParentGF context of the parent field as long as application deals with either the parent or the extended finite field pointed to by pGFpx.
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. |
ippStsContextMatchErr |
Indicates an error condition if any of the context parameters referenced by elements of ppGroundElm[] or pParentGF does not match the operation. |
ippStsBadArgErr |
Indicates an error condition in the following cases:
|
ippStsOutOfRangeErr |
Indicates an error condition if the length of any of the values defined by ppGroundElm[] is not equal to the length of an element of the parent finite field pParentGF. |