diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java
index 1434414bd..7d20aaaa2 100644
--- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java
+++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java
@@ -52,6 +52,9 @@ public static class EncryptingKeyCreationCfg {
@Builder.Default
private final String sigAlgo = "SHA256withECDSA";
+
+ @Builder.Default
+ private final String customNamedCurve = "Curve25519";
}
@Getter
@@ -66,5 +69,8 @@ public static class SigningKeyCreationCfg {
@Builder.Default
private final String sigAlgo = "SHA256withECDSA";
+
+ @Builder.Default
+ private final String customNamedCurve = "Curve25519";
}
}
diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java
index fd1487d9f..622a624d9 100644
--- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java
+++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java
@@ -19,6 +19,8 @@
import de.adorsys.keymanagement.api.types.template.generated.Secret;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
+import org.bouncycastle.crypto.ec.CustomNamedCurves;
+import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
@@ -89,6 +91,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth,
.keySize(encConf.getSize())
.prefix("ENC")
.password(passSupplier)
+ .paramSpec(EC5Util.convertToSpec(CustomNamedCurves.getByName(encConf.getCustomNamedCurve())))
.build()
.repeat(keyConfig.getEncKeyNumber())
)
diff --git a/pom.xml b/pom.xml
index f9ac6d80c..aa0fdcada 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,7 +119,7 @@
1.4.4
2.12.7
2.12.7.1
- 0.0.9
+ 0.0.11-SNAPSHOT
2.1.1
2.3.1
2.8.1