diff --git a/briar-core/src/org/briarproject/crypto/CryptoComponentImpl.java b/briar-core/src/org/briarproject/crypto/CryptoComponentImpl.java index 22e7be9f75bdb9ad32c15c3367f8cbd2c8ebf3e0..167fb84f336417edd5cd0364c9f2ad1d89aad8ba 100644 --- a/briar-core/src/org/briarproject/crypto/CryptoComponentImpl.java +++ b/briar-core/src/org/briarproject/crypto/CryptoComponentImpl.java @@ -95,7 +95,14 @@ class CryptoComponentImpl implements CryptoComponent { @Inject CryptoComponentImpl(SeedProvider r) { if(!FortunaSecureRandom.selfTest()) throw new RuntimeException(); - secureRandom = new FortunaSecureRandom(r.getSeed()); + SecureRandom secureRandom1 = new SecureRandom(); + if(LOG.isLoggable(INFO)) { + String provider = secureRandom1.getProvider().getName(); + String algorithm = secureRandom1.getAlgorithm(); + LOG.info("Default SecureRandom: " + provider + " " + algorithm); + } + SecureRandom secureRandom2 = new FortunaSecureRandom(r.getSeed()); + secureRandom = new CombinedSecureRandom(secureRandom1, secureRandom2); ECKeyGenerationParameters params = new ECKeyGenerationParameters( PARAMETERS, secureRandom); agreementKeyPairGenerator = new ECKeyPairGenerator();