Bitcoin Forum
April 24, 2024, 10:38:18 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitaddress.org compressed address ?  (Read 929 times)
calkob (OP)
Hero Member
*****
Offline Offline

Activity: 1092
Merit: 520


View Profile
November 24, 2016, 09:56:24 PM
 #1

Hi just wondering why on bitaddress you get a bitcoin address and a compressed address?  When i put in the priv key for the generated address and sent btc to it i checked the other address, not the compressed one and it said has not been on the network yet,  so obviously they are different addresses?  i just dont get it.
1713998298
Hero Member
*
Offline Offline

Posts: 1713998298

View Profile Personal Message (Offline)

Ignore
1713998298
Reply with quote  #2

1713998298
Report to moderator
1713998298
Hero Member
*
Offline Offline

Posts: 1713998298

View Profile Personal Message (Offline)

Ignore
1713998298
Reply with quote  #2

1713998298
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713998298
Hero Member
*
Offline Offline

Posts: 1713998298

View Profile Personal Message (Offline)

Ignore
1713998298
Reply with quote  #2

1713998298
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
November 24, 2016, 10:12:46 PM
 #2

A public key is just a point on a curve. It has an x and a y component. An uncompressed public key contains both the x and y, but a compressed one just contains the x and another byte to indicate which side of the curve the point is on (because it is symmertric) since all you need is the x to calculate the y on a curve.

Since both the public keys are different bytewise, the addresses will be different because the hashes of the public keys will be different.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4606



View Profile
November 25, 2016, 01:22:11 AM
 #3

- snip -
obviously they are different addresses?
- snip -

Correct.

They are different addresses.  Those addresses result from different hashes. Those hashes result from different representations of the public key.  Because of all this, there are different requirements to use bitcoins received at the address as inputs into transactions.

What is not different is the private key.

So, give a single private key, there are two possible valid representations for the public key and therefore 2 different address.  Once of those addresses (the UNcompressed one) will result in more bytes being required when you spend the bitcoins.  Since transaction fees are paid PER BYTE, that means that bitcoins received at the uncompressed address will cost you more in transaction fees.

Since there is NO benefit to using the uncompressed address, and there IS additional cost, most well written wallets don't bother with uncompressed addresses any more.
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
November 25, 2016, 10:05:56 AM
Last edit: November 25, 2016, 10:17:00 AM by piotr_n
 #4

Since transaction fees are paid PER BYTE, that means that bitcoins received at the uncompressed address will cost you more in transaction fees.

For future reference, it's also worth to know that segwit addresses (so called P2SH-WPKH) made from uncompressed public keys are (will be) undependable, no matter the fee.

They added the extra check in segwit code that blocks spending coins from uncompressed segwit keys.
Which I think was a bad idea, but well... you just have to be careful now, making sure that the hash you are making P2SH-WPKH address from did not come, by a chance, from an uncompressed public key. Otherwise you're fucked Smiley

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
calkob (OP)
Hero Member
*****
Offline Offline

Activity: 1092
Merit: 520


View Profile
November 25, 2016, 04:49:14 PM
 #5

- snip -
obviously they are different addresses?
- snip -

Correct.

They are different addresses.  Those addresses result from different hashes. Those hashes result from different representations of the public key.  Because of all this, there are different requirements to use bitcoins received at the address as inputs into transactions.

What is not different is the private key.

So, give a single private key, there are two possible valid representations for the public key and therefore 2 different address.  Once of those addresses (the UNcompressed one) will result in more bytes being required when you spend the bitcoins.  Since transaction fees are paid PER BYTE, that means that bitcoins received at the uncompressed address will cost you more in transaction fees.

Since there is NO benefit to using the uncompressed address, and there IS additional cost, most well written wallets don't bother with uncompressed addresses any more.

This brand new information, Thanks all for explaining that Smiley
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!