mMod

Multiplication of polynomials in F_p[x]

multPolyZ compute the product of two polynomial P Q in F_p[x].
Write ploynom P of degree n as a sequence of coefficients P = [an, a_(n-1),.., a_0].
To compute the product of polynomials P,Q we borrow the Horner multiplication rules as described by the following chain.
It consists to do n compositions of functions detailed in the following diagramm:
Q -> anxQ + a_(n-1)Q

Extended gcd of polynomials in F_p[x]

extendedgcdpoly compute the extended gcd of polynomials P and Q in the ring F_p[x] where p is a prime number.
Let f = [2,0,3,2,1::Integer], g = [2,5,-3,1::Integer] in F_7[x].
extendedgcdpoly 7 f g = [[5,3],[2,6,5],[2,1]] .
This means that the gcd of f and g in F_7[x] is the polynom 2*x+1 , and