Documentation ¶
Index ¶
- Variables
- func AddG1(dst *G1Point, a *G1Point, b *G1Point)
- func AddG2(dst *G2Point, a *G2Point, b *G2Point)
- func AddModFr(dst *Fr, a, b *Fr)
- func AsFr(dst *Fr, i uint64)
- func ClearG1(x *G1Point)
- func ClearG2(x *G2Point)
- func CopyFr(dst *Fr, v *Fr)
- func CopyG1(dst *G1Point, v *G1Point)
- func CopyG2(dst *G2Point, v *G2Point)
- func DebugG1s(msg string, values []G1Point)
- func DivModFr(dst *Fr, a, b *Fr)
- func EqualFr(a *Fr, b *Fr) bool
- func EqualG1(a *G1Point, b *G1Point) bool
- func EqualG2(a *G2Point, b *G2Point) bool
- func EqualOne(v *Fr) bool
- func EqualZero(v *Fr) bool
- func EvalPolyAt(dst *Fr, p []Fr, x *Fr)
- func EvalPolyAtUnoptimized(dst *Fr, coeffs []Fr, x *Fr)
- func FrFrom32(dst *Fr, v [32]byte) (ok bool)
- func FrStr(b *Fr) string
- func FrTo32(src *Fr) (v [32]byte)
- func IntAsFr(dst *Fr, i uint64)
- func InvModFr(dst *Fr, v *Fr)
- func IsPowerOfTwo(v uint64) bool
- func MulG1(dst *G1Point, a *G1Point, b *Fr)
- func MulG2(dst *G2Point, a *G2Point, b *Fr)
- func MulModFr(dst *Fr, a, b *Fr)
- func NegG1(dst *G1Point)
- func NegG2(dst *G2Point)
- func NegModFr(dst *Fr, v *Fr)
- func PairingsVerify(a1 *G1Point, a2 *G2Point, b1 *G1Point, b2 *G2Point) bool
- func SetFr(dst *Fr, v string)
- func StrG1(v *G1Point) string
- func StrG2(v *G2Point) string
- func SubG1(dst *G1Point, a *G1Point, b *G1Point)
- func SubG2(dst *G2Point, a *G2Point, b *G2Point)
- func SubModFr(dst *Fr, a, b *Fr)
- func ToCompressedG1(p *G1Point) []byte
- func ToCompressedG2(p *G2Point) []byte
- func ValidFr(val [32]byte) bool
- type Fr
- type G1Point
- type G2Point
Constants ¶
This section is empty.
Variables ¶
var Scale2RootOfUnity []Fr
Functions ¶
func ClearG1 ¶
func ClearG1(x *G1Point)
zeroes the point (like herumi BLS does with theirs). This is not co-factor clearing.
func ClearG2 ¶
func ClearG2(x *G2Point)
zeroes the point (like herumi BLS does with theirs). This is not co-factor clearing.
func EvalPolyAt ¶
func EvalPolyAtUnoptimized ¶
func FrFrom32 ¶
FrFrom32 mutates the fr num. The value v is little-endian 32-bytes. Returns false, without modifying dst, if the value is out of range.
func IsPowerOfTwo ¶
func PairingsVerify ¶
e(a1^(-1), a2) * e(b1, b2) = 1_T
func ToCompressedG1 ¶
func ToCompressedG2 ¶
Types ¶
type Fr ¶
Note: with Kilic BLS, we exclusively represent Fr in mont-red form. Whenever it is used with G1/G2, it needs to be normalized first.
var INVERSE_TWO Fr
var MODULUS_MINUS1, MODULUS_MINUS1_DIV2, MODULUS_MINUS2 Fr
var ZERO, ONE, TWO Fr
type G1Point ¶
TODO types file, swap BLS with build args
var GenG1 G1Point
var ZERO_G1 G1Point
var ZeroG1 G1Point
func FromCompressedG1 ¶
func (*G1Point) MarshalText ¶
MarshalText encodes G1Point into hex formatted text (no 0x prefix)
func (*G1Point) UnmarshalText ¶
UnmarshalText decodes hex formatted text (no 0x prefix) into a G1Point
type G2Point ¶
var GenG2 G2Point
var ZeroG2 G2Point
func FromCompressedG2 ¶
func (*G2Point) MarshalText ¶
MarshalText encodes G2Point into hex formatted text (no 0x prefix)
func (*G2Point) UnmarshalText ¶
UnmarshalText decodes hex formatted text (no 0x prefix) into a G2Point