Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: agourbet on June 03, 2020, 01:09:21 PM



Title: Signing messages using Bitcoin libraries
Post by: agourbet on June 03, 2020, 01:09:21 PM
Hello, i am a Java developer and i am experimenting with signing and verifying messages using Bitcoin elliptic curve keys. I would like to ask the ones that have a bit more experience that me about this topic. I have create an endpoint in which a user can send me a signed message using his Bitcoin private key and his public key. Later i am calling the verifymessage function using BitcoinJ library in order to check if the message was signed by the private key of the user. The issue that i am having is that even though the same endpoint works for users that use BitcoinJ library, it doesn't work for users that use a php library that does the same things as BitcoinJ library. So my question is, is it possible that an implementation in Java, of verifymessage function for Bitcoin network, uses different algorithms to make calculations from a php library or Javascript library? Thank you


Title: Re: Signing messages using Bitcoin libraries
Post by: MixMAx123 on June 03, 2020, 03:09:58 PM
You are also welcome to test my Java ECDSA classes. https://github.com/MrMaxweII/Secp256k1



Title: Re: Signing messages using Bitcoin libraries
Post by: agourbet on June 04, 2020, 01:54:18 PM
As i can see there isn't any update on your library for years.


Title: Re: Signing messages using Bitcoin libraries
Post by: MixMAx123 on June 04, 2020, 03:11:59 PM
As i can see there isn't any update on your library for years.

Yes, the signature algorithm has not changed in years and the ECDSA mathematics will not change either.
Signatures are a mathematical algorithm that is always the same. Have you ever received an update for your calculator?
But if you want I can change the version number. :-)
If you want software with many updates, the best thing to do is buy Windows.
A little tip from me: You can recognize good software by the fact that there are few updates and not many!


Title: Re: Signing messages using Bitcoin libraries
Post by: agourbet on June 06, 2020, 12:31:19 PM
I understand what you are saying and i am in your camp also. I thought that it was a signature issue but instead it was something else. I found the problem and i will try your lib also. Thanks for your help.