Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFailedSecretKeyDeserialize = errors.New("couldn't deserialize secret key")
)
Functions ¶
This section is empty.
Types ¶
type LocalSigner ¶
type LocalSigner struct {
// contains filtered or unexported fields
}
func FromBytes ¶
func FromBytes(skBytes []byte) (*LocalSigner, error)
FromBytes parses the big-endian format of the secret key into a secret key.
func New ¶
func New() (*LocalSigner, error)
NewSecretKey generates a new secret key from the local source of cryptographically secure randomness.
func (*LocalSigner) PublicKey ¶
func (s *LocalSigner) PublicKey() *bls.PublicKey
PublicKey returns the public key that corresponds to this secret key.
func (*LocalSigner) Sign ¶
func (s *LocalSigner) Sign(msg []byte) (*bls.Signature, error)
Sign [msg] to authorize this message
func (*LocalSigner) SignProofOfPossession ¶
func (s *LocalSigner) SignProofOfPossession(msg []byte) (*bls.Signature, error)
Sign [msg] to prove the ownership
func (*LocalSigner) ToBytes ¶
func (s *LocalSigner) ToBytes() []byte
ToBytes returns the big-endian format of the secret key.
Click to show internal directories.
Click to hide internal directories.