field

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

README

field

Within gnark's builder, the Rank-1 Constraint System (R1CS) is used, such as in gnark/constraint/bn254. R1CS implements arithmetic over a field.

Since the R1CS implementation is private and there is a need to support other fields, an independent library for field arithmetic was created.

Currently, the supported fields include bn254 and m31, where the modulus for m31 is $2^{31}-1$.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFieldId

func GetFieldId(f Field) uint64

Types

type Field

type Field interface {
	constraint.Field
	Field() *big.Int
	FieldBitLen() int
	SerializedLen() int
}

func GetFieldById

func GetFieldById(id uint64) Field

func GetFieldFromOrder

func GetFieldFromOrder(x *big.Int) Field

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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