<blockquote>
<p>Everybody has a public and private key.</p>
</blockquote>
<p>Everybody is able to generate any number of private keys (&quot;<a href="https://en.wikipedia.org/wiki/CSPRNG" rel="nofollow noreferrer">randomly</a>&quot;) and derive a public key from it.</p>
<blockquote>
<p>If A sends bitcoins to B:</p>
<p>B is generating an address and sends it to A</p>
</blockquote>
<p>B <em><a href="https://en.bitcoin.it/wiki/Address" rel="nofollow noreferrer">forms</a></em> an address out of the public key itself derived from a &quot;randomly&quot; generated private key.</p>
<blockquote>
<p>This addresses are generated for each transaction.</p>
</blockquote>
<p>Ideally yes, unfortunately (privacy-wise) it's a decision made by the sender. Sending twice to the same address is possible.</p>
<blockquote>
<p>A need to sign something with his private key and B's address</p>
</blockquote>
<p>This something is, <em><a href="https://en.bitcoin.it/wiki/OP_CHECKSIG" rel="nofollow noreferrer">basically</a></em>, the transaction itself.</p>
<p>EDIT: To answer the question title :-)</p>
<blockquote>
<p>What is physically an address in bitcoin</p>
</blockquote>
<p>Some bytes either stored on your hard disk or in memory, which are part of a <a href="https://en.bitcoin.it/wiki/Transaction" rel="nofollow noreferrer">transaction</a> and which are to be interpreted as a <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">script</a> describing what conditions should be met to spend the coins &quot;<a href="https://en.bitcoin.it/wiki/Protocol_documentation#tx" rel="nofollow noreferrer">next to</a>&quot; this address.</p>

CC BY-SA 4.0
2020-05-03T12:56:42.650Z
2021-01-28T18:35:51.030Z
2021-01-28T18:35:51.030Z
Antoine Poinsot
<p>You're right, but this is slightly more clear:</p>

<ul>
<li>Everybody can generate an <em>arbitrary amount of private-public keypairs</em>.</li>
<li>For A to send bitcoins to B:

<ul>
<li>B generates <em>a private key, and the corresponding public key</em>, and its address and sends it to A</li>
<li><em>For every payment request, address reuse may be avoided for privacy reasons.</em></li>
<li>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"</li>
</ul></li>
</ul>

<p>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 <a href="https://emn178.github.io/online-tools/sha256.html" rel="nofollow noreferrer">here</a>. And why a hash is used <a href="https://bitcoin.stackexchange.com/q/3600">in addresses</a>)</p>

<p>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.</p>

<p>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)</p>

CC BY-SA 4.0
2020-05-03T12:51:52.697Z
2020-05-03T12:51:52.697Z
MCCCS
<p>Here is what I've understood of bitcoin:</p>

<ul>
<li>Everybody has a public and private key.</li>
<li>If A sends bitcoins to B:

<ul>
<li>B is generating an address and sends it to A</li>
<li>This addresses are generated for each transaction.</li>
<li>A needs to sign something with his private key and B's address</li>
</ul></li>
</ul>

<p>Am I wrong?</p>

<p>If not, I want to understand how this address is computed.</p>

<p>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.</p>

CC BY-SA 4.0
2020-05-03T18:56:50.560Z
related: https://bitcoin.stackexchange.com/q/13059/5406
Murch
<address><private-key>
What exactly is an address in bitcoin
Bob5421
# What exactly is an address in bitcoin

(Asked by: username_0 on 2020-05-03)

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.

**Tags:** address, private-key

> **Comments:**
> **username_1**: related: https://bitcoin.stackexchange.com/q/13059/5406  

---

## 2 answers

### Answer by username_2 on 2020-05-03. Score: 1

> Everybody has a public and private key.

Everybody is able to generate any number of private keys ("[randomly](https://en.wikipedia.org/wiki/CSPRNG)") 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](https://en.bitcoin.it/wiki/Address)* 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](https://en.bitcoin.it/wiki/OP_CHECKSIG)*, 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](https://en.bitcoin.it/wiki/Transaction) and which are to be interpreted as a [script](https://en.bitcoin.it/wiki/Script) describing what conditions should be met to spend the coins "[next to](https://en.bitcoin.it/wiki/Protocol_documentation#tx)" this address.


---

### Answer by username_3 on 2020-05-03. Score: 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](https://emn178.github.io/online-tools/sha256.html). And why a hash is used [in addresses](https://bitcoin.stackexchange.com/q/3600))

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)


---

