bls

package
v0.0.0-...-a4754aa Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BLS12_381 = C.MCL_BLS12_381

BLS12_381 --

View Source
const CurveFp254BNb = C.mclBn_CurveFp254BNb

CurveFp254BNb -- 254 bit curve

View Source
const CurveFp382_1 = C.mclBn_CurveFp382_1

CurveFp382_1 -- 382 bit curve 1

View Source
const CurveFp382_2 = C.mclBn_CurveFp382_2

CurveFp382_2 -- 382 bit curve 2

View Source
const EthModeDraft05 = C.BLS_ETH_MODE_DRAFT_05
View Source
const EthModeDraft06 = C.BLS_ETH_MODE_DRAFT_06
View Source
const EthModeDraft07 = C.BLS_ETH_MODE_DRAFT_07
View Source
const EthModeLatest = C.BLS_ETH_MODE_LATEST
View Source
const EthModeOld = C.BLS_ETH_MODE_OLD
View Source
const IO_EC_AFFINE = C.MCLBN_IO_EC_AFFINE

IO_EC_AFFINE --

View Source
const IO_EC_PROJ = C.MCLBN_IO_EC_PROJ

IO_EC_PROJ --

View Source
const IRTF = 5 /* MCL_MAP_TO_MODE_HASH_TO_CURVE_07 */

IRTF -- for SetMapToMode

View Source
const IoSerializeHexStr = C.MCLBN_IO_SERIALIZE_HEX_STR

IoSerializeHexStr --

View Source
const ZERO_HEADER = 1 << 6

Variables

This section is empty.

Functions

func BlsGetGeneratorOfPublicKey

func BlsGetGeneratorOfPublicKey(pub *PublicKey)

keep for backward compatibility

func FinalExp

func FinalExp(out *GT, x *GT)

FinalExp --

func Fp2Add

func Fp2Add(out *Fp2, x *Fp2, y *Fp2)

Fp2Add --

func Fp2Div

func Fp2Div(out *Fp2, x *Fp2, y *Fp2)

Fp2Div --

func Fp2Inv

func Fp2Inv(out *Fp2, x *Fp2)

Fp2Inv --

func Fp2Mul

func Fp2Mul(out *Fp2, x *Fp2, y *Fp2)

Fp2Mul --

func Fp2Neg

func Fp2Neg(out *Fp2, x *Fp2)

Fp2Neg --

func Fp2Sqr

func Fp2Sqr(out *Fp2, x *Fp2)

Fp2Sqr --

func Fp2SquareRoot

func Fp2SquareRoot(out *Fp2, x *Fp2) bool

Fp2SquareRoot --

func Fp2Sub

func Fp2Sub(out *Fp2, x *Fp2, y *Fp2)

Fp2Sub --

func FpAdd

func FpAdd(out *Fp, x *Fp, y *Fp)

FpAdd --

func FpDiv

func FpDiv(out *Fp, x *Fp, y *Fp)

FpDiv --

func FpInv

func FpInv(out *Fp, x *Fp)

FpInv --

func FpMul

func FpMul(out *Fp, x *Fp, y *Fp)

FpMul --

func FpNeg

func FpNeg(out *Fp, x *Fp)

FpNeg --

func FpSqr

func FpSqr(out *Fp, x *Fp)

FpSqr --

func FpSquareRoot

func FpSquareRoot(out *Fp, x *Fp) bool

FpSquareRoot --

func FpSub

func FpSub(out *Fp, x *Fp, y *Fp)

FpSub --

func FrAdd

func FrAdd(out *Fr, x *Fr, y *Fr)

FrAdd --

func FrDiv

func FrDiv(out *Fr, x *Fr, y *Fr)

FrDiv --

func FrEvaluatePolynomial

func FrEvaluatePolynomial(y *Fr, c []Fr, x *Fr) error

FrEvaluatePolynomial -- y = c[0] + c[1] * x + c[2] * x^2 + ...

func FrInv

func FrInv(out *Fr, x *Fr)

FrInv --

func FrLagrangeInterpolation

func FrLagrangeInterpolation(out *Fr, xVec []Fr, yVec []Fr) error

