I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 10993cc6 authored by zzz's avatar zzz
Browse files

EdDSA: Use our PRNG by default for keygen

parent 81409369
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ import net.i2p.crypto.eddsa.spec.EdDSANamedCurveTable;
import net.i2p.crypto.eddsa.spec.EdDSAParameterSpec;
import net.i2p.crypto.eddsa.spec.EdDSAPrivateKeySpec;
import net.i2p.crypto.eddsa.spec.EdDSAPublicKeySpec;
import net.i2p.util.RandomSource;
/**
* Default strength is 256
......@@ -60,7 +61,7 @@ public class KeyPairGenerator extends KeyPairGeneratorSpi {
public KeyPair generateKeyPair() {
if (!initialized)
initialize(DEFAULT_STRENGTH, new SecureRandom());
initialize(DEFAULT_STRENGTH, RandomSource.getInstance());
byte[] seed = new byte[edParams.getCurve().getField().getb()/8];
random.nextBytes(seed);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment