2

Here is what I've understood of bitcoin:

  • Everybody has a public and private key.
  • If A sends bitcoins to B:
    • B is generating an address and sends it to A
    • This addresses are generated for each transaction.
    • A needs to sign something with his private key and B's address

Am I wrong?

If not, I want to understand how this address is computed.

I have read it is a kind of public key computed from private key. That's it? So we can have many public keys which match to a common private key? I have also read the address is derived from the public key.

1

2 Answers 2

1

Everybody has a public and private key.

Everybody is able to generate any number of private keys ("randomly") and derive a public key from it.

If A sends bitcoins to B:

B is generating an address and sends it to A

B forms an address out of the public key itself derived from a "randomly" generated private key.

This addresses are generated for each transaction.

Ideally yes, unfortunately (privacy-wise) it's a decision made by the sender. Sending twice to the same address is possible.

A need to sign something with his private key and B's address

This something is, basically, the transaction itself.

EDIT: To answer the question title :-)

What is physically an address in bitcoin

Some bytes either stored on your hard disk or in memory, which are part of a transaction and which are to be interpreted as a script describing what conditions should be met to spend the coins "next to" this address.

0

You're right, but this is slightly more clear:

  • Everybody can generate an arbitrary amount of private-public keypairs.
  • For A to send bitcoins to B:
    • B generates a private key, and the corresponding public key, and its address and sends it to A
    • For every payment request, address reuse may be avoided for privacy reasons.
    • A has (at least) one Unspent Output (which is the reference to a previous transaction that sended coins to A). A's public key matches his address, so with his private key he can sign a transaction saying "I own the coins, I spent them to B's address, which he can spend with his public key matching this address, after signing it with his private key"

An address consists of a checksum (extra few bytes to make sure if one makes a mistake while typing the address, the checksum won't be valid), the network byte (meaning "For use with the main Bitcoin network"), and the hash of a public key. (You can experiment with an example of a hash here. And why a hash is used in addresses)

For one to spend, the public key is revealed and its hash is compared with the address's, and then the signature is verified with the public key.

A private key always maps to only one public key. Usually, there's only one address we can derive from a public key. In reality, a public key is a point something called an elliptic curve. Because there are multiple ways to encode its coordinates, a public key can map to multiple addresses (not because of the hash. Hashing always gives one output)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.