Post
Topic
Board Development & Technical Discussion
Re: Creating Bitcoin addresses in OpenCL
by
dlystyr
on 04/11/2022, 12:30:43 UTC
You should be able to complete the whole process on GPU so quickly that the communication overhead in any intermediary steps will impact the address generation throughput a lot.
Do you have a source of entropy that you'd like to use? If not, you may even be able to sample the private key on the GPU.

Why not to use any build-in RNG? Or you may generate them on CPU (using your favorite method), copy to GPU and then generate addresses.

Maybe look at that project: https://github.com/bstatcomp/RandomCL (https://link.springer.com/article/10.1007/s11227-019-02756-2)


I was actually looking at going for an RNG implementation, but I did not know whether to create the whole key or just part of the key on the GPU but it appears the whole key is better.

You can't directly collect entropy from OpenCL's device memory. That requires some *SSL call followed by a copy-from-host-to-device call.

I got curious and did quick google search. I found presentation file which state there are 5 OpenCL RNG library/implementation (Random123, MTGP, OpenCLRNG, RANLUXCL, MWC64X). But i don't know whether it directly collect entropy from GPU or not.

[1] https://dotneststatic.com/media/gpuday/GPUDay2019/talks/thursday/7_IstvanKiss.pdf, page 20

Thanks for looking, I will check them out also.