gf2e12

package
v0.0.0-...-ac9c40d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package gf2e12 provides finite field arithmetic over GF(2^12).

Index

Constants

View Source
const (
	Bits = 12
	Mask = (1 << Bits) - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Elt

type Elt = uint16

Elt is a field element of characteristic 2 modulo z^12 + z^3 + 1

func Add

func Add(a, b Elt) Elt

Add two Elt elements together. Since an addition in Elt(2) is the same as XOR, this implementation uses a simple XOR for addition.

func Div

func Div(a, b Elt) Elt

Div calculates a / b

func Inv

func Inv(a Elt) Elt

Inv calculates the multiplicative inverse of Elt element a

func Mul

func Mul(a, b Elt) Elt

Mul calculate the product of two Elt elements.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL