Skip to content

Commit

Permalink
Remove serializing the key from the signer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpringle committed Dec 9, 2024
1 parent 1150175 commit fd7f326
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/crypto/bls/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ type Signer interface {
PublicKey() *PublicKey
Sign(msg []byte) *Signature
SignProofOfPossession(msg []byte) *Signature
// TODO: delete me
ToBytes() []byte
}

type LocalSigner struct {
Expand Down Expand Up @@ -59,7 +57,7 @@ func (s *LocalSigner) ToBytes() []byte {

// SecretKeyFromBytes parses the big-endian format of the secret key into a
// secret key.
func SecretKeyFromBytes(skBytes []byte) (Signer, error) {
func SecretKeyFromBytes(skBytes []byte) (*LocalSigner, error) {
sk := new(SecretKey).Deserialize(skBytes)
if sk == nil {
return nil, errFailedSecretKeyDeserialize
Expand Down

0 comments on commit fd7f326

Please sign in to comment.