Post
Topic
Board Development & Technical Discussion
Re: How to generate a private key?
by
proff
on 03/04/2013, 12:09:35 UTC
I am glad to see you are taking randomness seriously Smiley

How many random bits do you need? Unless you are generating many, many keys, the PRNG should not be a bottleneck. There are also hardware-based RNGs.

The order of the base point of secp256k1 is not quite 2^256, as you noticed, but it is so close that generating 256 random bits and throwing away out-of-range values (on the remote chance you ever get one) is not a problem, and that way (after doing all the arithmetic) you will end up with a point uniformly distributed on the curve.