<p>Addresses are randomly generated starting from a private key. The private key is the only truly random value in a whole chain of interesting values. These values are then mathematically derived from the private key. On the other end of the chain of values is the address.</p>

<p>Now if you could simply pick an address and recover the private key that, when passing it through the address derivation mechanism, gives you that address we would be in a lot of trouble. People could simply listen to transactions on the network, extract the receiving address, reconstruct the private key and spend the funds, even if they were not the intended recipient. So at this point it should be clear that simply picking an address and go ahead from there is not possible, in other words some of the functions in the chain are non-reversible.</p>

<p>So starting from the private key, we construct a public key. Already this first step is non-reversible, otherwise public-key cryptosystems would stop working. It should be computationally unfeasible to recover the private key from the public key. Bitcoin further goes ahead and hashes the public key twice. This step is non-reversible as well.</p>

<p>The first character of the address depends on the address version and may not be freely chosen. Then there is the matter of the Base58 encoding, which unlike the other mechanisms is reversible.</p>

<p>Finally the last few characters in the address are a checksum which is again calculated as a double hash of the already hashed public key. So for these last characters there is simply no way of "choosing" them so that the address looks a certain way.</p>

<p>So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours. That's also the reason why tools like <a href="https://en.bitcoin.it/wiki/Vanitygen" rel="nofollow">vanitygen</a> exist: they simply pick a random private key, transform it until they get an address and then check whether it has the desired features, e.g., your name in it. The more restrictive you are with what you want your address to look like, the harder it gets to find one that does. This difficulty increases exponentially, hence the term computationally unfeasible above.</p>

CC BY-SA 3.0
2013-10-31T15:05:33.420Z
> So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours

Not quite what I'm asking, I'm asking if I can send BTC to these addresses
Tom Gullen
CC BY-SA 3.0
2013-10-31T15:33:57.110Z
There are people sending very small amounts of satoshis to store file checksums, to be able to prove that the file existed at a certain date. http://www.proofofexistence.com/
Jonas Oestman
CC BY-SA 3.0
2013-10-31T15:40:55.387Z
Ah, my mistake I thought you were asking whether you can use these addresses to receive bitcoins. If you simply want to send them, you can do so to arbitrary addresses (as long as they have a valid version byte and a matching checksum).
cdecker
CC BY-SA 3.0
2013-10-31T14:35:23.313Z
2013-10-31T14:35:23.313Z
cdecker
<p>An "address" in bitcoin is composed in binary form of:</p>

<pre><code>[1 prefix byte] + [20 bytes of ~public key] + [4 checksum bytes] = 25 bytes
</code></pre>

<p>This binary form is then converted to <strong>base 58</strong>, with 58 characters valid to write it (letters and numbers, except "0, O, I, l" which are confusing). That results in the 26-35 string of characters that is commonly used.</p>

<p>The prefix fixes the "1" or "3" character (P2PKH, P2SH), and the last 4 bytes are calculated from the previous 21 bytes.</p>

<p>So <strong>those 20 bytes in the middle could be chosen randomly</strong>.</p>

<p>But if those 20 bytes were random the private key would be unknown, and so funds transferred to that "address" would be irrecoverable. The <em>correct</em> process is to choose a private random key, derivate the public from it, and then fill those 20 bytes.</p>

<p>So, <strong>the reasons why a random combination of 26-35 letters and numbers won't result in a valid bitcoin address</strong>, even if it starts with "1" or "3" and "0, O, I, l" are not present:</p>

<ul>
<li>when passed to binary, the number of bytes obtained may not be 25 exactly.</li>
<li>if it mapped to 25 bytes, checksum won't validate the previous 21 bytes.</li>
</ul>

<p>As for the last question, <strong>any address</strong> with those 20 middle bytes generated randomly and the checksum and prefix correct, <strong>is valid</strong>. It will have a zero amount of bitcoins available when checked for the first time (for example at <a href="https://blockchain.info" rel="nofollow noreferrer">https://blockchain.info</a>), and any funds transferred to it will be received. There's no previous requirement.</p>

CC BY-SA 3.0
2018-01-13T18:11:13.617Z
2018-01-14T13:52:47.443Z
2018-01-14T13:52:47.443Z
circulosmeos
<p>From <a href="https://en.bitcoin.it/wiki/Address" rel="nofollow">https://en.bitcoin.it/wiki/Address</a>:</p>

<blockquote>
  <p>A Bitcoin address, or simply address, is an identifier of 27-34 alphanumeric characters, beginning with the number 1 or 3, that represents a possible destination for a Bitcoin payment.</p>
</blockquote>

<p>Is any random address I create following the above rules going to be an address I can sucesfully send Bitcoin to?</p>

<p>For example if I randomly generate these addresses:</p>

<ul>
<li>1AAAAAAAAAAAAAAAAAAAAAAAAAA</li>
<li>3111111111111111111111111111111111</li>
<li>2FWIOHFEWNFEOWEFHO34234242244EFDE</li>
</ul>

<p>Are these all valid addresses I can always send Bitcoin payments to?  Or do they have to already 'exist' in some capacity?</p>

CC BY-SA 3.0
2013-10-31T13:48:03.687Z
Check this out instead (https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses). No BTC addresses are not random. I don't have the time at the moment to outline the specifics, but these addresses will most certainly be rejected by the network.
RLH
CC BY-SA 3.0
2013-10-31T13:50:21.790Z
Also, even if you'd randomly generate a syntactically correct address, you won't be able to spend anything sent to it unless you own the corresponding private key. So address generation always starts from the private key.
Pieter Wuille
CC BY-SA 3.0
2013-10-31T14:29:42.437Z
If you want to run some python code to validate a bitcoin address here it is: http://rosettacode.org/wiki/Bitcoin/address_validation#Python
Jonas Oestman
<address>
Random Bitcoin address generation
Tom Gullen
# Random Bitcoin address generation

(Asked by: username_0 on 2013-10-31)

From <https://en.bitcoin.it/wiki/Address>:

> A Bitcoin address, or simply address, is an identifier of 27-34 alphanumeric characters, beginning with the number 1 or 3, that represents a possible destination for a Bitcoin payment.

Is any random address I create following the above rules going to be an address I can sucesfully send Bitcoin to?

For example if I randomly generate these addresses:

* 1AAAAAAAAAAAAAAAAAAAAAAAAAA
* 3111111111111111111111111111111111
* 2FWIOHFEWNFEOWEFHO34234242244EFDE

Are these all valid addresses I can always send Bitcoin payments to? Or do they have to already 'exist' in some capacity?

**Tags:** address

> **Comments:**
> **username_1**: Check this out instead (https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses). No BTC addresses are not random. I don't have the time at the moment to outline the specifics, but these addresses will most certainly be rejected by the network.  
> **username_2**: Also, even if you'd randomly generate a syntactically correct address, you won't be able to spend anything sent to it unless you own the corresponding private key. So address generation always starts from the private key.  
> **username_3**: If you want to run some python code to validate a bitcoin address here it is: http://rosettacode.org/wiki/Bitcoin/address_validation#Python  

---

## 2 answers

### Answer by username_4 on 2013-10-31. Score: 3

Addresses are randomly generated starting from a private key. The private key is the only truly random value in a whole chain of interesting values. These values are then mathematically derived from the private key. On the other end of the chain of values is the address.

Now if you could simply pick an address and recover the private key that, when passing it through the address derivation mechanism, gives you that address we would be in a lot of trouble. People could simply listen to transactions on the network, extract the receiving address, reconstruct the private key and spend the funds, even if they were not the intended recipient. So at this point it should be clear that simply picking an address and go ahead from there is not possible, in other words some of the functions in the chain are non-reversible.

So starting from the private key, we construct a public key. Already this first step is non-reversible, otherwise public-key cryptosystems would stop working. It should be computationally unfeasible to recover the private key from the public key. Bitcoin further goes ahead and hashes the public key twice. This step is non-reversible as well.

The first character of the address depends on the address version and may not be freely chosen. Then there is the matter of the Base58 encoding, which unlike the other mechanisms is reversible.

Finally the last few characters in the address are a checksum which is again calculated as a double hash of the already hashed public key. So for these last characters there is simply no way of "choosing" them so that the address looks a certain way.

So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours. That's also the reason why tools like [vanitygen](https://en.bitcoin.it/wiki/Vanitygen) exist: they simply pick a random private key, transform it until they get an address and then check whether it has the desired features, e.g., your name in it. The more restrictive you are with what you want your address to look like, the harder it gets to find one that does. This difficulty increases exponentially, hence the term computationally unfeasible above.

> **Comments:**
> **username_0**: > So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours  Not quite what I'm asking, I'm asking if I can send BTC to these addresses  
> **username_3**: There are people sending very small amounts of satoshis to store file checksums, to be able to prove that the file existed at a certain date. http://www.proofofexistence.com/  
> **username_4**: Ah, my mistake I thought you were asking whether you can use these addresses to receive bitcoins. If you simply want to send them, you can do so to arbitrary addresses (as long as they have a valid version byte and a matching checksum).  

---

### Answer by username_5 on 2018-01-13. Score: 1

An "address" in bitcoin is composed in binary form of:

```
[1 prefix byte] + [20 bytes of ~public key] + [4 checksum bytes] = 25 bytes

```

This binary form is then converted to **base 58**, with 58 characters valid to write it (letters and numbers, except "0, O, I, l" which are confusing). That results in the 26-35 string of characters that is commonly used.

The prefix fixes the "1" or "3" character (P2PKH, P2SH), and the last 4 bytes are calculated from the previous 21 bytes.

So **those 20 bytes in the middle could be chosen randomly**.

But if those 20 bytes were random the private key would be unknown, and so funds transferred to that "address" would be irrecoverable. The *correct* process is to choose a private random key, derivate the public from it, and then fill those 20 bytes.

So, **the reasons why a random combination of 26-35 letters and numbers won't result in a valid bitcoin address**, even if it starts with "1" or "3" and "0, O, I, l" are not present:

* when passed to binary, the number of bytes obtained may not be 25 exactly.
* if it mapped to 25 bytes, checksum won't validate the previous 21 bytes.

As for the last question, **any address** with those 20 middle bytes generated randomly and the checksum and prefix correct, **is valid**. It will have a zero amount of bitcoins available when checked for the first time (for example at <https://blockchain.info>), and any funds transferred to it will be received. There's no previous requirement.


---