FrLagrangeInterpolation --

func FrMul

func FrMul(out *Fr, x *Fr, y *Fr)

FrMul --

func FrNeg

func FrNeg(out *Fr, x *Fr)

FrNeg --

func FrSqr

func FrSqr(out *Fr, x *Fr)

FrSqr --

func FrSquareRoot

func FrSquareRoot(out *Fr, x *Fr) bool

FrSquareRoot --

func FrSub

func FrSub(out *Fr, x *Fr, y *Fr)

FrSub --

func G1Add

func G1Add(out *G1, x *G1, y *G1)

G1Add --

func G1Dbl

func G1Dbl(out *G1, x *G1)

G1Dbl --

func G1EvaluatePolynomial

func G1EvaluatePolynomial(y *G1, c []G1, x *Fr) error

G1EvaluatePolynomial -- y = c[0] + c[1] * x + c[2] * x^2 + ...

func G1LagrangeInterpolation

func G1LagrangeInterpolation(out *G1, xVec []Fr, yVec []G1) error

G1LagrangeInterpolation --

func G1Mul

func G1Mul(out *G1, x *G1, y *Fr)

G1Mul --

func G1MulCT

func G1MulCT(out *G1, x *G1, y *Fr)

G1MulCT -- constant time (depending on bit lengh of y)

func G1MulVec

func G1MulVec(out *G1, xVec []G1, yVec []Fr)

G1MulVec -- multi scalar multiplication out = sum mul(xVec[i], yVec[i])

func G1Neg

func G1Neg(out *G1, x *G1)

G1Neg --

func G1Normalize

func G1Normalize(out *G1, x *G1)

G1Normalize --

func G1Sub

func G1Sub(out *G1, x *G1, y *G1)

G1Sub --

func G2Add

func G2Add(out *G2, x *G2, y *G2)

G2Add --

func G2Dbl

func G2Dbl(out *G2, x *G2)

G2Dbl --

func G2EvaluatePolynomial

func G2EvaluatePolynomial(y *G2, c []G2, x *Fr) error

G2EvaluatePolynomial -- y = c[0] + c[1] * x + c[2] * x^2 + ...

func G2LagrangeInterpolation

func G2LagrangeInterpolation(out *G2, xVec []Fr, yVec []G2) error

G2LagrangeInterpolation --

func G2Mul

func G2Mul(out *G2, x *G2, y *Fr)

G2Mul --

func G2MulVec

func G2MulVec(out *G2, xVec []G2, yVec []Fr)

G2MulVec -- multi scalar multiplication out = sum mul(xVec[i], yVec[i])

func G2Neg

func G2Neg(out *G2, x *G2)

G2Neg --

func G2Normalize

func G2Normalize(out *G2, x *G2)

G2Normalize --

func G2Sub

func G2Sub(out *G2, x *G2, y *G2)

G2Sub --

func GTAdd

func GTAdd(out *GT, x *GT, y *GT)

GTAdd --

func GTDiv

func GTDiv(out *GT, x *GT, y *GT)

GTDiv --

func GTInv

func GTInv(out *GT, x *GT)

GTInv --

func GTMul

func GTMul(out *GT, x *GT, y *GT)

GTMul --

func GTNeg

func GTNeg(out *GT, x *GT)

GTNeg --

func GTPow

func GTPow(out *GT, x *GT, y *Fr)

GTPow --

func GTSub

func GTSub(out *GT, x *GT, y *GT)

GTSub --

func GetCurveOrder

func GetCurveOrder() string

GetCurveOrder -- return the order of G1

func GetFieldOrder

func GetFieldOrder() string

GetFieldOrder -- return the characteristic of the field where a curve is defined

func GetFpByteSize

func GetFpByteSize() int

GetFpByteSize -- the serialized size of Fp

func GetFpUnitSize

func GetFpUnitSize() int

GetFpUnitSize -- same as GetMaxOpUnitSize()

func GetFrByteSize

func GetFrByteSize() int

GetFrByteSize -- the serialized size of Fr

func GetFrUnitSize

