From 4dbbcd6217ad811e3e291492ba20106af79a1865 Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 3 Dec 2022 21:22:49 +0000 Subject: [PATCH] increase key pair size to 2048 bits --- common/src/main/java/bisq/common/crypto/Sig.java | 2 +- p2p/src/test/java/bisq/network/p2p/TestUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/bisq/common/crypto/Sig.java b/common/src/main/java/bisq/common/crypto/Sig.java index c167e625..ede991f6 100644 --- a/common/src/main/java/bisq/common/crypto/Sig.java +++ b/common/src/main/java/bisq/common/crypto/Sig.java @@ -59,7 +59,7 @@ public class Sig { long ts = System.currentTimeMillis(); try { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGO); - keyPairGenerator.initialize(1024); + keyPairGenerator.initialize(2048); return keyPairGenerator.genKeyPair(); } catch (NoSuchAlgorithmException e) { log.error("Could not create key.", e); diff --git a/p2p/src/test/java/bisq/network/p2p/TestUtils.java b/p2p/src/test/java/bisq/network/p2p/TestUtils.java index 8ff9168e..ad550e87 100644 --- a/p2p/src/test/java/bisq/network/p2p/TestUtils.java +++ b/p2p/src/test/java/bisq/network/p2p/TestUtils.java @@ -45,7 +45,7 @@ public class TestUtils { public static KeyPair generateKeyPair() throws NoSuchAlgorithmException { long ts = System.currentTimeMillis(); final KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("DSA"); - keyPairGenerator.initialize(1024); + keyPairGenerator.initialize(2048); KeyPair keyPair = keyPairGenerator.genKeyPair(); log.trace("Generate storageSignatureKeyPair needed {} ms", System.currentTimeMillis() - ts); return keyPair;