aboutsummaryrefslogtreecommitdiff
path: root/standalone/src/main/java
diff options
context:
space:
mode:
authorJ08nY2024-04-26 23:36:06 +0200
committerJ08nY2024-04-26 23:36:06 +0200
commit8f9179da726be18ab883ac716296dbe2c411d805 (patch)
tree8a8e0d7582953de3bbd0a474fc8673fa39ade1f1 /standalone/src/main/java
parent05bb80b365928e232416b2b0d4a7a915a00078e9 (diff)
downloadECTester-8f9179da726be18ab883ac716296dbe2c411d805.tar.gz
ECTester-8f9179da726be18ab883ac716296dbe2c411d805.tar.zst
ECTester-8f9179da726be18ab883ac716296dbe2c411d805.zip
Add XDH and EdDSA idents
Diffstat (limited to 'standalone/src/main/java')
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java12
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/consts/SignatureIdent.java12
2 files changed, 23 insertions, 1 deletions
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java b/standalone/src/main/java/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java
index 60c60e8..c0cf793 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/consts/KeyAgreementIdent.java
@@ -18,10 +18,11 @@ public class KeyAgreementIdent extends Ident {
private static final List<KeyAgreementIdent> ALL = new LinkedList<>();
static {
- //https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html
+ // https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html
// Basic ECDH and ECDHC (plain/raw)
ALL.add(new KeyAgreementIdent("ECDH"));
ALL.add(new KeyAgreementIdent("ECDHC", "ECCDH"));
+
// ECDH and ECDHC with SHA as KDF, OIDs from RFC 3278
ALL.add(new KeyAgreementIdent("ECDHwithSHA1KDF", true, "1.3.133.16.840.63.0.2"));
ALL.add(new KeyAgreementIdent("ECCDHwithSHA1KDF", true, "1.3.133.16.840.63.0.3"));
@@ -33,11 +34,13 @@ public class KeyAgreementIdent extends Ident {
ALL.add(new KeyAgreementIdent("ECCDHwithSHA384KDF", true, "1.3.132.1.14.2"));
ALL.add(new KeyAgreementIdent("ECDHwithSHA512KDF", true, "1.3.132.1.11.3"));
ALL.add(new KeyAgreementIdent("ECCDHwithSHA512KDF", true, "1.3.132.1.14.3"));
+
// Microsoft specific KDF
ALL.add(new KeyAgreementIdent("ECDHwithSHA1KDF(CNG)"));
ALL.add(new KeyAgreementIdent("ECDHwithSHA256KDF(CNG)"));
ALL.add(new KeyAgreementIdent("ECDHwithSHA384KDF(CNG)"));
ALL.add(new KeyAgreementIdent("ECDHwithSHA512KDF(CNG)"));
+
// CKDF requires custom AlgorithmParameterSpec (only BouncyCastle)
//ALL.add(new KeyAgreementIdent("ECDHwithSHA1CKDF", true));
//ALL.add(new KeyAgreementIdent("ECCDHwithSHA1CKDF", true));
@@ -47,6 +50,7 @@ public class KeyAgreementIdent extends Ident {
//ALL.add(new KeyAgreementIdent("ECCDHwithSHA384CKDF", true));
//ALL.add(new KeyAgreementIdent("ECDHwithSHA512CKDF", true));
//ALL.add(new KeyAgreementIdent("ECCDHwithSHA512CKDF", true));
+
// ECMQV - Disable for now as it needs diferent params(too different from DH)
//ALL.add(new KeyAgreementIdent("ECMQV"));
//ALL.add(new KeyAgreementIdent("ECMQVwithSHA1KDF", true));
@@ -59,10 +63,16 @@ public class KeyAgreementIdent extends Ident {
//ALL.add(new KeyAgreementIdent("ECMQVwithSHA256CKDF", true, "1.3.132.1.15.1"));
//ALL.add(new KeyAgreementIdent("ECMQVwithSHA384CKDF", true, "1.3.132.1.15.2"));
//ALL.add(new KeyAgreementIdent("ECMQVwithSHA512CKDF", true, "1.3.132.1.15.3"));
+
// ECVKO - Disable for now as it needs diferent params(too different from DH)
//ALL.add(new KeyAgreementIdent("ECVKO", "ECGOST3410", "1.2.643.2.2.19", "GOST-3410-2001", "1.2.643.2.2.96"));
//ALL.add(new KeyAgreementIdent("ECVKO256", "ECGOST3410-2012-256", "1.2.643.7.1.1.6.1", "1.2.643.7.1.1.1.1"));
//ALL.add(new KeyAgreementIdent("ECVKO512", "ECGOST3410-2012-512", "1.2.643.7.1.1.6.2", "1.2.643.7.1.1.1.2"));
+
+ // XDH (RFC 7748)
+ ALL.add(new KeyAgreementIdent("XDH"));
+ ALL.add(new KeyAgreementIdent("X25519"));
+ ALL.add(new KeyAgreementIdent("X448"));
}
public static KeyAgreementIdent get(String ident) {
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/consts/SignatureIdent.java b/standalone/src/main/java/cz/crcs/ectester/standalone/consts/SignatureIdent.java
index c3913b7..a65d0c5 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/consts/SignatureIdent.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/consts/SignatureIdent.java
@@ -30,17 +30,20 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("SHA3-384withECDSA", "SHA3-384/ECDSA", "2.16.840.1.101.3.4.3.11"));
ALL.add(new SignatureIdent("SHA3-512withECDSA", "SHA3-512/ECDSA", "2.16.840.1.101.3.4.3.12"));
ALL.add(new SignatureIdent("RIPEMD160withECDSA", "RIPEMD160/ECDSA", "1.3.36.3.3.2.2"));
+
// ECNR
ALL.add(new SignatureIdent("SHA1withECNR"));
ALL.add(new SignatureIdent("SHA224withECNR"));
ALL.add(new SignatureIdent("SHA256withECNR"));
ALL.add(new SignatureIdent("SHA512withECNR"));
+
// CVC-ECDSA
ALL.add(new SignatureIdent("SHA1withCVC-ECDSA", "SHA1/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.1"));
ALL.add(new SignatureIdent("SHA224withCVC-ECDSA", "SHA224/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.2"));
ALL.add(new SignatureIdent("SHA256withCVC-ECDSA", "SHA256/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.3"));
ALL.add(new SignatureIdent("SHA384withCVC-ECDSA", "SHA384/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.4"));
ALL.add(new SignatureIdent("SHA512withCVC-ECDSA", "SHA512/CVC-ECDSA", "0.4.0.127.0.7.2.2.2.2.5"));
+
// PLAIN-ECDSA
ALL.add(new SignatureIdent("SHA1withPLAIN-ECDSA", "SHA1/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.1"));
ALL.add(new SignatureIdent("SHA224withPLAIN-ECDSA", "SHA224/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.2"));
@@ -48,6 +51,7 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("SHA384withPLAIN-ECDSA", "SHA384/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.4"));
ALL.add(new SignatureIdent("SHA512withPLAIN-ECDSA", "SHA512/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.5"));
ALL.add(new SignatureIdent("RIPEMD160withPLAIN-ECDSA", "RIPEMD160/PLAIN-ECDSA", "0.4.0.127.0.7.1.1.4.1.6"));
+
// ECGOST
ALL.add(new SignatureIdent("ECGOST3410", "ECGOST-3410", "GOST-3410-2001"));
ALL.add(new SignatureIdent("GOST3411withECGOST3410", "GOST3411/ECGOST3410", "1.2.643.2.2.3"));
@@ -56,6 +60,7 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("ECGOST3410-2012-512", "GOST-3410-2012-512"));
ALL.add(new SignatureIdent("GOST3411-2012-512withECGOST3410-2012-512", "GOST3411-2012-512/ECGOST3410-2012-5120", "1.2.643.7.1.1.3.3"));
ALL.add(new SignatureIdent("SM3withSM2"));
+
// ECDDSA (rfc6979?)
ALL.add(new SignatureIdent("ECDDSA", "SHA1withECDDSA", "SHA1withDETECDSA", "DETECDSA", "ECDETDSA"));
ALL.add(new SignatureIdent("SHA224withECDDSA", "SHA224withDETECDSA"));
@@ -66,6 +71,7 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("SHA3-256withECDDSA", "SHA3-256withDETECDSA"));
ALL.add(new SignatureIdent("SHA3-384withECDDSA", "SHA3-384withDETECDSA"));
ALL.add(new SignatureIdent("SHA3-512withECDDSA", "SHA3-512withDETECDSA"));
+
// ECKCDSA? Botan provides.
ALL.add(new SignatureIdent("ECKCDSA", "SHA1withECKCDSA", "1.2.410.200004.1.100.4.3"));
ALL.add(new SignatureIdent("NONEwithECKCDSA"));
@@ -74,6 +80,7 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("SHA256withECKCDSA", "1.2.410.200004.1.100.4.5"));
ALL.add(new SignatureIdent("SHA384withECKCDSA"));
ALL.add(new SignatureIdent("SHA512withECKCDSA"));
+
// ECGDSA? Botan provides.
ALL.add(new SignatureIdent("ECGDSA", "SHA1withECGDSA", "1.3.36.3.3.2.5.4.2"));
ALL.add(new SignatureIdent("NONEwithECGDSA"));
@@ -82,6 +89,11 @@ public class SignatureIdent extends Ident {
ALL.add(new SignatureIdent("SHA224withECGDSA", "1.3.36.3.3.2.5.4.4"));
ALL.add(new SignatureIdent("SHA384withECGDSA", "1.3.36.3.3.2.5.4.5"));
ALL.add(new SignatureIdent("SHA512withECGDSA", "1.3.36.3.3.2.5.4.6"));
+
+ // EdDSA (RFC 8032)
+ ALL.add(new SignatureIdent("EdDSA"));
+ ALL.add(new SignatureIdent("Ed25519"));
+ ALL.add(new SignatureIdent("Ed448"));
}
public static SignatureIdent get(String ident) {