From be2ae6a8504aebc7fe2f613213652afb30ca501b Mon Sep 17 00:00:00 2001 From: Felipe Ventura Date: Tue, 27 Feb 2024 13:10:20 -0600 Subject: [PATCH] changed composite dilithium to ML-* --- ALGORITHMS.md | 10 -- oqs-template/generate.yml | 52 ---------- oqsprov/oqs_decode_der2key.c | 28 ----- oqsprov/oqs_encode_key2any.c | 100 ------------------ oqsprov/oqs_kmgmt.c | 191 +++++++++++++++++------------------ oqsprov/oqs_prov.h | 180 --------------------------------- oqsprov/oqsdecoders.inc | 52 ---------- oqsprov/oqsencoders.inc | 169 ------------------------------- oqsprov/oqsprov.c | 86 ++-------------- oqsprov/oqsprov_keys.c | 10 -- 10 files changed, 99 insertions(+), 779 deletions(-) diff --git a/ALGORITHMS.md b/ALGORITHMS.md index f382f928..afed6804 100644 --- a/ALGORITHMS.md +++ b/ALGORITHMS.md @@ -145,18 +145,8 @@ adapting the OIDs of all supported signature algorithms as per the table below. | dilithium2 | 1.3.6.1.4.1.2.267.7.4.4 |Yes| OQS_OID_DILITHIUM2 | p256_dilithium2 | 1.3.9999.2.7.1 |Yes| OQS_OID_P256_DILITHIUM2 | rsa3072_dilithium2 | 1.3.9999.2.7.2 |Yes| OQS_OID_RSA3072_DILITHIUM2 -| dilithium2_pss2048 | 2.16.840.1.114027.80.8.1.1 |Yes| OQS_OID_DILITHIUM2_pss2048 -| dilithium2_rsa2048 | 2.16.840.1.114027.80.8.1.2 |Yes| OQS_OID_DILITHIUM2_rsa2048 -| dilithium2_ed25519 | 2.16.840.1.114027.80.8.1.3 |Yes| OQS_OID_DILITHIUM2_ed25519 -| dilithium2_p256 | 2.16.840.1.114027.80.8.1.4 |Yes| OQS_OID_DILITHIUM2_p256 -| dilithium2_bp256 | 2.16.840.1.114027.80.8.1.5 |Yes| OQS_OID_DILITHIUM2_bp256 | dilithium3 | 1.3.6.1.4.1.2.267.7.6.5 |Yes| OQS_OID_DILITHIUM3 | p384_dilithium3 | 1.3.9999.2.7.3 |Yes| OQS_OID_P384_DILITHIUM3 -| dilithium3_pss3072 | 2.16.840.1.114027.80.8.1.6 |Yes| OQS_OID_DILITHIUM3_pss3072 -| dilithium3_rsa3072 | 2.16.840.1.114027.80.8.1.7 |Yes| OQS_OID_DILITHIUM3_rsa3072 -| dilithium3_p256 | 2.16.840.1.114027.80.8.1.8 |Yes| OQS_OID_DILITHIUM3_p256 -| dilithium3_bp256 | 2.16.840.1.114027.80.8.1.9 |Yes| OQS_OID_DILITHIUM3_bp256 -| dilithium3_ed25519 | 2.16.840.1.114027.80.8.1.10 |Yes| OQS_OID_DILITHIUM3_ed25519 | dilithium5 | 1.3.6.1.4.1.2.267.7.8.7 |Yes| OQS_OID_DILITHIUM5 | p521_dilithium5 | 1.3.9999.2.7.4 |Yes| OQS_OID_P521_DILITHIUM5 | mldsa44 | 1.3.6.1.4.1.2.267.12.4.4 |Yes| OQS_OID_MLDSA44 diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 33cca7bc..0d1d4d15 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -477,26 +477,6 @@ sigs: 'pretty_name': 'RSA3072', 'oid': '1.3.9999.2.7.2', 'code_point': '0xfea2'}] - composite: [{'name': 'pss2048', - 'pretty_name': 'RSA PSS 2048', - 'security': '112', - 'oid': '2.16.840.1.114027.80.8.1.1'}, - {'name': 'rsa2048', - 'pretty_name': 'RSA2028', - 'security': '112', - 'oid': '2.16.840.1.114027.80.8.1.2'}, - {'name': 'ed25519', - 'pretty_name': 'ED25519', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.3'}, - {'name': 'p256', - 'pretty_name': 'ECDSA p256', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.4'}, - {'name': 'bp256', - 'pretty_name': 'ECDSA brainpoolP256r1', - 'security': '256', - 'oid': '2.16.840.1.114027.80.8.1.5'}] - name: 'dilithium3' pretty_name: 'Dilithium3' @@ -509,26 +489,6 @@ sigs: 'pretty_name': 'ECDSA p384', 'oid': '1.3.9999.2.7.3', 'code_point': '0xfea4'}] - composite: [{'name': 'pss3072', - 'pretty_name': 'RSA PSS 3072', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.6'}, - {'name': 'rsa3072', - 'pretty_name': 'RSA 3072', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.7'}, - {'name': 'p256', - 'pretty_name': 'ECDSA p256', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.8'}, - {'name': 'bp256', - 'pretty_name': 'ECDSA brainpoolP256r1', - 'security': '256', - 'oid': '2.16.840.1.114027.80.8.1.9'}, - {'name': 'ed25519', - 'pretty_name': 'ED25519', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.10'}] - name: 'dilithium5' pretty_name: 'Dilithium5' @@ -541,18 +501,6 @@ sigs: 'pretty_name': 'ECDSA p521', 'oid': '1.3.9999.2.7.4', 'code_point': '0xfea6'}] - composite: [{'name': 'p384', - 'pretty_name': 'ECDSA p384', - 'security': '192', - 'oid': '2.16.840.1.114027.80.8.1.11'}, - {'name': 'bp384', - 'pretty_name': 'ECDSA brainpoolP384r1', - 'security': '384', - 'oid': '2.16.840.1.114027.80.8.1.12'}, - {'name': 'ed448', - 'pretty_name': 'ED448', - 'security': '192', - 'oid': '2.16.840.1.114027.80.8.1.13'}] - name: 'dilithium2_aes' pretty_name: 'Dilithium2_AES' diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index 98df41be..99093ffa 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -696,38 +696,10 @@ MAKE_DECODER(, "p256_dilithium2", p256_dilithium2, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx, PrivateKeyInfo); MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium2_pss2048", dilithium2_pss2048, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2_pss2048", dilithium2_pss2048, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium2_rsa2048", dilithium2_rsa2048, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2_rsa2048", dilithium2_rsa2048, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium2_ed25519", dilithium2_ed25519, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2_ed25519", dilithium2_ed25519, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium2_p256", dilithium2_p256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2_p256", dilithium2_p256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium2_bp256", dilithium2_bp256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2_bp256", dilithium2_bp256, oqsx, - SubjectPublicKeyInfo); MAKE_DECODER(, "dilithium3", dilithium3, oqsx, PrivateKeyInfo); MAKE_DECODER(, "dilithium3", dilithium3, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, PrivateKeyInfo); MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3_pss3072", dilithium3_pss3072, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3_pss3072", dilithium3_pss3072, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3_rsa3072", dilithium3_rsa3072, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3_rsa3072", dilithium3_rsa3072, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3_p256", dilithium3_p256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3_p256", dilithium3_p256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3_bp256", dilithium3_bp256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3_bp256", dilithium3_bp256, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3_ed25519", dilithium3_ed25519, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3_ed25519", dilithium3_ed25519, oqsx, - SubjectPublicKeyInfo); MAKE_DECODER(, "dilithium5", dilithium5, oqsx, PrivateKeyInfo); MAKE_DECODER(, "dilithium5", dilithium5, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "p521_dilithium5", p521_dilithium5, oqsx, PrivateKeyInfo); diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index 1ce03a75..ddf4d9a1 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -1138,42 +1138,12 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define rsa3072_dilithium2_evp_type 0 #define rsa3072_dilithium2_input_type "rsa3072_dilithium2" #define rsa3072_dilithium2_pem_type "rsa3072_dilithium2" -#define dilithium2_pss2048_evp_type 0 -#define dilithium2_pss2048_input_type "dilithium2_pss2048" -#define dilithium2_pss2048_pem_type "dilithium2_pss2048" -#define dilithium2_rsa2048_evp_type 0 -#define dilithium2_rsa2048_input_type "dilithium2_rsa2048" -#define dilithium2_rsa2048_pem_type "dilithium2_rsa2048" -#define dilithium2_ed25519_evp_type 0 -#define dilithium2_ed25519_input_type "dilithium2_ed25519" -#define dilithium2_ed25519_pem_type "dilithium2_ed25519" -#define dilithium2_p256_evp_type 0 -#define dilithium2_p256_input_type "dilithium2_p256" -#define dilithium2_p256_pem_type "dilithium2_p256" -#define dilithium2_bp256_evp_type 0 -#define dilithium2_bp256_input_type "dilithium2_bp256" -#define dilithium2_bp256_pem_type "dilithium2_bp256" #define dilithium3_evp_type 0 #define dilithium3_input_type "dilithium3" #define dilithium3_pem_type "dilithium3" #define p384_dilithium3_evp_type 0 #define p384_dilithium3_input_type "p384_dilithium3" #define p384_dilithium3_pem_type "p384_dilithium3" -#define dilithium3_pss3072_evp_type 0 -#define dilithium3_pss3072_input_type "dilithium3_pss3072" -#define dilithium3_pss3072_pem_type "dilithium3_pss3072" -#define dilithium3_rsa3072_evp_type 0 -#define dilithium3_rsa3072_input_type "dilithium3_rsa3072" -#define dilithium3_rsa3072_pem_type "dilithium3_rsa3072" -#define dilithium3_p256_evp_type 0 -#define dilithium3_p256_input_type "dilithium3_p256" -#define dilithium3_p256_pem_type "dilithium3_p256" -#define dilithium3_bp256_evp_type 0 -#define dilithium3_bp256_input_type "dilithium3_bp256" -#define dilithium3_bp256_pem_type "dilithium3_bp256" -#define dilithium3_ed25519_evp_type 0 -#define dilithium3_ed25519_input_type "dilithium3_ed25519" -#define dilithium3_ed25519_pem_type "dilithium3_ed25519" #define dilithium5_evp_type 0 #define dilithium5_input_type "dilithium5" #define dilithium5_pem_type "dilithium5" @@ -2362,41 +2332,6 @@ MAKE_ENCODER(, rsa3072_dilithium2, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, rsa3072_dilithium2); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2_pss2048, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2_pss2048); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2_rsa2048, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2_rsa2048); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2_ed25519, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2_ed25519); -MAKE_ENCODER(, dilithium2_p256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_p256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_p256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_p256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_p256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2_p256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2_p256); -MAKE_ENCODER(, dilithium2_bp256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_bp256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_bp256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2_bp256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2_bp256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2_bp256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2_bp256); MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, dilithium3, oqsx, PrivateKeyInfo, der); @@ -2411,41 +2346,6 @@ MAKE_ENCODER(, p384_dilithium3, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, p384_dilithium3); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3_pss3072, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3_pss3072); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3_rsa3072); -MAKE_ENCODER(, dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_p256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_p256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_p256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3_p256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3_p256); -MAKE_ENCODER(, dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_bp256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_bp256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_bp256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3_bp256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3_bp256); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3_ed25519); MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, dilithium5, oqsx, PrivateKeyInfo, der); diff --git a/oqsprov/oqs_kmgmt.c b/oqsprov/oqs_kmgmt.c index b8d34653..07b413ee 100644 --- a/oqsprov/oqs_kmgmt.c +++ b/oqsprov/oqs_kmgmt.c @@ -628,156 +628,157 @@ static void *rsa3072_dilithium2_gen_init(void *provctx, int selection) return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, "rsa3072_dilithium2", KEY_TYPE_HYB_SIG, 128, 2); } -static void *dilithium2_pss2048_new_key(void *provctx) +static void *dilithium3_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2_pss2048", KEY_TYPE_CMP_SIG, NULL, 112, 3); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, + "dilithium3", KEY_TYPE_SIG, NULL, 192, 3); } -static void *dilithium2_pss2048_gen_init(void *provctx, int selection) +static void *dilithium3_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2_pss2048", KEY_TYPE_CMP_SIG, 112, 3); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, + "dilithium3", 0, 192, 3); } -static void *dilithium2_rsa2048_new_key(void *provctx) +static void *p384_dilithium3_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2_rsa2048", KEY_TYPE_CMP_SIG, NULL, 112, 4); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, + "p384_dilithium3", KEY_TYPE_HYB_SIG, NULL, 192, 4); } -static void *dilithium2_rsa2048_gen_init(void *provctx, int selection) +static void *p384_dilithium3_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2_rsa2048", KEY_TYPE_CMP_SIG, 112, 4); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, + "p384_dilithium3", KEY_TYPE_HYB_SIG, 192, 4); } -static void *dilithium2_ed25519_new_key(void *provctx) +static void *dilithium5_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 5); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, + "dilithium5", KEY_TYPE_SIG, NULL, 256, 5); } -static void *dilithium2_ed25519_gen_init(void *provctx, int selection) +static void *dilithium5_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2_ed25519", KEY_TYPE_CMP_SIG, 128, 5); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, + "dilithium5", 0, 256, 5); } -static void *dilithium2_p256_new_key(void *provctx) +static void *p521_dilithium5_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2_p256", KEY_TYPE_CMP_SIG, NULL, 128, 6); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, + "p521_dilithium5", KEY_TYPE_HYB_SIG, NULL, 256, 6); } -static void *dilithium2_p256_gen_init(void *provctx, int selection) +static void *p521_dilithium5_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2_p256", KEY_TYPE_CMP_SIG, 128, 6); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, + "p521_dilithium5", KEY_TYPE_HYB_SIG, 256, 6); } -static void *dilithium2_bp256_new_key(void *provctx) + +static void *mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 7); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44", KEY_TYPE_SIG, NULL, 128, 7); } -static void *dilithium2_bp256_gen_init(void *provctx, int selection) +static void *mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2_bp256", KEY_TYPE_CMP_SIG, 256, 7); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44", + 0, 128, 7); } -static void *dilithium3_new_key(void *provctx) +static void *p256_mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3", KEY_TYPE_SIG, NULL, 192, 8); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 8); } -static void *dilithium3_gen_init(void *provctx, int selection) +static void *p256_mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3", 0, 192, 8); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, 128, 8); } -static void *p384_dilithium3_new_key(void *provctx) +static void *rsa3072_mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "p384_dilithium3", KEY_TYPE_HYB_SIG, NULL, 192, 9); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 9); } -static void *p384_dilithium3_gen_init(void *provctx, int selection) +static void *rsa3072_mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "p384_dilithium3", KEY_TYPE_HYB_SIG, 192, 9); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, 128, 9); } -static void *dilithium3_pss3072_new_key(void *provctx) +static void *mldsa44_pss2048_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3_pss3072", KEY_TYPE_CMP_SIG, NULL, 128, 10); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44_pss2048", KEY_TYPE_CMP_SIG, NULL, 112, 10); } -static void *dilithium3_pss3072_gen_init(void *provctx, int selection) +static void *mldsa44_pss2048_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3_pss3072", KEY_TYPE_CMP_SIG, 128, 10); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "mldsa44_pss2048", KEY_TYPE_CMP_SIG, 112, 10); } -static void *dilithium3_rsa3072_new_key(void *provctx) +static void *mldsa44_rsa2048_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3_rsa3072", KEY_TYPE_CMP_SIG, NULL, 128, 11); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, NULL, 112, 11); } -static void *dilithium3_rsa3072_gen_init(void *provctx, int selection) +static void *mldsa44_rsa2048_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3_rsa3072", KEY_TYPE_CMP_SIG, 128, 11); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, 112, 11); } -static void *dilithium3_p256_new_key(void *provctx) +static void *mldsa44_ed25519_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3_p256", KEY_TYPE_CMP_SIG, NULL, 128, 12); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 12); } -static void *dilithium3_p256_gen_init(void *provctx, int selection) +static void *mldsa44_ed25519_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3_p256", KEY_TYPE_CMP_SIG, 128, 12); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "mldsa44_ed25519", KEY_TYPE_CMP_SIG, 128, 12); } -static void *dilithium3_bp256_new_key(void *provctx) +static void *mldsa44_p256_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 13); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44_p256", KEY_TYPE_CMP_SIG, NULL, 128, 13); } -static void *dilithium3_bp256_gen_init(void *provctx, int selection) +static void *mldsa44_p256_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3_bp256", KEY_TYPE_CMP_SIG, 256, 13); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "mldsa44_p256", KEY_TYPE_CMP_SIG, 128, 13); } -static void *dilithium3_ed25519_new_key(void *provctx) +static void *mldsa44_bp256_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 14); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 14); } -static void *dilithium3_ed25519_gen_init(void *provctx, int selection) +static void *mldsa44_bp256_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3_ed25519", KEY_TYPE_CMP_SIG, 128, 14); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "mldsa44_bp256", KEY_TYPE_CMP_SIG, 256, 14); } -static void *dilithium5_new_key(void *provctx) +static void *mldsa65_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, - "dilithium5", KEY_TYPE_SIG, NULL, 256, 15); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "mldsa65", KEY_TYPE_SIG, NULL, 192, 15); } -static void *dilithium5_gen_init(void *provctx, int selection) +static void *mldsa65_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, - "dilithium5", 0, 256, 15); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65", + 0, 192, 15); } -static void *p521_dilithium5_new_key(void *provctx) +static void *p384_mldsa65_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, - "p521_dilithium5", KEY_TYPE_HYB_SIG, NULL, 256, 16); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 16); } -static void *p521_dilithium5_gen_init(void *provctx, int selection) +static void *p384_mldsa65_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, "p521_dilithium5", KEY_TYPE_HYB_SIG, 256, 6); @@ -871,24 +872,24 @@ static void *mldsa44_bp256_gen_init(void *provctx, int selection) return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44_bp256", KEY_TYPE_CMP_SIG, 256, 14); } -static void *mldsa65_new_key(void *provctx) +static void *p521_mldsa87_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, "mldsa65", KEY_TYPE_SIG, NULL, 192, 15); } -static void *mldsa65_gen_init(void *provctx, int selection) +static void *p521_mldsa87_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65", 0, 192, 15); } -static void *p384_mldsa65_new_key(void *provctx) +static void *mldsa87_p384_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, "p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 16); } -static void *p384_mldsa65_gen_init(void *provctx, int selection) +static void *mldsa87_p384_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "p384_mldsa65", KEY_TYPE_HYB_SIG, 192, 16); @@ -948,24 +949,24 @@ static void *mldsa65_ed25519_gen_init(void *provctx, int selection) return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65_ed25519", KEY_TYPE_CMP_SIG, 128, 21); } -static void *mldsa87_new_key(void *provctx) +static void *mldsa87_bp384_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, "mldsa87", KEY_TYPE_SIG, NULL, 256, 22); } -static void *mldsa87_gen_init(void *provctx, int selection) +static void *mldsa87_bp384_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "mldsa87", 0, 256, 22); } -static void *p521_mldsa87_new_key(void *provctx) +static void *mldsa87_ed448_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, "p521_mldsa87", KEY_TYPE_HYB_SIG, NULL, 256, 23); } -static void *p521_mldsa87_gen_init(void *provctx, int selection) +static void *mldsa87_ed448_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 23); @@ -1425,18 +1426,8 @@ static void *dilithium3_rsa3072_new_key(void *provctx) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2) MAKE_SIG_KEYMGMT_FUNCTIONS(p256_dilithium2) MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_dilithium2) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2_pss2048) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2_rsa2048) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2_ed25519) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2_p256) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2_bp256) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3) MAKE_SIG_KEYMGMT_FUNCTIONS(p384_dilithium3) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3_pss3072) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3_rsa3072) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3_p256) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3_bp256) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3_ed25519) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium5) MAKE_SIG_KEYMGMT_FUNCTIONS(p521_dilithium5) MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa44) diff --git a/oqsprov/oqs_prov.h b/oqsprov/oqs_prov.h index 97bb1399..3a7faa02 100644 --- a/oqsprov/oqs_prov.h +++ b/oqsprov/oqs_prov.h @@ -1202,91 +1202,6 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_rsa3072_dilithium2_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_rsa3072_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_pss2048_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_pss2048_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_pss2048_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_pss2048_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_rsa2048_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_rsa2048_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_rsa2048_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_rsa2048_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_ed25519_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_ed25519_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_ed25519_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_ed25519_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_p256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_p256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_bp256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_bp256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_bp256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_bp256_decoder_functions[]; extern const OSSL_DISPATCH oqs_dilithium3_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH @@ -1321,91 +1236,6 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_p384_dilithium3_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_p384_dilithium3_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_pss3072_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_pss3072_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_pss3072_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_pss3072_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_rsa3072_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_rsa3072_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_rsa3072_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_rsa3072_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_p256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_p256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_bp256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_bp256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_bp256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_bp256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_ed25519_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_ed25519_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_ed25519_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_ed25519_decoder_functions[]; extern const OSSL_DISPATCH oqs_dilithium5_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH @@ -2206,18 +2036,8 @@ extern const OSSL_DISPATCH extern const OSSL_DISPATCH oqs_dilithium2_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p256_dilithium2_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_rsa3072_dilithium2_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_pss2048_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_rsa2048_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_ed25519_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_p256_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_bp256_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_dilithium3_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p384_dilithium3_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_pss3072_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_rsa3072_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_p256_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_bp256_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_ed25519_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_dilithium5_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p521_dilithium5_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_mldsa44_keymgmt_functions[]; diff --git a/oqsprov/oqsdecoders.inc b/oqsprov/oqsdecoders.inc index 99e06cb8..b8aee95d 100644 --- a/oqsprov/oqsdecoders.inc +++ b/oqsprov/oqsdecoders.inc @@ -237,26 +237,6 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), rsa3072_dilithium2), DECODER_w_structure("rsa3072_dilithium2", der, SubjectPublicKeyInfo, rsa3072_dilithium2), - DECODER_w_structure("dilithium2_pss2048", der, PrivateKeyInfo, - dilithium2_pss2048), - DECODER_w_structure("dilithium2_pss2048", der, SubjectPublicKeyInfo, - dilithium2_pss2048), - DECODER_w_structure("dilithium2_rsa2048", der, PrivateKeyInfo, - dilithium2_rsa2048), - DECODER_w_structure("dilithium2_rsa2048", der, SubjectPublicKeyInfo, - dilithium2_rsa2048), - DECODER_w_structure("dilithium2_ed25519", der, PrivateKeyInfo, - dilithium2_ed25519), - DECODER_w_structure("dilithium2_ed25519", der, SubjectPublicKeyInfo, - dilithium2_ed25519), - DECODER_w_structure("dilithium2_p256", der, PrivateKeyInfo, - dilithium2_p256), - DECODER_w_structure("dilithium2_p256", der, SubjectPublicKeyInfo, - dilithium2_p256), - DECODER_w_structure("dilithium2_bp256", der, PrivateKeyInfo, - dilithium2_bp256), - DECODER_w_structure("dilithium2_bp256", der, SubjectPublicKeyInfo, - dilithium2_bp256), #endif #ifdef OQS_ENABLE_SIG_dilithium_3 DECODER_w_structure("dilithium3", der, PrivateKeyInfo, dilithium3), @@ -265,26 +245,6 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), p384_dilithium3), DECODER_w_structure("p384_dilithium3", der, SubjectPublicKeyInfo, p384_dilithium3), - DECODER_w_structure("dilithium3_pss3072", der, PrivateKeyInfo, - dilithium3_pss3072), - DECODER_w_structure("dilithium3_pss3072", der, SubjectPublicKeyInfo, - dilithium3_pss3072), - DECODER_w_structure("dilithium3_rsa3072", der, PrivateKeyInfo, - dilithium3_rsa3072), - DECODER_w_structure("dilithium3_rsa3072", der, SubjectPublicKeyInfo, - dilithium3_rsa3072), - DECODER_w_structure("dilithium3_p256", der, PrivateKeyInfo, - dilithium3_p256), - DECODER_w_structure("dilithium3_p256", der, SubjectPublicKeyInfo, - dilithium3_p256), - DECODER_w_structure("dilithium3_bp256", der, PrivateKeyInfo, - dilithium3_bp256), - DECODER_w_structure("dilithium3_bp256", der, SubjectPublicKeyInfo, - dilithium3_bp256), - DECODER_w_structure("dilithium3_ed25519", der, PrivateKeyInfo, - dilithium3_ed25519), - DECODER_w_structure("dilithium3_ed25519", der, SubjectPublicKeyInfo, - dilithium3_ed25519), #endif #ifdef OQS_ENABLE_SIG_dilithium_5 DECODER_w_structure("dilithium5", der, PrivateKeyInfo, dilithium5), @@ -293,18 +253,6 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), p521_dilithium5), DECODER_w_structure("p521_dilithium5", der, SubjectPublicKeyInfo, p521_dilithium5), - DECODER_w_structure("dilithium5_p384", der, PrivateKeyInfo, - dilithium5_p384), - DECODER_w_structure("dilithium5_p384", der, SubjectPublicKeyInfo, - dilithium5_p384), - DECODER_w_structure("dilithium5_bp384", der, PrivateKeyInfo, - dilithium5_bp384), - DECODER_w_structure("dilithium5_bp384", der, SubjectPublicKeyInfo, - dilithium5_bp384), - DECODER_w_structure("dilithium5_ed448", der, PrivateKeyInfo, - dilithium5_ed448), - DECODER_w_structure("dilithium5_ed448", der, SubjectPublicKeyInfo, - dilithium5_ed448), #endif #ifdef OQS_ENABLE_SIG_ml_dsa_44 DECODER_w_structure("mldsa44", der, PrivateKeyInfo, mldsa44), diff --git a/oqsprov/oqsencoders.inc b/oqsprov/oqsencoders.inc index 3249c973..bcb21286 100644 --- a/oqsprov/oqsencoders.inc +++ b/oqsprov/oqsencoders.inc @@ -697,71 +697,6 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, pem, SubjectPublicKeyInfo), ENCODER_TEXT("rsa3072_dilithium2", rsa3072_dilithium2), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2_pss2048", dilithium2_pss2048, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2_pss2048", dilithium2_pss2048), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2_rsa2048", dilithium2_rsa2048, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2_rsa2048", dilithium2_rsa2048), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2_ed25519", dilithium2_ed25519, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2_ed25519", dilithium2_ed25519), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2_p256", dilithium2_p256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2_p256", dilithium2_p256), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2_bp256", dilithium2_bp256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2_bp256", dilithium2_bp256), #endif #ifdef OQS_ENABLE_SIG_dilithium_3 ENCODER_w_structure("dilithium3", dilithium3, der, PrivateKeyInfo), @@ -784,71 +719,6 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), ENCODER_w_structure("p384_dilithium3", p384_dilithium3, pem, SubjectPublicKeyInfo), ENCODER_TEXT("p384_dilithium3", p384_dilithium3), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3_pss3072", dilithium3_pss3072, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3_pss3072", dilithium3_pss3072), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3_rsa3072", dilithium3_rsa3072, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3_rsa3072", dilithium3_rsa3072), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3_p256", dilithium3_p256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3_p256", dilithium3_p256), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3_bp256", dilithium3_bp256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3_bp256", dilithium3_bp256), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3_ed25519", dilithium3_ed25519, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3_ed25519", dilithium3_ed25519), #endif #ifdef OQS_ENABLE_SIG_dilithium_5 ENCODER_w_structure("dilithium5", dilithium5, der, PrivateKeyInfo), @@ -871,45 +741,6 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), ENCODER_w_structure("p521_dilithium5", p521_dilithium5, pem, SubjectPublicKeyInfo), ENCODER_TEXT("p521_dilithium5", p521_dilithium5), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium5_p384", dilithium5_p384, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium5_p384", dilithium5_p384), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium5_bp384", dilithium5_bp384, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium5_bp384", dilithium5_bp384), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, der, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, pem, - PrivateKeyInfo), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium5_ed448", dilithium5_ed448, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium5_ed448", dilithium5_ed448), #endif #ifdef OQS_ENABLE_SIG_ml_dsa_44 ENCODER_w_structure("mldsa44", mldsa44, der, PrivateKeyInfo), diff --git a/oqsprov/oqsprov.c b/oqsprov/oqsprov.c index 192920b8..a9838c9e 100644 --- a/oqsprov/oqsprov.c +++ b/oqsprov/oqsprov.c @@ -539,73 +539,23 @@ int oqs_patch_encodings(void) if (getenv("OQS_ENCODING_RSA3072_DILITHIUM2_ALGNAME")) oqs_alg_encoding_list[5] = getenv("OQS_ENCODING_RSA3072_DILITHIUM2_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM2_PSS2048")) - oqs_alg_encoding_list[6] = getenv("OQS_ENCODING_DILITHIUM2_PSS2048"); - if (getenv("OQS_ENCODING_DILITHIUM2_PSS2048_ALGNAME")) - oqs_alg_encoding_list[7] - = getenv("OQS_ENCODING_DILITHIUM2_PSS2048_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM2_RSA2048")) - oqs_alg_encoding_list[8] = getenv("OQS_ENCODING_DILITHIUM2_RSA2048"); - if (getenv("OQS_ENCODING_DILITHIUM2_RSA2048_ALGNAME")) - oqs_alg_encoding_list[9] - = getenv("OQS_ENCODING_DILITHIUM2_RSA2048_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM2_ED25519")) - oqs_alg_encoding_list[10] = getenv("OQS_ENCODING_DILITHIUM2_ED25519"); - if (getenv("OQS_ENCODING_DILITHIUM2_ED25519_ALGNAME")) - oqs_alg_encoding_list[11] - = getenv("OQS_ENCODING_DILITHIUM2_ED25519_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM2_P256")) - oqs_alg_encoding_list[12] = getenv("OQS_ENCODING_DILITHIUM2_P256"); - if (getenv("OQS_ENCODING_DILITHIUM2_P256_ALGNAME")) - oqs_alg_encoding_list[13] - = getenv("OQS_ENCODING_DILITHIUM2_P256_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM2_BP256")) - oqs_alg_encoding_list[14] = getenv("OQS_ENCODING_DILITHIUM2_BP256"); - if (getenv("OQS_ENCODING_DILITHIUM2_BP256_ALGNAME")) - oqs_alg_encoding_list[15] - = getenv("OQS_ENCODING_DILITHIUM2_BP256_ALGNAME"); if (getenv("OQS_ENCODING_DILITHIUM3")) - oqs_alg_encoding_list[16] = getenv("OQS_ENCODING_DILITHIUM3"); + oqs_alg_encoding_list[6] = getenv("OQS_ENCODING_DILITHIUM3"); if (getenv("OQS_ENCODING_DILITHIUM3_ALGNAME")) - oqs_alg_encoding_list[17] = getenv("OQS_ENCODING_DILITHIUM3_ALGNAME"); + oqs_alg_encoding_list[7] = getenv("OQS_ENCODING_DILITHIUM3_ALGNAME"); if (getenv("OQS_ENCODING_P384_DILITHIUM3")) - oqs_alg_encoding_list[18] = getenv("OQS_ENCODING_P384_DILITHIUM3"); + oqs_alg_encoding_list[8] = getenv("OQS_ENCODING_P384_DILITHIUM3"); if (getenv("OQS_ENCODING_P384_DILITHIUM3_ALGNAME")) - oqs_alg_encoding_list[19] + oqs_alg_encoding_list[9] = getenv("OQS_ENCODING_P384_DILITHIUM3_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM3_PSS3072")) - oqs_alg_encoding_list[20] = getenv("OQS_ENCODING_DILITHIUM3_PSS3072"); - if (getenv("OQS_ENCODING_DILITHIUM3_PSS3072_ALGNAME")) - oqs_alg_encoding_list[21] - = getenv("OQS_ENCODING_DILITHIUM3_PSS3072_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM3_RSA3072")) - oqs_alg_encoding_list[22] = getenv("OQS_ENCODING_DILITHIUM3_RSA3072"); - if (getenv("OQS_ENCODING_DILITHIUM3_RSA3072_ALGNAME")) - oqs_alg_encoding_list[23] - = getenv("OQS_ENCODING_DILITHIUM3_RSA3072_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM3_P256")) - oqs_alg_encoding_list[24] = getenv("OQS_ENCODING_DILITHIUM3_P256"); - if (getenv("OQS_ENCODING_DILITHIUM3_P256_ALGNAME")) - oqs_alg_encoding_list[25] - = getenv("OQS_ENCODING_DILITHIUM3_P256_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM3_BP256")) - oqs_alg_encoding_list[26] = getenv("OQS_ENCODING_DILITHIUM3_BP256"); - if (getenv("OQS_ENCODING_DILITHIUM3_BP256_ALGNAME")) - oqs_alg_encoding_list[27] - = getenv("OQS_ENCODING_DILITHIUM3_BP256_ALGNAME"); - if (getenv("OQS_ENCODING_DILITHIUM3_ED25519")) - oqs_alg_encoding_list[28] = getenv("OQS_ENCODING_DILITHIUM3_ED25519"); - if (getenv("OQS_ENCODING_DILITHIUM3_ED25519_ALGNAME")) - oqs_alg_encoding_list[29] - = getenv("OQS_ENCODING_DILITHIUM3_ED25519_ALGNAME"); if (getenv("OQS_ENCODING_DILITHIUM5")) - oqs_alg_encoding_list[30] = getenv("OQS_ENCODING_DILITHIUM5"); + oqs_alg_encoding_list[10] = getenv("OQS_ENCODING_DILITHIUM5"); if (getenv("OQS_ENCODING_DILITHIUM5_ALGNAME")) - oqs_alg_encoding_list[31] = getenv("OQS_ENCODING_DILITHIUM5_ALGNAME"); + oqs_alg_encoding_list[11] = getenv("OQS_ENCODING_DILITHIUM5_ALGNAME"); if (getenv("OQS_ENCODING_P521_DILITHIUM5")) - oqs_alg_encoding_list[32] = getenv("OQS_ENCODING_P521_DILITHIUM5"); + oqs_alg_encoding_list[12] = getenv("OQS_ENCODING_P521_DILITHIUM5"); if (getenv("OQS_ENCODING_P521_DILITHIUM5_ALGNAME")) - oqs_alg_encoding_list[33] + oqs_alg_encoding_list[13] = getenv("OQS_ENCODING_P521_DILITHIUM5_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA44")) oqs_alg_encoding_list[14] = getenv("OQS_ENCODING_MLDSA44"); @@ -862,20 +812,10 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = { SIGALG("dilithium2", 128, oqs_signature_functions), SIGALG("p256_dilithium2", 128, oqs_signature_functions), SIGALG("rsa3072_dilithium2", 128, oqs_signature_functions), - SIGALG("dilithium2_pss2048", 112, oqs_signature_functions), - SIGALG("dilithium2_rsa2048", 112, oqs_signature_functions), - SIGALG("dilithium2_ed25519", 128, oqs_signature_functions), - SIGALG("dilithium2_p256", 128, oqs_signature_functions), - SIGALG("dilithium2_bp256", 256, oqs_signature_functions), #endif #ifdef OQS_ENABLE_SIG_dilithium_3 SIGALG("dilithium3", 192, oqs_signature_functions), SIGALG("p384_dilithium3", 192, oqs_signature_functions), - SIGALG("dilithium3_pss3072", 128, oqs_signature_functions), - SIGALG("dilithium3_rsa3072", 128, oqs_signature_functions), - SIGALG("dilithium3_p256", 128, oqs_signature_functions), - SIGALG("dilithium3_bp256", 256, oqs_signature_functions), - SIGALG("dilithium3_ed25519", 128, oqs_signature_functions), #endif #ifdef OQS_ENABLE_SIG_dilithium_5 SIGALG("dilithium5", 256, oqs_signature_functions), @@ -1078,20 +1018,10 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] SIGALG("dilithium2", 128, oqs_dilithium2_keymgmt_functions), SIGALG("p256_dilithium2", 128, oqs_p256_dilithium2_keymgmt_functions), SIGALG("rsa3072_dilithium2", 128, oqs_rsa3072_dilithium2_keymgmt_functions), - SIGALG("dilithium2_pss2048", 112, oqs_dilithium2_pss2048_keymgmt_functions), - SIGALG("dilithium2_rsa2048", 112, oqs_dilithium2_rsa2048_keymgmt_functions), - SIGALG("dilithium2_ed25519", 128, oqs_dilithium2_ed25519_keymgmt_functions), - SIGALG("dilithium2_p256", 128, oqs_dilithium2_p256_keymgmt_functions), - SIGALG("dilithium2_bp256", 256, oqs_dilithium2_bp256_keymgmt_functions), #endif #ifdef OQS_ENABLE_SIG_dilithium_3 SIGALG("dilithium3", 192, oqs_dilithium3_keymgmt_functions), SIGALG("p384_dilithium3", 192, oqs_p384_dilithium3_keymgmt_functions), - SIGALG("dilithium3_pss3072", 128, oqs_dilithium3_pss3072_keymgmt_functions), - SIGALG("dilithium3_rsa3072", 128, oqs_dilithium3_rsa3072_keymgmt_functions), - SIGALG("dilithium3_p256", 128, oqs_dilithium3_p256_keymgmt_functions), - SIGALG("dilithium3_bp256", 256, oqs_dilithium3_bp256_keymgmt_functions), - SIGALG("dilithium3_ed25519", 128, oqs_dilithium3_ed25519_keymgmt_functions), #endif #ifdef OQS_ENABLE_SIG_dilithium_5 SIGALG("dilithium5", 256, oqs_dilithium5_keymgmt_functions), diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index ff1e9291..48a48f0b 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -130,18 +130,8 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_SIG, 128}, {0, "p256_dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_HYB_SIG, 128}, {0, "rsa3072_dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_HYB_SIG, 128}, - {0, "dilithium2_pss2048", OQS_SIG_alg_dilithium_2, KEY_TYPE_CMP_SIG, 112}, - {0, "dilithium2_rsa2048", OQS_SIG_alg_dilithium_2, KEY_TYPE_CMP_SIG, 112}, - {0, "dilithium2_ed25519", OQS_SIG_alg_dilithium_2, KEY_TYPE_CMP_SIG, 128}, - {0, "dilithium2_p256", OQS_SIG_alg_dilithium_2, KEY_TYPE_CMP_SIG, 128}, - {0, "dilithium2_bp256", OQS_SIG_alg_dilithium_2, KEY_TYPE_CMP_SIG, 256}, {0, "dilithium3", OQS_SIG_alg_dilithium_3, KEY_TYPE_SIG, 192}, {0, "p384_dilithium3", OQS_SIG_alg_dilithium_3, KEY_TYPE_HYB_SIG, 192}, - {0, "dilithium3_pss3072", OQS_SIG_alg_dilithium_3, KEY_TYPE_CMP_SIG, 128}, - {0, "dilithium3_rsa3072", OQS_SIG_alg_dilithium_3, KEY_TYPE_CMP_SIG, 128}, - {0, "dilithium3_p256", OQS_SIG_alg_dilithium_3, KEY_TYPE_CMP_SIG, 128}, - {0, "dilithium3_bp256", OQS_SIG_alg_dilithium_3, KEY_TYPE_CMP_SIG, 256}, - {0, "dilithium3_ed25519", OQS_SIG_alg_dilithium_3, KEY_TYPE_CMP_SIG, 128}, {0, "dilithium5", OQS_SIG_alg_dilithium_5, KEY_TYPE_SIG, 256}, {0, "p521_dilithium5", OQS_SIG_alg_dilithium_5, KEY_TYPE_HYB_SIG, 256}, {0, "mldsa44", OQS_SIG_alg_ml_dsa_44, KEY_TYPE_SIG, 128},