Documentation
¶
Index ¶
- Constants
- func ExpandMsgXmd(msg, dst []byte, lenInBytes int, hashFunc func() hash.Hash) ([]byte, error)
- func Hash(msg, dst []byte, count int, hashFunc func() hash.Hash) ([]fp.Element, error)
- func HashToG1GenericBESwu(msg, dst []byte, hashFunc func() hash.Hash) (bls12381.G1Affine, error)
- type Bls12_377
- func (c *Bls12_377) CompressedG1ByteSize() int
- func (c *Bls12_377) CompressedG2ByteSize() int
- func (c *Bls12_377) CoordinateByteSize() int
- func (c *Bls12_377) FExp(a driver.Gt) driver.Gt
- func (c *Bls12_377) G1ByteSize() int
- func (c *Bls12_377) G2ByteSize() int
- func (c *Bls12_377) GenG1() driver.G1
- func (c *Bls12_377) GenG2() driver.G2
- func (c *Bls12_377) GenGt() driver.Gt
- func (c *Bls12_377) HashToG1(data []byte) driver.G1
- func (p *Bls12_377) HashToG1WithDomain(data, domain []byte) driver.G1
- func (c *Bls12_377) HashToG2(data []byte) driver.G2
- func (p *Bls12_377) HashToG2WithDomain(data, domain []byte) driver.G2
- func (c *Bls12_377) MultiScalarMul(a []driver.G1, b []driver.Zr) driver.G1
- func (c *Bls12_377) NewG1() driver.G1
- func (c *Bls12_377) NewG1FromBytes(b []byte) driver.G1
- func (c *Bls12_377) NewG1FromCompressed(b []byte) driver.G1
- func (c *Bls12_377) NewG2() driver.G2
- func (c *Bls12_377) NewG2FromBytes(b []byte) driver.G2
- func (c *Bls12_377) NewG2FromCompressed(b []byte) driver.G2
- func (c *Bls12_377) NewGtFromBytes(b []byte) driver.Gt
- func (c *Bls12_377) Pairing(p2 driver.G2, p1 driver.G1) driver.Gt
- func (c *Bls12_377) Pairing2(p2a, p2b driver.G2, p1a, p1b driver.G1) driver.Gt
- func (c *Bls12_377) ScalarByteSize() int
- type Bn254
- func (c *Bn254) CompressedG1ByteSize() int
- func (c *Bn254) CompressedG2ByteSize() int
- func (c *Bn254) CoordinateByteSize() int
- func (c *Bn254) FExp(a driver.Gt) driver.Gt
- func (c *Bn254) G1ByteSize() int
- func (c *Bn254) G2ByteSize() int
- func (c *Bn254) GenG1() driver.G1
- func (c *Bn254) GenG2() driver.G2
- func (c *Bn254) GenGt() driver.Gt
- func (c *Bn254) HashToG1(data []byte) driver.G1
- func (p *Bn254) HashToG1WithDomain(data, domain []byte) driver.G1
- func (c *Bn254) HashToG2(data []byte) driver.G2
- func (p *Bn254) HashToG2WithDomain(data, domain []byte) driver.G2
- func (c *Bn254) MultiScalarMul(a []driver.G1, b []driver.Zr) driver.G1
- func (c *Bn254) NewG1() driver.G1
- func (c *Bn254) NewG1FromBytes(b []byte) driver.G1
- func (c *Bn254) NewG1FromCompressed(b []byte) driver.G1
- func (c *Bn254) NewG2() driver.G2
- func (c *Bn254) NewG2FromBytes(b []byte) driver.G2
- func (c *Bn254) NewG2FromCompressed(b []byte) driver.G2
- func (c *Bn254) NewGtFromBytes(b []byte) driver.Gt
- func (c *Bn254) Pairing(p2 driver.G2, p1 driver.G1) driver.Gt
- func (c *Bn254) Pairing2(p2a, p2b driver.G2, p1a, p1b driver.G1) driver.Gt
- func (c *Bn254) ScalarByteSize() int
- type Element
- type G1Affine
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
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
Hash msg to count prime field elements. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-5.2
Types ¶
type Bls12_377 ¶ added in v0.1.0
func NewBls12_377 ¶ added in v0.1.0
func NewBls12_377() *Bls12_377
func (*Bls12_377) CompressedG1ByteSize ¶ added in v0.1.0
func (*Bls12_377) CompressedG2ByteSize ¶ added in v0.1.0
func (*Bls12_377) CoordinateByteSize ¶ added in v0.1.0
func (*Bls12_377) G1ByteSize ¶ added in v0.1.0
func (*Bls12_377) G2ByteSize ¶ added in v0.1.0
func (*Bls12_377) HashToG1WithDomain ¶ added in v0.1.0
func (*Bls12_377) HashToG2WithDomain ¶ added in v0.1.0
func (*Bls12_377) MultiScalarMul ¶ added in v0.1.0
func (*Bls12_377) NewG1FromBytes ¶ added in v0.1.0
func (*Bls12_377) NewG1FromCompressed ¶ added in v0.1.0
func (*Bls12_377) NewG2FromBytes ¶ added in v0.1.0
func (*Bls12_377) NewG2FromCompressed ¶ added in v0.1.0
func (*Bls12_377) NewGtFromBytes ¶ added in v0.1.0
func (*Bls12_377) ScalarByteSize ¶ added in v0.1.0
type Bn254 ¶
func (*Bn254) CompressedG1ByteSize ¶ added in v0.1.0
func (*Bn254) CompressedG2ByteSize ¶ added in v0.1.0
func (*Bn254) CoordinateByteSize ¶ added in v0.1.0
func (*Bn254) G1ByteSize ¶ added in v0.1.0
func (*Bn254) G2ByteSize ¶ added in v0.1.0
func (*Bn254) HashToG1WithDomain ¶ added in v0.1.0
func (*Bn254) HashToG2WithDomain ¶ added in v0.1.0
func (*Bn254) MultiScalarMul ¶ added in v0.1.0
func (*Bn254) NewG1FromCompressed ¶ added in v0.1.0
func (*Bn254) NewG2FromCompressed ¶ added in v0.1.0
func (*Bn254) ScalarByteSize ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.