GFpxInit
GFpxInit
Initializes the context of a GF(p
d
) 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(p) being extended.
- extDeg
- Degree of the extension.
- ppGroundElm[]
- Double pointer to the array ofIppsGFpElementcontexts 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(p) finite field.
- pGFpx
- Pointer to the context of the GF(p) field being initialized.d
Description
The function initializes the memory buffer ) field and perform operations with the field elements.
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
The function assumes the use of a general field polynomial + + + ⋯ +
g
(x
) = x
d
x
d
- 1a
d
- 1x
d
- 2a
d
- 2x
1
a
1
+ a
0
over GF(p
).- The function does not check the polynomial's irreducibility.
- In general, the GF(p) extension requires a field polynomialdg(x) of degreed. However, becauseg(x) is considered a monic polynomial (the coefficient ofxdis always assumed equal to 1), the leading coefficient is not required:polyTerms<= (extDeg- 1).
- When calling the functions over the GF(p) field, a properly initializeddpParentGFcontext of the finite field GF(p) is required.
- Do not release thepParentGFcontext of the parent field as long as application deals with either the parent or the extended finite field pointed to bypGFpx.
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 isNULL.
- ippStsContextMatchErr
- Indicates an error condition if any of the context parameters referenced by elements ofppGroundElm[]orpParentGFdoes not match the operation.
- ippStsBadArgErr
- Indicates an error condition in the following cases:
- extDeg> 8 orextDeg< 2.
- polyTerms> (extDeg- 1) orpolyTerms< 1.
- methodis not an output of aGFpxMethodfunction.
- methodis not compatible with the value ofextDeg.
- ippStsOutOfRangeErr
- Indicates an error condition if the length of any of the values defined byppGroundElm[]is not equal to the length of an element of the parent finite fieldpParentGF.