func GetFrUnitSize() int

GetFrUnitSize --

func GetG1ByteSize

func GetG1ByteSize() int

GetG1ByteSize -- the serialized size of G1

func GetG2ByteSize

func GetG2ByteSize() int

GetG2ByteSize -- the serialized size of G2

func GetGeneratorOfPublicKey

func GetGeneratorOfPublicKey(pub *PublicKey)

GetGeneratorOfPublicKey -

func GetMaxOpUnitSize

func GetMaxOpUnitSize() int

GetMaxOpUnitSize --

func GetOpUnitSize

func GetOpUnitSize() int

GetOpUnitSize -- the length of Fr is GetOpUnitSize() * 8 bytes

func GetUint64NumToPrecompute

func GetUint64NumToPrecompute() int

GetUint64NumToPrecompute --

func Init

func Init(curve int) error

Init -- call this function before calling all the other operations this function is not thread safe

func MapToG1

func MapToG1(out *G1, x *Fp) error

MapToG1 --

func MapToG2

func MapToG2(out *G2, x *Fp2) error

MapToG2 --

func MillerLoop

func MillerLoop(out *GT, x *G1, y *G2)

MillerLoop --

func MillerLoopVec

func MillerLoopVec(out *GT, xVec []G1, yVec []G2)

MillerLoopVec -- multi pairings ; out = prod_i e(xVec[i], yVec[i])

func Pairing

func Pairing(out *GT, x *G1, y *G2)

Pairing --

func PrecomputeG2

func PrecomputeG2(Qbuf []uint64, Q *G2)

PrecomputeG2 --

func PrecomputedMillerLoop

func PrecomputedMillerLoop(out *GT, P *G1, Qbuf []uint64)

PrecomputedMillerLoop --

func PrecomputedMillerLoop2

func PrecomputedMillerLoop2(out *GT, P1 *G1, Q1buf []uint64, P2 *G1, Q2buf []uint64)

PrecomputedMillerLoop2 --

func SetETHserialization

func SetETHserialization(enable bool)

SetETHserialization --

func SetGeneratorOfPublicKey

func SetGeneratorOfPublicKey(pub *PublicKey) error

SetGeneratorOfPublicKey -

func SetMapToMode

func SetMapToMode(mode int) error

SetMapToMode --

func SetRandFunc

func SetRandFunc(randReader io.Reader)

SetRandFunc --

func SignatureVerifyOrder

func SignatureVerifyOrder(doVerify bool)

SignatureVerifyOrder -- check the correctness of the order of signature in deserialize if true

func VerifyOrderG1

func VerifyOrderG1(doVerify bool)

VerifyOrderG1 -- verify order if SetString/Deserialize are called

func VerifyOrderG2

func VerifyOrderG2(doVerify bool)

VerifyOrderG2 -- verify order if SetString/Deserialize are called

func VerifyPairing

func VerifyPairing(X *Sign, Y *Sign, pub *PublicKey) bool

VerifyPairing --

func VerifyPublicKeyOrder

func VerifyPublicKeyOrder(doVerify bool)

VerifyPublicKeyOrder --

func VerifySignatureOrder

func VerifySignatureOrder(doVerify bool)

VerifySignatureOrder --

Types

type Fp

type Fp struct {
	// contains filtered or unexported fields
}

Fp --

func (*Fp) Clear

func (x *Fp) Clear()

Clear --

func (*Fp) Deserialize

func (x *Fp) Deserialize(buf []byte) error

Deserialize --

func (*Fp) GetString

func (x *Fp) GetString(base int) string

GetString --

func (*Fp) IsEqual

func (x *Fp) IsEqual(rhs *Fp) bool

IsEqual --

func (*Fp) IsNegative

func (x *Fp) IsNegative() bool

IsNegative -- true if x >= (p + 1) / 2

func (*Fp) IsOdd

func (x *Fp) IsOdd() bool

IsOdd --

func (*Fp) IsOne

func (x *Fp) IsOne() bool

IsOne --

func (*Fp) IsValid

func (x *Fp) IsValid() bool

IsValid --

func (*Fp) IsZero

