# Are BTC Private Keys evenly distributed in 256bit space?

If we assume that there are ~2^96 private keys for EACH bitcoin address (2^256-160) and we assume that in cryptography it is considered good property of every hash function if it evenly distributes the values in its co-domain (co-domain of the SHA256 function is the domain of the RIPEMD160).

Does that means that HALF of the ~2^96 private keys is in first 2^159 and other HALF is in 2^160 - 2^256 space?

The random number generators that generate private keys should follow a uniform distribution as this is the distribution that maximizes entropy.

As the private keys that are used are not known we can't measure if the keys in use have been statistically speaking distributed uniformly.

Yes, but not for the reason you think.

You don't start with the public keys or their hashes, argue that they should be uniform, and that then implies private keys must be uniform too.

It's the other way around: private keys are uniform because the algorithm to generate a private key is literally "pick a uniformly random number in this range". The fact that public keys and hashes thereof are then uniform as well is implicitly true for any secure scheme.

• But you have no way of knowing that everyone out there has used this algorithm, only that the publicly-known implementations do so. Can't think of any great reason why it would be otherwise, but the point remains that they're private keys and there's an unknown number of them generated by not-necessarily-known means. Nov 14, 2019 at 3:47

Got this answer from someone on reddit and kinda makes sense but ofc we can't prove it. Each 2^96 key for each address should be uniformly distributed by ONE key in every 160 bit block up to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140.