Documentation
¶
Index ¶
- func CheckG1AndG2DiscreteLogEquality(pointG1 *bn254.G1Affine, pointG2 *bn254.G2Affine) (bool, error)
- func DeserializeG1(b []byte) *bn254.G1Affine
- func DeserializeG2(b []byte) *bn254.G2Affine
- func GetG1Generator() *bn254.G1Affine
- func GetG2Generator() *bn254.G2Affine
- func MapToCurve(digest [32]byte) *bn254.G1Affine
- func MulByGeneratorG1(a *fr.Element) *bn254.G1Affine
- func MulByGeneratorG2(a *fr.Element) *bn254.G2Affine
- func SerializeG1(p *bn254.G1Affine) []byte
- func SerializeG2(p *bn254.G2Affine) []byte
- func VerifySig(sig *bn254.G1Affine, pubkey *bn254.G2Affine, msgBytes [32]byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeG1 ¶
func DeserializeG2 ¶
func GetG1Generator ¶
func GetG2Generator ¶
func MapToCurve ¶
MapToCurve implements the simple hash-and-check (also sometimes try-and-increment) algorithm see https://hackmd.io/@benjaminion/bls12-381#Hash-and-check Note that this function needs to be the same as the one used in the contract: we don't use the newer constant time hash-to-curve algorithms as they are gas-expensive to compute onchain
func SerializeG1 ¶
func SerializeG2 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.