Post
Topic
Board Bitcoin Technical Support
Re: false to verify ECDSA sinature in golang
by
bob123
on 13/08/2018, 12:22:20 UTC
Without looking too much at it, this seems to be somehow wrong:


   if ecdsa.Verify(&rawPubKey, hash[:], &r, &s) == false {
      fmt.Printf("%s\n", "true")
   }else{
      fmt.Printf("%s\n", "false")
   }
}


It may be the case, if the signature is actually correct and your code runs properly, that you are misinterpreting the output because you are printing true if it the verify function returns false and vice versa.

So if you are actually getting the output false, the signature has been verified properly.