Documentation ¶
Index ¶
- Constants
- func ActSigType(typ string) crypto.SigType
- func AddressSigType(addr address.Address) crypto.SigType
- func Sign(sigType crypto.SigType, privkey []byte, msg []byte) (*crypto.Signature, error)
- type AggregateSignature
- type Key
- type KeyInfo
- type PublicKey
- type SecretKey
- type SigShim
- type Signature
Constants ¶
View Source
const ( KTBLS string = "bls" KTSecp256k1 string = "secp256k1" )
View Source
const DST = string("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_")
Variables ¶
This section is empty.
Functions ¶
func ActSigType ¶
func AddressSigType ¶
Types ¶
type AggregateSignature ¶
type AggregateSignature = blst.P2Aggregate
type Key ¶
func DecodePricateKey ¶
DecodePricateKey Decode the private key exported: eg:7b22...227d
type SigShim ¶
type SigShim interface { GenPrivate() ([]byte, error) ToPublic(pk []byte) ([]byte, error) Sign(pk []byte, msg []byte) ([]byte, error) Verify(sig []byte, a address.Address, msg []byte) error }
SigShim is used for introducing signature functions
func NewBLSSinger ¶
func NewBLSSinger() SigShim
func NewSecp256k1Singer ¶
func NewSecp256k1Singer() SigShim
Click to show internal directories.
Click to hide internal directories.