Skip to content

Commit

Permalink
send raw bytes as signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Jan 14, 2025
1 parent 08da659 commit 929f01f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/services/signing/signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func (s *Service) SignGeneric(
// Sign the data with the private key
sig := blsKey.SignMessage(byteArray)
s.logger.Info(fmt.Sprintf("Signed a message successfully using %s", pubKeyHex))
return &v1.SignGenericResponse{Signature: sig.Serialize()}, nil
signatureBytes := sig.RawBytes()
return &v1.SignGenericResponse{Signature: signatureBytes[:]}, nil
}

func (s *Service) SignG1(
Expand Down Expand Up @@ -99,5 +100,6 @@ func (s *Service) SignG1(

sig := blsKey.SignHashedToCurveMessage(g1Point.G1Affine)
s.logger.Info(fmt.Sprintf("Signed a G1 message successfully using %s", pubKeyHex))
return &v1.SignG1Response{Signature: sig.Serialize()}, nil
signatureBytes := sig.RawBytes()
return &v1.SignG1Response{Signature: signatureBytes[:]}, nil
}

0 comments on commit 929f01f

Please sign in to comment.