Author

Topic: Private keys (Read 252 times)

newbie
Activity: 10
Merit: 0
December 18, 2017, 04:12:32 AM
#6
Thanks guys for clearing that all up for me! Great answers. Seems like I've got some reading up to do but I'm really impressed by blockchain Cheesy
legendary
Activity: 3472
Merit: 4801
December 16, 2017, 04:18:59 AM
#5
- snip -
there are 2^256 public keys and 2^160 addresses,
- snip -
2^160 is about 1,460,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.
- snip -

Or precisely:
1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976

- snip -
Also, roughly how many public addresses are currently storing bitcoin?

- snip -
About 2 months ago there were:
~21600000 addresses containing some balance and
- snip -

Note that there could NEVER be more than 2,099,999,997,690,000 addresses storing bitcoins at any moment in time.

Furthermore, due to lost bitcoins and some addresses storing more than 0.00000001 BTC, the actual maximum number of addresses that ever WILL store bitcoins at any given moment in time will ALWAYS be SIGNIFICANTLY less than 2,099,999,997,690,000 addresses.

Therefore, the absolute worst case scenario (an imaginary situation where there actually are 2,099,999,997,690,000 addresses storing bitcoins) would result in less than:
0.0000000000000000000000000000002 % of the available address space being used to store bitcoins at any moment.
legendary
Activity: 1624
Merit: 2481
December 16, 2017, 04:00:41 AM
#4
1. Is there a set of rules that narrow down what is a good private key?

A private key is a 256 bit number. So basically there is just 1 (very important) rule: Randomness.
The RNG is probably the most popular attack path when trying to crack (implemented) crypthographic functions.


2. Is there anything in place to avoid collisions (multiple private keys to one address) other than statistics?

Multiple private public keys to one address referes to hash collision:
Since there are 2^256 public keys and 2^160 addresses, there are 2^96 public keys which match to one address (on average).
 
For address collision (where 2 people accidentially generate the same address (spendable priv-/pub- keypair for this address):
Not statistics is keeping this from happening, but maths. 2^160 is about 1,460,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.
There isn't enough energy on earth to even generate a small percentage of all of those addresses.
legendary
Activity: 2097
Merit: 1070
December 16, 2017, 03:08:54 AM
#3
The the OP : You need to read the manuals which explain how Bitcoin actually works.

Developer Guide : https://bitcoin.org/en/developer-documentation

Developer Referrence (contains everything in low level detail) : https://bitcoin.org/en/developer-reference

These are the things you need to learn about :

sha256
ripemd160
ECDSA using secp256k1 for signature creation and verification

Also what a public key is and how it's used to create and verify a signature based on some arbitrary data like an sha256 hash. It's not like RSA where something is encrypted with one key and decrypted with the other, that's not how it works with ECC.

Forget anything you're read about RSA, it's not applicable here.
full member
Activity: 378
Merit: 197
December 16, 2017, 02:29:12 AM
#2
I'm starting to get my head around Bitcoin, Blockchain etc. but I want to learn more about private keys, their generation, and use.

As I understand any 128-bit sequence can be a private key which can, in turn, be used to generate a 32-bit address using a one-way function.

1. Is there a set of rules that narrow down what is a good private key?
2. Is there anything in place to avoid collisions (multiple private keys to one address) other than statistics?

Also, roughly how many public addresses are currently storing bitcoin?


Some mistakes in your text. Any 256bit number works as a private key, and addresses are 160bit.

1. There are no set of rules that narrow private keys, but my own opinion is that there should be. While it is unlikely that your private key would be really small, or close to 1/2 or 3/4 of the search space (psychological values, where humans could start searching for your key) You still would not want your private key to be there.
2. Nothing to avoid collisions, except the huge amount of possible keys, which makes a collision extremely improbable.

About 2 months ago there were:
~21600000 addresses containing some balance and
~661000 addresses containing > 1BTC
newbie
Activity: 10
Merit: 0
December 15, 2017, 08:59:28 PM
#1
I'm starting to get my head around Bitcoin, Blockchain etc. but I want to learn more about private keys, their generation, and use.

As I understand any 128-bit sequence can be a private key which can, in turn, be used to generate a 32-bit address using a one-way function.

1. Is there a set of rules that narrow down what is a good private key?
2. Is there anything in place to avoid collisions (multiple private keys to one address) other than statistics?

Also, roughly how many public addresses are currently storing bitcoin?
Jump to: