Bitcoin Forum
May 01, 2024, 12:09:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: x  (Read 344 times)
mindphuq
Member
**
Offline Offline

Activity: 187
Merit: 20


View Profile
June 06, 2018, 10:08:23 AM
 #21

I suspect you are a programmer Smiley

So to make it clear for me:
2 different private keys may have the ability (although the possibility that happens is extremely low) to prove ownership of coins assigned to the single "wallet" (e.g. hashed public key)?

No, public keys are generated from the private key and each private key creates exactly one public key whose hash is the 160-bit public address. So with owning the private key (backup, paperwallet ect) you can always and at any time (re)create your public address. So two different privkeys can not prove ownership to the other's public address. The wallet does that with picking the correct privkey from it's internal database (which is a mere key->value pair).

And actually there are no "coins" and the "wallet" is, as said, just a piece of software that helps you operating your keys. All that exists is an entry on the blockchain that says "address X sends to addres Y w.z coins" and if address x can prove, that they have gotten at least w.z coins before and that this amount was unspend, the network will know that address Y now can sign a transaction of at least w.z coins to a third address.
1714565359
Hero Member
*
Offline Offline

Posts: 1714565359

View Profile Personal Message (Offline)

Ignore
1714565359
Reply with quote  #2

1714565359
Report to moderator
1714565359
Hero Member
*
Offline Offline

Posts: 1714565359

View Profile Personal Message (Offline)

Ignore
1714565359
Reply with quote  #2

1714565359
Report to moderator
1714565359
Hero Member
*
Offline Offline

Posts: 1714565359

View Profile Personal Message (Offline)

Ignore
1714565359
Reply with quote  #2

1714565359
Report to moderator
The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714565359
Hero Member
*
Offline Offline

Posts: 1714565359

View Profile Personal Message (Offline)

Ignore
1714565359
Reply with quote  #2

1714565359
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
June 06, 2018, 10:47:11 AM
 #22

So to make it clear for me:
2 different private keys may have the ability (although the possibility that happens is extremely low) to prove ownership of coins assigned to the single "wallet" (e.g. hashed public key)?

It depends.

If the outputs are in P2PKH format, then yes. If both (different) public keys do match the same hash this is possible. That would be a hash collision.
If the outputs are in P2SH format, then no. Since it is not possible for two different private keys resulting in the same public key, which would be required to be able to successfully redeem them.

_oh_no_stop_this_
Full Member
***
Offline Offline

Activity: 183
Merit: 100


View Profile
June 06, 2018, 06:00:17 PM
 #23

So to make it clear for me:
2 different private keys may have the ability (although the possibility that happens is extremely low) to prove ownership of coins assigned to the single "wallet" (e.g. hashed public key)?

It depends.

If the outputs are in P2PKH format, then yes. If both (different) public keys do match the same hash this is possible. That would be a hash collision.
If the outputs are in P2SH format, then no. Since it is not possible for two different private keys resulting in the same public key, which would be required to be able to successfully redeem them.


Aha, thank you, this is interesting.
So to make 101% sure only the receiver gets the "coins" I should either (a) send it to his public key, or (b) create a Pay To Script Hash (but here I would also use his public key that will be the satisfying parameter for accepting this transaction as valid)?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
June 07, 2018, 10:13:32 AM
 #24

So to make 101% sure only the receiver gets the "coins" I should either (a) send it to his public key, or (b) create a Pay To Script Hash (but here I would also use his public key that will be the satisfying parameter for accepting this transaction as valid)?


For your coins to arrive properly, just create a transaction to the correct address provided by the receiver.
Nothing else is required on your part.

It doesn't matter whether you are using P2PKH (what you might be refering to with (a) ?) or P2SH.


Pages: « 1 [2]  All
  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!