Documentation ¶
Overview ¶
Sigs package allows for signing, verifying signatures and key generation using key types selected by package user.
For support of secp256k1 import: _ "github.com/filecoin-project/lotus/lib/sigs/secp"
For support of Filecoin BLS import: _ "github.com/filecoin-project/lotus/lib/sigs/bls"
Index ¶
- func CheckBlockSignature(blk *types.BlockHeader, ctx context.Context, worker address.Address) error
- func Generate(sigType string) ([]byte, error)
- func RegisterSignature(name string, vs SigShim)
- func Sign(sigType string, privkey []byte, msg []byte) (*types.Signature, error)
- func ToPublic(sigType string, pk []byte) ([]byte, error)
- func Verify(sig *types.Signature, addr address.Address, msg []byte) error
- type SigShim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBlockSignature ¶
func CheckBlockSignature(blk *types.BlockHeader, ctx context.Context, worker address.Address) error
func RegisterSignature ¶
RegisterSig 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 ¶
Click to show internal directories.
Click to hide internal directories.