mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-10-06 19:43:11 +00:00
comment on why the securerandom.getinstancestrong() fallback is neither weaker nor reachable
This commit is contained in:
+1
-1
Submodule drongo updated: 31130261ea...097420f6ea
@@ -62,6 +62,8 @@ public class MnemonicKeystoreEntryPane extends MnemonicKeystorePane {
|
||||
try {
|
||||
secureRandom = SecureRandom.getInstanceStrong();
|
||||
} catch(NoSuchAlgorithmException e) {
|
||||
//Not a fallback to a weaker source: both resolve to the SUN provider and the same java.base implementation seeded from the OS CSPRNG
|
||||
//This branch is in any case unreachable, since securerandom.strongAlgorithms specifies DRBG:SUN, always present in the bundled runtime - see #2040
|
||||
secureRandom = new SecureRandom();
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ public class MnemonicKeystoreImportPane extends MnemonicKeystorePane {
|
||||
try {
|
||||
secureRandom = SecureRandom.getInstanceStrong();
|
||||
} catch(NoSuchAlgorithmException e) {
|
||||
//Not a fallback to a weaker source: both resolve to the SUN provider and the same java.base implementation seeded from the OS CSPRNG
|
||||
//This branch is in any case unreachable, since securerandom.strongAlgorithms specifies DRBG:SUN, always present in the bundled runtime - see #2040
|
||||
secureRandom = new SecureRandom();
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ public class Bip39Dialog extends NewWalletDialog {
|
||||
try {
|
||||
secureRandom = SecureRandom.getInstanceStrong();
|
||||
} catch(NoSuchAlgorithmException e) {
|
||||
//Not a fallback to a weaker source: both resolve to the SUN provider and the same java.base implementation seeded from the OS CSPRNG
|
||||
//This branch is in any case unreachable, since securerandom.strongAlgorithms specifies DRBG:SUN, always present in the bundled runtime - see #2040
|
||||
secureRandom = new SecureRandom();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user