Documentation ¶
Overview ¶
Package gf implements arithmetic over Galois Fields. Generalized for any valid order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
A Field represents an instance of GF(order) defined by a specific polynomial.
func NewField ¶
NewField returns a new field corresponding to the polynomial poly and generator α. The choice of generator α only affects the Exp and Log operations.
func (*Field) Inv ¶
Inv returns the multiplicative inverse of x in the field. If x == 0, Inv returns 0.
Click to show internal directories.
Click to hide internal directories.