Post
Topic
Board Bitcoin Technical Support
Re: Verify ownership of keys for paper wallet
by
JohanM
on 13/08/2023, 08:29:47 UTC
Because there can be other vulnerabilities in your code like your RNG being weak.

If you're using SecureRandom in JAVA that is as strong as it's going to get.
Creating a secure private key is as simple as calling nextBytes on a 32 byte byte[].
The only edge case here is that you have to check for the upper limit of the key.

Creating P2PKH or P2SH bitcoin addresses is NOT that difficult and the number of edge cases is limited.

I believe a self-written, properly tested paper wallet generator is MUCH safer that using whatever you can find on the internet now.