func (x *Fp) IsZero() bool

IsZero --

func (*Fp) Serialize

func (x *Fp) Serialize() []byte

Serialize --

func (*Fp) SetBigEndianMod

func (x *Fp) SetBigEndianMod(buf []byte) error

SetBigEndianMod --

func (*Fp) SetByCSPRNG

func (x *Fp) SetByCSPRNG()

SetByCSPRNG --

func (*Fp) SetHashOf

func (x *Fp) SetHashOf(buf []byte) bool

SetHashOf --

func (*Fp) SetInt64

func (x *Fp) SetInt64(v int64)

SetInt64 --

func (*Fp) SetLittleEndian

func (x *Fp) SetLittleEndian(buf []byte) error

SetLittleEndian --

func (*Fp) SetLittleEndianMod

func (x *Fp) SetLittleEndianMod(buf []byte) error

SetLittleEndianMod --

func (*Fp) SetString

func (x *Fp) SetString(s string, base int) error

SetString --

type Fp2

type Fp2 struct {
	D [2]Fp
}

Fp2 -- x = D[0] + D[1] i where i^2 = -1

func (*Fp2) Clear

func (x *Fp2) Clear()

Clear --

func (*Fp2) Deserialize

func (x *Fp2) Deserialize(buf []byte) error

Deserialize --

func (*Fp2) IsEqual

func (x *Fp2) IsEqual(rhs *Fp2) bool

IsEqual --

func (*Fp2) IsOne

func (x *Fp2) IsOne() bool

IsOne --

func (*Fp2) IsZero

func (x *Fp2) IsZero() bool

IsZero --

func (*Fp2) Serialize

func (x *Fp2) Serialize() []byte

Serialize --

type Fr

type Fr struct {
	// contains filtered or unexported fields
}

Fr --

func CastFromSecretKey

func CastFromSecretKey(in *SecretKey) *Fr

func (*Fr) Clear

func (x *Fr) Clear()

Clear --

func (*Fr) Deserialize

func (x *Fr) Deserialize(buf []byte) error

Deserialize --

func (*Fr) GetString

func (x *Fr) GetString(base int) string

GetString --

func (*Fr) IsEqual

func (x *Fr) IsEqual(rhs *Fr) bool

IsEqual --

func (*Fr) IsNegative

func (x *Fr) IsNegative() bool

IsNegative -- true if x >= (r + 1) / 2

func (*Fr) IsOdd

func (x *Fr) IsOdd() bool

IsOdd --

func (*Fr) IsOne

func (x *Fr) IsOne() bool

IsOne --

func (*Fr) IsValid

func (x *Fr) IsValid() bool

IsValid --

func (*Fr) IsZero

func (x *Fr) IsZero() bool

IsZero --

func (*Fr) Serialize

func (x *Fr) Serialize() []byte

Serialize --

func (*Fr) SetBigEndianMod

func (x *Fr) SetBigEndianMod(buf []byte) error

SetBigEndianMod --

func (*Fr) SetByCSPRNG

func (x *Fr) SetByCSPRNG()

SetByCSPRNG --

func (*Fr) SetHashOf

func (x *Fr) SetHashOf(buf []byte) bool

SetHashOf --

func (*Fr) SetInt64

func (x *Fr) SetInt64(v int64)

SetInt64 --

func (*Fr) SetLittleEndian

func (x *Fr) SetLittleEndian(buf []byte) error

SetLittleEndian --

func (*Fr) SetLittleEndianMod

func (x *Fr) SetLittleEndianMod(buf []byte) error

SetLittleEndianMod --

func (*Fr) SetString

func (x *Fr) SetString(s string, base int) error

SetString --

type G1

type G1 struct {
	X Fp
	Y Fp
	Z Fp
}

G1 --

func CastFromSign

func CastFromSign(in *Sign) *G1

func (*G1) Clear

func (x *G1) Clear()

Clear --

func (*G1) Deserialize

func (x *G1) Deserialize(buf []byte) error

Deserialize --

func (*G1) DeserializeUncompressed

func (x *G1) DeserializeUncompressed(buf []byte) error

