diff --git a/core/build.gradle b/core/build.gradle index 288f04318..e2d2caf59 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -6,7 +6,7 @@ version = '0.15-SNAPSHOT' archivesBaseName = 'bitcoinj-core' dependencies { - compile 'org.bouncycastle:bcprov-jdk15on:1.58' + compile 'org.bouncycastle:bcprov-jdk15on:1.60' implementation 'com.lambdaworks:scrypt:1.4.0' implementation 'com.google.guava:guava:24.0-android' compile 'com.google.protobuf:protobuf-java:3.5.1' diff --git a/core/src/main/java/org/bitcoinj/core/ECKey.java b/core/src/main/java/org/bitcoinj/core/ECKey.java index bd7103668..0e946514a 100644 --- a/core/src/main/java/org/bitcoinj/core/ECKey.java +++ b/core/src/main/java/org/bitcoinj/core/ECKey.java @@ -136,10 +136,8 @@ public class ECKey implements EncryptableItem { if (Utils.isAndroidRuntime()) new LinuxSecureRandom(); - // Tell Bouncy Castle to precompute data that's needed during secp256k1 calculations. Increasing the width - // number makes calculations faster, but at a cost of extra memory usage and with decreasing returns. 12 was - // picked after consulting with the BC team. - FixedPointUtil.precompute(CURVE_PARAMS.getG(), 12); + // Tell Bouncy Castle to precompute data that's needed during secp256k1 calculations. + FixedPointUtil.precompute(CURVE_PARAMS.getG()); CURVE = new ECDomainParameters(CURVE_PARAMS.getCurve(), CURVE_PARAMS.getG(), CURVE_PARAMS.getN(), CURVE_PARAMS.getH()); HALF_CURVE_ORDER = CURVE_PARAMS.getN().shiftRight(1);