Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use non-blocking PRNG to generate secp256k1 context (#51)
This uses java.util.Random.nextBytes instead of java.security.SecureRandom.generateSeed to generate the seed used to "randomize" the secp256k1 context. The later might block indefinitely on some platforms when the OS' RNG runs out of entropy. java.util.Random is a much weaker source of randomness (2^48 cycle, much less under real world conditions due to imperfect seed). It is however sufficient in this case: The context randomization is only used as an additional precaution against side channel attacks in case the compiler ruins the constant time property of the underlying code. Signed-off-by: Taccat Isid <[email protected]>
- Loading branch information