Is it possible to calculate a public key from the message hash and signature?

2 Answers 2


It is possible to create a public key from the signature. It will be equivalent to the key used to generate the signature but not necessarily identical.

You can find an example implementation here.

  • I think you not right Commented Sep 21, 2017 at 22:59
  • 2
    I guess that's possible. Do you have some reason to think that I'm not right? Or maybe this link will convince you. Or perhaps section 4.1.6 of this link. Commented Sep 21, 2017 at 23:14
  • proove it please Commented Sep 22, 2017 at 0:32
  • 2
    Read David's links. Commented Sep 22, 2017 at 0:36
  • 2
    Read David's answer. Commented Sep 22, 2017 at 1:37

BIP143 implies it is possible per the No FindAndDelete example.

I think the following pseudocode would do it

pubkey = get_pubkey(generate_key())
while not verify_sig(signature, pubkey, msg_hash):
  pubkey = get_pubkey(generate_key())

and as David suggested, I suppose not necessarily identical but equivalent for signature verification purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.