field

package
v0.0.0-...-7a7f204 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModP                 = uint32(2147483647) // 2^31 - 1
	Bytes                = 4
	Bits                 = 31
	Mask                 = 127
	ConcurrentExecutions = 4
)

Variables

This section is empty.

Functions

func BytesToElements

func BytesToElements(out []uint32, in []byte)

func NegateVector

func NegateVector(in []uint32) []uint32

func RandElement

func RandElement() uint32

func RandElementWithPRG

func RandElementWithPRG(rnd io.Reader) uint32

func RandVector

func RandVector(length int) []uint32

func RandVectorWithPRG

func RandVectorWithPRG(length int, rnd io.Reader) []uint32

func VectorToBytes

func VectorToBytes(in interface{}) []byte

VectorToBytes extracts bytes from a vector of field elements. Assume that only 3 bytes worth of data are embedded in each field toElement and therefore strips the initial zero from each field toElement.

Types

type Element

type Element uint32

Jump to

Keyboard shortcuts

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