galoisfield

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Word32SizeBits is the size of a word in bits depending on a 32 architecture
	Word32SizeBits = 32
	// Word32SizeBits is the size of a word in bits depending on a 64 architecture
	Word64SizeBits = 64
	// Word32SizeBytes is the size of a word in bytes depending on a 32 architecture
	Word32SizeBytes = 4
	// Word64SizeBytes is the size of a word in bytes depending on a 64 architecture
	Word64SizeBytes = 8
	// N32Limbs is
	N32Limbs = 64 / Word32SizeBytes
	// N64Limbs is
	N64Limbs = 64 / Word64SizeBytes
)

The characteristics of the word

Variables

This section is empty.

Functions

This section is empty.

Types

type GaloisField448

type GaloisField448 struct {
	Limb *memguard.LockedBuffer
}

GaloisField448 is a field with a finite number of elements. The number depends on the word bits: 512/word_bits This should not be confunsed with the Field Element

func AddRaw32

AddRaw32 adds one galoisfield to another. For a 32 arch TODO: how should be error?

func AddRaw64

AddRaw64 adds one galoisfield to another. For a 32 arch

func Bias32

func Bias32(x *GaloisField448, amt int) *GaloisField448

Bias32 is

func NewGaloisField448

func NewGaloisField448(nlimbs int) *GaloisField448

NewGaloisField448 will return a newly created, empty field element TODO: use no escape

func NewGaloisField448FromBytes

func NewGaloisField448FromBytes(src []byte) *GaloisField448

NewGaloisField448FromBytes will return a newly created field element with the provided byte array TODO: use no escape

func SubRaw32

SubRaw32 subtracts one galoisfield to another. For a 32 arch TODO: how should be error?

func SubRaw64

SubRaw64 subtracts one galoisfield to another. For a 32 arch TODO: how should be error?

func (*GaloisField448) Copy

func (gf *GaloisField448) Copy() *GaloisField448

Copy copies one galoisfield to another.

func (*GaloisField448) Destroy

func (gf *GaloisField448) Destroy()

Destroy securely wipes and frees the underlying memory of the gf.Limb

Jump to

Keyboard shortcuts

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