DeserializeUncompressed -- x.Deserialize() + y.Deserialize()

func (*G1) GetString

func (x *G1) GetString(base int) string

GetString --

func (*G1) HashAndMapTo

func (x *G1) HashAndMapTo(buf []byte) error

HashAndMapTo --

func (*G1) IsEqual

func (x *G1) IsEqual(rhs *G1) bool

IsEqual --

func (*G1) IsValid

func (x *G1) IsValid() bool

IsValid --

func (*G1) IsValidOrder

func (x *G1) IsValidOrder() bool

IsValidOrder --

func (*G1) IsZero

func (x *G1) IsZero() bool

IsZero --

func (*G1) Serialize

func (x *G1) Serialize() []byte

Serialize --

func (*G1) SerializeUncompressed

func (x *G1) SerializeUncompressed() []byte

SerializeUncompressed -- all zero array if x.IsZero()

func (*G1) SetString

func (x *G1) SetString(s string, base int) error

SetString --

type G2

type G2 struct {
	X Fp2
	Y Fp2
	Z Fp2
}

G2 --

func CastFromPublicKey

func CastFromPublicKey(in *PublicKey) *G2

func (*G2) Clear

func (x *G2) Clear()

Clear --

func (*G2) Deserialize

func (x *G2) Deserialize(buf []byte) error

Deserialize --

func (*G2) DeserializeUncompressed

func (x *G2) DeserializeUncompressed(buf []byte) error

DeserializeUncompressed -- x.Deserialize() + y.Deserialize()

func (*G2) GetString

func (x *G2) GetString(base int) string

GetString --

func (*G2) HashAndMapTo

func (x *G2) HashAndMapTo(buf []byte) error

HashAndMapTo --

func (*G2) IsEqual

func (x *G2) IsEqual(rhs *G2) bool

IsEqual --

func (*G2) IsValid

func (x *G2) IsValid() bool

IsValid --

func (*G2) IsValidOrder

func (x *G2) IsValidOrder() bool

IsValidOrder --

func (*G2) IsZero

func (x *G2) IsZero() bool

IsZero --

func (*G2) Serialize

func (x *G2) Serialize() []byte

Serialize --

func (*G2) SerializeUncompressed

func (x *G2) SerializeUncompressed() []byte

SerializeUncompressed -- all zero array if x.IsZero()

func (*G2) SetString

func (x *G2) SetString(s string, base int) error

SetString --

type GT

type GT struct {
	// contains filtered or unexported fields
}

GT --

func (*GT) Clear

func (x *GT) Clear()

Clear --

func (*GT) Deserialize

func (x *GT) Deserialize(buf []byte) error

Deserialize --

func (*GT) GetString

func (x *GT) GetString(base int) string

GetString --

func (*GT) IsEqual

func (x *GT) IsEqual(rhs *GT) bool

IsEqual --

func (*GT) IsOne

func (x *GT) IsOne() bool

IsOne --

func (*GT) IsZero

func (x *GT) IsZero() bool

IsZero --

func (*GT) Serialize

func (x *GT) Serialize() []byte

Serialize --

func (*GT) SetInt64

func (x *GT) SetInt64(v int64)

SetInt64 --

func (*GT) SetString

func (x *GT) SetString(s string, base int) error

SetString --

type ID

type ID struct {
	// contains filtered or unexported fields
}

ID --

func (*ID) Deserialize

func (id *ID) Deserialize(buf []byte) error

Deserialize --

func (*ID) DeserializeHexStr

func (id *ID) DeserializeHexStr(s string) error

DeserializeHexStr --

func (*ID) GetDecString

func (id *ID) GetDecString() string

GetDecString --

func (*ID) GetHexString

func (id *ID) GetHexString() string

GetHexString --

func (*ID) GetLittleEndian

func (id *ID) GetLittleEndian() []byte

GetLittleEndian -- alias of Serialize

func (*ID) IsEqual

func (id *ID) IsEqual(rhs *ID) bool

IsEqual --

func (*ID) Serialize

func (id *ID) Serialize() []byte

Serialize --

