Documentation ¶
Index ¶
- Constants
- Variables
- func BLSInit()
- func Generate(sigType crypto.SigType) ([]byte, error)
- func RegisterSignature(typ crypto.SigType, vs SigShim)
- func SecpInit()
- func Sign(sigType crypto.SigType, privkey []byte, msg []byte) (*crypto.Signature, error)
- func ToPublic(sigType crypto.SigType, pk []byte) ([]byte, error)
- func Verify(sig *crypto.Signature, addr address.Address, msg []byte) error
- type AggregateSignature
- type PublicKey
- type SecretKey
- type SigShim
- type Signature
Constants ¶
View Source
const DST = string("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_")
Variables ¶
View Source
var BS blsSigner
Functions ¶
func RegisterSignature ¶
RegisterSignature should be only used during init
func Sign ¶
Sign takes in signature type, private key and message. Returns a signature for that message. Valid sigTypes are: "secp256k1" and "bls"
Types ¶
type AggregateSignature ¶ added in v0.3.5
type AggregateSignature = blst.P2Aggregate
Click to show internal directories.
Click to hide internal directories.