MCPcopy
hub / github.com/canopy-network/canopy / PublicKey

Method PublicKey

lib/crypto/bls.go:92–96  ·  view source on GitHub ↗

PublicKey() returns the individual public key that pairs with this BLS private key for basic signature verification

()

Source from the content-addressed store, hash-verified

90// PublicKey() returns the individual public key that pairs with this BLS private key
91// for basic signature verification
92func (b *BLS12381PrivateKey) PublicKey() PublicKeyI {
93 suite := newBLSSuite()
94 public := suite.G1().Point().Mul(b.Scalar, suite.G1().Point().Base())
95 return NewBLS12381PublicKey(public)
96}
97
98// Equals() compares two private key objects and returns if they are equal
99func (b *BLS12381PrivateKey) Equals(i PrivateKeyI) bool {

Callers 9

TestSignFunction · 0.95
TestBLSFunction · 0.95
TestNewBLSPointFromBytesFunction · 0.95
TestStartElectionPhaseFunction · 0.95

Calls 2

NewBLS12381PublicKeyFunction · 0.85
newBLSSuiteFunction · 0.70

Tested by 9

TestSignFunction · 0.76
TestBLSFunction · 0.76
TestNewBLSPointFromBytesFunction · 0.76
TestStartElectionPhaseFunction · 0.76