I just created a page for verifying bitcoin messages. Thought I'd get your opinions on it.
link: verify-bitcoin-message.js.org
I originally built it to learn more, but I figured it’d be handy for sharing and publishing these messages... Anyone who can translate it would be a huge help!
Thoughts on This Bitcoin Message Verifier?
4 replies 252 views
The tool works, but be careful. Sometimes it gives misleading info. Just because a signature checks out doesn’t mean the coins are spendable. If someone just made the signature without knowing the private key, it’s not valid.
For example, it’s wrong to assume the private key is known. If it were, secp256k1 would be compromised.
For a learning tool, it’s decent. But maybe include all input fields like address, signature, and message after someone hits 'Verify'. Just a thought.
Tried another site mentioned in your post... they have the same problem. Electrum flagged my address as invalid, but lets me import it as watch-only.
Here's the payload we're talking about: verify-bitcoin-message.js.org/?address=1psPJZYEJrjPtY6kw5Tqtj4mW2yXSSDuH&message=Hello+World&signature=GwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE%3D
Can you break down how this signature got generated? I’m thinking they picked "Hello World" for the message and then used some points on the elliptic curve. But shouldn't the public key link to a legit address?
Totally!
Here's a couple of links that explain it better:
1. bitcoin.stackexchange.com/questions/77324/how-are-bitcoin-signed-messages-generated
2. en.bitcoin.it/wiki/Message_signing
1. Grab a public key with an unknown private key, convert it into an R-value.
2. Generate a signature s-value... it can be anything within a certain range.
3. Encode (r,s) in base64.
The prefix '1b' indicates how to recover the public key.