Bitcoin Forum
May 07, 2024, 06:06:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do you decompress a public key?  (Read 2489 times)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
April 09, 2013, 01:41:44 PM
 #1

A compressed public key contains 02 or 03 at the fist byte, followed by 256-bits of the X.
https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm

How do you calculate the Y, out of it?

I see that the client just calls EC_KEY_set_conv_form with POINT_CONVERSION_COMPRESSED, but since I need to do it in an app which not use OpenSSL, could anyone please refer me to some doc/code explaining the math behind this process?

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
1715105177
Hero Member
*
Offline Offline

Posts: 1715105177

View Profile Personal Message (Offline)

Ignore
1715105177
Reply with quote  #2

1715105177
Report to moderator
1715105177
Hero Member
*
Offline Offline

Posts: 1715105177

View Profile Personal Message (Offline)

Ignore
1715105177
Reply with quote  #2

1715105177
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
MoonShadow
Legendary
*
Offline Offline

Activity: 1708
Merit: 1007



View Profile
April 09, 2013, 01:43:05 PM
 #2

I don't believe that you can derive the uncompressed public key from just the compressed public key.  I'm pretty sure that you need the private key for that.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
April 09, 2013, 01:44:23 PM
 #3

https://bitcointalk.org/index.php?topic=162805
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
April 09, 2013, 01:45:29 PM
 #4

Cheers!

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!