func (*ID) SerializeToHexStr

func (id *ID) SerializeToHexStr() string

SerializeToHexStr --

func (*ID) SetDecString

func (id *ID) SetDecString(s string) error

SetDecString --

func (*ID) SetHexString

func (id *ID) SetHexString(s string) error

SetHexString --

func (*ID) SetLittleEndian

func (id *ID) SetLittleEndian(buf []byte) error

SetLittleEndian --

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

PublicKey --

func CastToPublicKey

func CastToPublicKey(in *G2) *PublicKey

func DHKeyExchange

func DHKeyExchange(sec *SecretKey, pub *PublicKey) (out PublicKey)

DHKeyExchange --

func GetMasterPublicKey

func GetMasterPublicKey(msk []SecretKey) (mpk []PublicKey)

GetMasterPublicKey --

func (*PublicKey) Add

func (pub *PublicKey) Add(rhs *PublicKey)

Add --

func (*PublicKey) Deserialize

func (pub *PublicKey) Deserialize(buf []byte) error

Deserialize --

func (*PublicKey) DeserializeHexStr

func (pub *PublicKey) DeserializeHexStr(s string) error

DeserializeHexStr --

func (*PublicKey) GetHexString

func (pub *PublicKey) GetHexString() string

GetHexString --

func (*PublicKey) IsEqual

func (pub *PublicKey) IsEqual(rhs *PublicKey) bool

IsEqual --

func (*PublicKey) IsValidOrder

func (pub *PublicKey) IsValidOrder() bool

IsValidOrder --

func (*PublicKey) IsZero

func (pub *PublicKey) IsZero() bool

IsZero --

func (*PublicKey) Recover

func (pub *PublicKey) Recover(pubVec []PublicKey, idVec []ID) error

Recover --

func (*PublicKey) Serialize

func (pub *PublicKey) Serialize() []byte

Serialize --

func (*PublicKey) SerializeToHexStr

func (pub *PublicKey) SerializeToHexStr() string

SerializeToHexStr --

func (*PublicKey) Set

func (pub *PublicKey) Set(mpk []PublicKey, id *ID) error

Set --

func (*PublicKey) SetHexString

func (pub *PublicKey) SetHexString(s string) error

SetHexString --

type PublicKeys

type PublicKeys []PublicKey

PublicKeys ..

func (PublicKeys) JSON

func (keys PublicKeys) JSON() string

JSON provides a JSON string dump of slice of PublicKeys in Hexformat

type SecretKey

type SecretKey struct {
	// contains filtered or unexported fields
}

SecretKey --

func CastToSecretKey

func CastToSecretKey(in *Fr) *SecretKey

func (*SecretKey) Add

func (sec *SecretKey) Add(rhs *SecretKey)

Add --

func (*SecretKey) Deserialize

func (sec *SecretKey) Deserialize(buf []byte) error

Deserialize --

func (*SecretKey) DeserializeHexStr

func (sec *SecretKey) DeserializeHexStr(s string) error

DeserializeHexStr --

func (*SecretKey) GetDecString

func (sec *SecretKey) GetDecString() string

GetDecString --

func (*SecretKey) GetHexString

func (sec *SecretKey) GetHexString() string

GetHexString --

func (*SecretKey) GetLittleEndian

func (sec *SecretKey) GetLittleEndian() []byte

GetLittleEndian -- alias of Serialize

func (*SecretKey) GetMasterSecretKey

func (sec *SecretKey) GetMasterSecretKey(k int) (msk []SecretKey)

GetMasterSecretKey --

func (*SecretKey) GetPop

func (sec *SecretKey) GetPop() (sig *Sign)

GetPop --

func (*SecretKey) GetPublicKey

func (sec *SecretKey) GetPublicKey() (pub *PublicKey)

GetPublicKey --

func (*SecretKey) GetSafePublicKey

func (sec *SecretKey) GetSafePublicKey() (pub *PublicKey, err error)

GetSafePublicKey -- error if sec is zero

func (*SecretKey) IsEqual

func (sec *SecretKey) IsEqual(rhs *SecretKey) bool

IsEqual --

