field

package
v1.0.2032 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	// contains filtered or unexported fields
}

func (*Element) Add

func (v *Element) Add(x, y *Element) *Element

Add sets v = a + b, and returns v.

func (*Element) Bytes

func (v *Element) Bytes() []byte

func (*Element) Equal

func (v *Element) Equal(x *Element) int

Equal returns 1 if v and u are equal, and 0 otherwise.

func (*Element) Inv

func (v *Element) Inv(z *Element) *Element

Inv sets v = 1/z mod p, and returns v.

func (*Element) IsZero

func (v *Element) IsZero() int

Equal returns 1 if v equals zero, and 0 otherwise.

func (*Element) Mul

func (v *Element) Mul(a, b *Element) *Element

Mul sets v = x * y, and returns v.

func (*Element) Neg

func (v *Element) Neg(x *Element) *Element

Negate sets v = -a, and returns v.

func (*Element) One

func (v *Element) One()

func (*Element) Select

func (v *Element) Select(a, b *Element, cond int) *Element

Select sets v to a if cond == 1, and to b if cond == 0.

func (*Element) Set

func (v *Element) Set(x *Element) *Element

Set sets v = a, and returns v.

func (*Element) SetBytes

func (v *Element) SetBytes(x []byte) error

func (*Element) Square

func (v *Element) Square(x *Element) *Element

Square sets v = x * x, and returns v.

func (*Element) Sub

func (v *Element) Sub(x, y *Element) *Element

Subtract sets v = a - b, and returns v.

func (*Element) Swap

func (v *Element) Swap(u *Element, cond int)

Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v.

func (*Element) Zero

func (v *Element) Zero()

Jump to

Keyboard shortcuts

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