If you want a cryptographically strong random numbers in Java, you use SecureRandom
. Unfortunately, SecureRandom
can be very slow. If it uses
There is a tool (on Ubuntu at least) that will feed artificial randomness into your system. The command is simply:
rngd -r /dev/urandom
and you may need a sudo at the front. If you don't have rng-tools package, you will need to install it. I tried this, and it definitely helped me!
Source: matt vs world