diff --git a/crypto/bls12381/bls12381.go b/crypto/bls12381/bls12381.go index 19369380b8..f9bb042dd9 100644 --- a/crypto/bls12381/bls12381.go +++ b/crypto/bls12381/bls12381.go @@ -290,7 +290,6 @@ func (pubKey PubKey) Bytes() []byte { } func (pubKey PubKey) VerifySignatureDigest(hash []byte, sig []byte) bool { - return true // make sure we use the same algorithm to sign if len(sig) == 0 { // fmt.Printf("bls verifying error (signature empty) from message %X with key %X\n", msg, pubKey.Bytes()) @@ -314,7 +313,6 @@ func (pubKey PubKey) VerifySignatureDigest(hash []byte, sig []byte) bool { } func (pubKey PubKey) VerifySignature(msg []byte, sig []byte) bool { - return true // make sure we use the same algorithm to sign if len(sig) == 0 { // fmt.Printf("bls verifying error (signature empty) from message %X with key %X\n", msg, pubKey.Bytes()) diff --git a/privval/dash_core_signer_client.go b/privval/dash_core_signer_client.go index d8753e0054..e0b9697f41 100644 --- a/privval/dash_core_signer_client.go +++ b/privval/dash_core_signer_client.go @@ -429,14 +429,14 @@ func (sc *DashCoreSignerClient) quorumSignAndVerify( "raw", hex.EncodeToString(signItem.Msg), "hash", hex.EncodeToString(signItem.MsgHash), "quorum_sign_result", *qs.QuorumSignResult) - // pubKey, err := sc.GetPubKey(ctx, quorumHash) - // if err != nil { - // return nil, &RemoteSignerError{Code: 500, Description: err.Error()} - // } - // verified := pubKey.VerifySignatureDigest(signItem.SignHash, qs.sign) - // if !verified { - // return nil, fmt.Errorf("unable to verify signature with pubkey %s", pubKey.String()) - // } + pubKey, err := sc.GetPubKey(ctx, quorumHash) + if err != nil { + return nil, &RemoteSignerError{Code: 500, Description: err.Error()} + } + verified := pubKey.VerifySignatureDigest(signItem.SignHash, qs.sign) + if !verified { + return nil, fmt.Errorf("unable to verify signature with pubkey %s", pubKey.String()) + } return qs, nil }