func (*SecretKey) IsZero

func (sec *SecretKey) IsZero() bool

IsZero --

func (*SecretKey) Recover

func (sec *SecretKey) Recover(secVec []SecretKey, idVec []ID) error

Recover --

func (*SecretKey) Serialize

func (sec *SecretKey) Serialize() []byte

Serialize --

func (*SecretKey) SerializeToHexStr

func (sec *SecretKey) SerializeToHexStr() string

SerializeToHexStr --

func (*SecretKey) Set

func (sec *SecretKey) Set(msk []SecretKey, id *ID) error

Set --

func (*SecretKey) SetByCSPRNG

func (sec *SecretKey) SetByCSPRNG()

SetByCSPRNG --

func (*SecretKey) SetDecString

func (sec *SecretKey) SetDecString(s string) error

SetDecString --

func (*SecretKey) SetHexString

func (sec *SecretKey) SetHexString(s string) error

SetHexString --

func (*SecretKey) SetLittleEndian

func (sec *SecretKey) SetLittleEndian(buf []byte) error

SetLittleEndian --

func (*SecretKey) SetLittleEndianMod

func (sec *SecretKey) SetLittleEndianMod(buf []byte) error

SetLittleEndianMod --

func (*SecretKey) Sign

func (sec *SecretKey) Sign(m string) (sig *Sign)

Sign -- Constant Time version

func (*SecretKey) SignByte

func (sec *SecretKey) SignByte(msg []byte) (sig *Sign)

SignByte --

func (*SecretKey) SignHash

func (sec *SecretKey) SignHash(hash []byte) (sig *Sign)

SignHash --

type Sign

type Sign struct {
	// contains filtered or unexported fields
}

Sign --

func CastToSign

func CastToSign(in *G1) *Sign

func HashAndMapToSignature

func HashAndMapToSignature(buf []byte) *Sign

HashAndMapToSignature --

func (*Sign) Add

func (sig *Sign) Add(rhs *Sign)

Add --

func (*Sign) Aggregate

func (sig *Sign) Aggregate(sigVec []Sign)

Aggregate --

func (*Sign) Deserialize

func (sig *Sign) Deserialize(buf []byte) error

Deserialize --

func (*Sign) DeserializeHexStr

func (sig *Sign) DeserializeHexStr(s string) error

DeserializeHexStr --

func (*Sign) FastAggregateVerify

func (sig *Sign) FastAggregateVerify(pubVec []PublicKey, msg []byte) bool

FastAggregateVerify --

func (*Sign) GetHexString

func (sig *Sign) GetHexString() string

GetHexString --

func (*Sign) IsEqual

func (sig *Sign) IsEqual(rhs *Sign) bool

IsEqual --

func (*Sign) IsValidOrder

func (sig *Sign) IsValidOrder() bool

IsValidOrder --

func (*Sign) IsZero

func (sig *Sign) IsZero() bool

IsZero --

func (*Sign) Recover

func (sig *Sign) Recover(sigVec []Sign, idVec []ID) error

Recover --

func (*Sign) Serialize

func (sig *Sign) Serialize() []byte

Serialize --

func (*Sign) SerializeToHexStr

func (sig *Sign) SerializeToHexStr() string

SerializeToHexStr --

func (*Sign) SetHexString

func (sig *Sign) SetHexString(s string) error

SetHexString --

func (*Sign) Verify

func (sig *Sign) Verify(pub *PublicKey, m string) bool

Verify --

func (*Sign) VerifyAggregateHashes

func (sig *Sign) VerifyAggregateHashes(pubVec []PublicKey, hash [][]byte) bool

VerifyAggregateHashes --

func (*Sign) VerifyByte

func (sig *Sign) VerifyByte(pub *PublicKey, msg []byte) bool

VerifyByte --

func (*Sign) VerifyHash

func (sig *Sign) VerifyHash(pub *PublicKey, hash []byte) bool

VerifyHash --

func (*Sign) VerifyPop

func (sig *Sign) VerifyPop(pub *PublicKey) bool

VerifyPop --

Jump to

Keyboard shortcuts

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