gurvy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const Bits = 381 // number of bits needed to represent a Element

Variables

This section is empty.

Functions

func ExpandMsgXmd added in v0.1.0

func ExpandMsgXmd(msg, dst []byte, lenInBytes int, hashFunc func() hash.Hash) ([]byte, error)

ExpandMsgXmd expands msg to a slice of lenInBytes bytes. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-5 https://tools.ietf.org/html/rfc8017#section-4.1 (I2OSP/O2ISP)

func Hash added in v0.1.0

func Hash(msg, dst []byte, count int, hashFunc func() hash.Hash) ([]fp.Element, error)

Hash msg to count prime field elements. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-5.2

func HashToG1GenericBESwu added in v0.1.0

func HashToG1GenericBESwu(msg, dst []byte, hashFunc func() hash.Hash) (bls12381.G1Affine, error)

Types

type Bls12_377 added in v0.1.0

type Bls12_377 struct {
	common.CurveBase
}

func NewBls12_377 added in v0.1.0

func NewBls12_377() *Bls12_377

func (*Bls12_377) CompressedG1ByteSize added in v0.1.0

func (c *Bls12_377) CompressedG1ByteSize() int

func (*Bls12_377) CompressedG2ByteSize added in v0.1.0

func (c *Bls12_377) CompressedG2ByteSize() int

func (*Bls12_377) CoordinateByteSize added in v0.1.0

func (c *Bls12_377) CoordinateByteSize() int

func (*Bls12_377) FExp added in v0.1.0

func (c *Bls12_377) FExp(a driver.Gt) driver.Gt

func (*Bls12_377) G1ByteSize added in v0.1.0

func (c *Bls12_377) G1ByteSize() int

func (*Bls12_377) G2ByteSize added in v0.1.0

func (c *Bls12_377) G2ByteSize() int

func (*Bls12_377) GenG1 added in v0.1.0

func (c *Bls12_377) GenG1() driver.G1

func (*Bls12_377) GenG2 added in v0.1.0

func (c *Bls12_377) GenG2() driver.G2

func (*Bls12_377) GenGt added in v0.1.0

func (c *Bls12_377) GenGt() driver.Gt

func (*Bls12_377) HashToG1 added in v0.1.0

func (c *Bls12_377) HashToG1(data []byte) driver.G1

func (*Bls12_377) HashToG1WithDomain added in v0.1.0

func (p *Bls12_377) HashToG1WithDomain(data, domain []byte) driver.G1

func (*Bls12_377) HashToG2 added in v0.1.0

func (c *Bls12_377) HashToG2(data []byte) driver.G2

func (*Bls12_377) HashToG2WithDomain added in v0.1.0

func (p *Bls12_377) HashToG2WithDomain(data, domain []byte) driver.G2

func (*Bls12_377) MultiScalarMul added in v0.1.0

func (c *Bls12_377) MultiScalarMul(a []driver.G1, b []driver.Zr) driver.G1

func (*Bls12_377) NewG1 added in v0.1.0

func (c *Bls12_377) NewG1() driver.G1

func (*Bls12_377) NewG1FromBytes added in v0.1.0

func (c *Bls12_377) NewG1FromBytes(b []byte) driver.G1

func (*Bls12_377) NewG1FromCompressed added in v0.1.0

func (c *Bls12_377) NewG1FromCompressed(b []byte) driver.G1

func (*Bls12_377) NewG2 added in v0.1.0

func (c *Bls12_377) NewG2() driver.G2

func (*Bls12_377) NewG2FromBytes added in v0.1.0

func (c *Bls12_377) NewG2FromBytes(b []byte) driver.G2

func (*Bls12_377) NewG2FromCompressed added in v0.1.0

func (c *Bls12_377) NewG2FromCompressed(b []byte) driver.G2

func (*Bls12_377) NewGtFromBytes added in v0.1.0

func (c *Bls12_377) NewGtFromBytes(b []byte) driver.Gt

func (*Bls12_377) Pairing added in v0.1.0

func (c *Bls12_377) Pairing(p2 driver.G2, p1 driver.G1) driver.Gt

func (*Bls12_377) Pairing2 added in v0.1.0

func (c *Bls12_377) Pairing2(p2a, p2b driver.G2, p1a, p1b driver.G1) driver.Gt

func (*Bls12_377) ScalarByteSize added in v0.1.0

func (c *Bls12_377) ScalarByteSize() int

type Bn254

type Bn254 struct {
	common.CurveBase
}

func NewBn254 added in v0.1.0

func NewBn254() *Bn254

func (*Bn254) CompressedG1ByteSize added in v0.1.0

func (c *Bn254) CompressedG1ByteSize() int

func (*Bn254) CompressedG2ByteSize added in v0.1.0

func (c *Bn254) CompressedG2ByteSize() int

func (*Bn254) CoordinateByteSize added in v0.1.0

func (c *Bn254) CoordinateByteSize() int

func (*Bn254) FExp

func (c *Bn254) FExp(a driver.Gt) driver.Gt

func (*Bn254) G1ByteSize added in v0.1.0

func (c *Bn254) G1ByteSize() int

func (*Bn254) G2ByteSize added in v0.1.0

func (c *Bn254) G2ByteSize() int

func (*Bn254) GenG1

func (c *Bn254) GenG1() driver.G1

func (*Bn254) GenG2

func (c *Bn254) GenG2() driver.G2

func (*Bn254) GenGt

func (c *Bn254) GenGt() driver.Gt

func (*Bn254) HashToG1

func (c *Bn254) HashToG1(data []byte) driver.G1

func (*Bn254) HashToG1WithDomain added in v0.1.0

func (p *Bn254) HashToG1WithDomain(data, domain []byte) driver.G1

func (*Bn254) HashToG2 added in v0.1.0

func (c *Bn254) HashToG2(data []byte) driver.G2

func (*Bn254) HashToG2WithDomain added in v0.1.0

func (p *Bn254) HashToG2WithDomain(data, domain []byte) driver.G2

func (*Bn254) MultiScalarMul added in v0.1.0

func (c *Bn254) MultiScalarMul(a []driver.G1, b []driver.Zr) driver.G1

func (*Bn254) NewG1

func (c *Bn254) NewG1() driver.G1

func (*Bn254) NewG1FromBytes

func (c *Bn254) NewG1FromBytes(b []byte) driver.G1

func (*Bn254) NewG1FromCompressed added in v0.1.0

func (c *Bn254) NewG1FromCompressed(b []byte) driver.G1

func (*Bn254) NewG2

func (c *Bn254) NewG2() driver.G2

func (*Bn254) NewG2FromBytes

func (c *Bn254) NewG2FromBytes(b []byte) driver.G2

func (*Bn254) NewG2FromCompressed added in v0.1.0

func (c *Bn254) NewG2FromCompressed(b []byte) driver.G2

func (*Bn254) NewGtFromBytes

func (c *Bn254) NewGtFromBytes(b []byte) driver.Gt

func (*Bn254) Pairing

func (c *Bn254) Pairing(p2 driver.G2, p1 driver.G1) driver.Gt

func (*Bn254) Pairing2

func (c *Bn254) Pairing2(p2a, p2b driver.G2, p1a, p1b driver.G1) driver.Gt

func (*Bn254) ScalarByteSize added in v0.1.0

func (c *Bn254) ScalarByteSize() int

type Element added in v0.1.0

type Element [6]uint64

type G1Affine added in v0.1.0

type G1Affine struct {
	X, Y fp.Element
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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