Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bondcoder on September 10, 2019, 03:37:02 PM



Title: ECDSA public key
Post by: bondcoder on September 10, 2019, 03:37:02 PM
Hello, bitcointalkers! I have a problem with signing transaction in my wallet implementation.  I can not understand how I can generate public key that based on my private key. I have private key that I generated randomly with 256 bits. I read in A.Antonopulos book that we can receive point on elliptic curve from private key. I received X and Y coordinates, What I need to do with it for transforming in single string row (traditional public key)?


Title: Re: ECDSA public key
Post by: The Cryptovator on September 10, 2019, 04:28:20 PM
Exactly same question has been asked two years back. Here a answer from a moderator.

The public key is calculated by taking the generator point G and performing elliptic curve point multiplication on it with the private key. Given private key d and generator G, you do d * G. The process for elliptic curve point multiplication is detailed on wikipedia (https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication). The curve parameters are the ones for the secp256k1 curve which are defined here (section 2.4.1): http://www.secg.org/sec2-v2.pdf

Also below article could help you understand the process,

https://en.bitcoin.it/wiki/Private_key   (https://en.bitcoin.it/wiki/Private_key)

Hope you will get solution from above.


Title: Re: ECDSA public key
Post by: bondcoder on September 12, 2019, 04:57:30 PM
Exactly same question has been asked two years back. Here a answer from a moderator.

The public key is calculated by taking the generator point G and performing elliptic curve point multiplication on it with the private key. Given private key d and generator G, you do d * G. The process for elliptic curve point multiplication is detailed on wikipedia (https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication). The curve parameters are the ones for the secp256k1 curve which are defined here (section 2.4.1): http://www.secg.org/sec2-v2.pdf

Also below article could help you understand the process,

https://en.bitcoin.it/wiki/Private_key   (https://en.bitcoin.it/wiki/Private_key)

Hope you will get solution from above.

Thank you for your answer! It helped me to solve my problem. ;D


Title: Re: ECDSA public key
Post by: TalkStar on September 13, 2019, 06:13:00 AM
Thank you for your answer! It helped me to solve my problem. ;D
Its great to see that your problem has been solved. I will suggest you to use our forum search option before opening a new thread. In most of the cases you will be able to get your query related topics by using bitcointalks search button. Its true that our forum users are enough interested to give necessary replies to anyone's thread but you should try to get proper solution by searching here first.

To know details about forum search system you can read this topic; A Complete Guideline to use forum search button properly (https://bitcointalk.org/index.php?topic=5113993.msg49908449#msg49908449)


Title: Re: ECDSA public key
Post by: bondcoder on September 15, 2019, 07:07:20 AM
Thank you for your answer! It helped me to solve my problem. ;D
Its great to see that your problem has been solved. I will suggest you to use our forum search option before opening a new thread. In most of the cases you will be able to get your query related topics by using bitcointalks search button. Its true that our forum users are enough interested to give necessary replies to anyone's thread but you should try to get proper solution by searching here first.

To know details about forum search system you can read this topic; A Complete Guideline to use forum search button properly (https://bitcointalk.org/index.php?topic=5113993.msg49908449#msg49908449)

Of course! Sorry, I will search similar topics before publication.