Documentation ¶
Index ¶
- Constants
- func FqMontgomeryReduce(b []byte)
- func IsScalar(s []byte) bool
- func ScalarOrder() []byte
- type EP
- func (ep *EP) Add(a *EP) *EP
- func (ep *EP) Copy() *EP
- func (ep *EP) DecodeCompressed(in []byte) (*EP, error)
- func (ep *EP) DecodeUncompressed(in []byte) (*EP, error)
- func (ep *EP) EncodeCompressed() []byte
- func (ep *EP) EncodeUncompressed() []byte
- func (ep *EP) Equal(a *EP) bool
- func (ep *EP) ScalarBaseMult(s []byte) *EP
- func (ep *EP) ScalarMult(s []byte) *EP
- func (ep *EP) SetOne() *EP
- func (ep *EP) SetZero() *EP
- type EP2
- func (ep2 *EP2) Add(a *EP2) *EP2
- func (ep2 *EP2) Close()
- func (ep2 *EP2) DecodeCompressed(in []byte) (*EP2, error)
- func (ep2 *EP2) DecodeUncompressed(in []byte) (*EP2, error)
- func (ep2 *EP2) EncodeCompressed() []byte
- func (ep2 *EP2) EncodeUncompressed() []byte
- func (ep2 *EP2) Equal(a *EP2) bool
- func (ep2 *EP2) IsZero() bool
- func (ep2 *EP2) ScalarMult(s []byte) *EP2
- func (ep2 *EP2) ScaleByCofactor() *EP2
- func (ep2 *EP2) SetOne() *EP2
- func (ep2 *EP2) SetZero() *EP2
Constants ¶
const ( FqElementSize = 48 G1CompressedSize = FqElementSize G1UncompressedSize = 2 * FqElementSize )
const ( Fq2ElementSize = 96 G2CompressedSize = Fq2ElementSize G2UncompressedSize = 2 * Fq2ElementSize )
Variables ¶
This section is empty.
Functions ¶
func FqMontgomeryReduce ¶
func FqMontgomeryReduce(b []byte)
func ScalarOrder ¶
func ScalarOrder() []byte
Types ¶
type EP ¶
type EP struct {
// contains filtered or unexported fields
}
EP is a point in G1 backed by a relic ep_st.
func (*EP) DecodeCompressed ¶
DecodeCompressed decodes a point according to ebfull/pairing bls12_381 serialization from a byte slice of length G1CompressedSize.
func (*EP) DecodeUncompressed ¶
DecodeUncompressed decodes a point according to ebfull/pairing bls12_381 serialization from a byte slice of length G1UncompressedSize.
func (*EP) EncodeCompressed ¶
EncodeCompressed encodes a point according to ebfull/pairing bls12_381 serialization into a byte slice of length G1CompressedSize.
func (*EP) EncodeUncompressed ¶
EncodeUncompressed encodes a point according to ebfull/pairing bls12_381 serialization into a byte slice of length G1UncompressedSize.
func (*EP) ScalarBaseMult ¶
func (*EP) ScalarMult ¶
type EP2 ¶
type EP2 struct {
// contains filtered or unexported fields
}
EP2 is a point in G2 backed by a relic ep2_t.
EP2 requires manual memory management.
func (*EP2) DecodeCompressed ¶
DecodeCompressed decodes a point according to ebfull/pairing bls12_381 serialization from a byte slice of length G2CompressedSize.
func (*EP2) DecodeUncompressed ¶
DecodeUncompressed decodes a point according to ebfull/pairing bls12_381 serialization from a byte slice of length G2UncompressedSize.
func (*EP2) EncodeCompressed ¶
EncodeCompressed encodes a point according to ebfull/pairing bls12_381 serialization into a byte slice of length G2CompressedSize.
func (*EP2) EncodeUncompressed ¶
EncodeUncompressed encodes a point according to ebfull/pairing bls12_381 serialization into a byte slice of length G2UncompressedSize.