diff --git a/ALGORITHMS.md b/ALGORITHMS.md index 57ef04d1..f7f5a225 100644 --- a/ALGORITHMS.md +++ b/ALGORITHMS.md @@ -167,9 +167,6 @@ adapting the OIDs of all supported signature algorithms as per the table below. | falcon512 | 1.3.9999.3.6 |Yes| OQS_OID_FALCON512 | p256_falcon512 | 1.3.9999.3.7 |Yes| OQS_OID_P256_FALCON512 | rsa3072_falcon512 | 1.3.9999.3.8 |Yes| OQS_OID_RSA3072_FALCON512 -| falcon512_p256 | 2.16.840.1.114027.80.8.1.14 |Yes| OQS_OID_FALCON512_p256 -| falcon512_bp256 | 2.16.840.1.114027.80.8.1.15 |Yes| OQS_OID_FALCON512_bp256 -| falcon512_ed25519 | 2.16.840.1.114027.80.8.1.16 |Yes| OQS_OID_FALCON512_ed25519 | falcon1024 | 1.3.9999.3.9 |Yes| OQS_OID_FALCON1024 | p521_falcon1024 | 1.3.9999.3.10 |Yes| OQS_OID_P521_FALCON1024 | sphincssha2128fsimple | 1.3.9999.6.4.13 |Yes| OQS_OID_SPHINCSSHA2128FSIMPLE diff --git a/README.md b/README.md index 8078d41a..9c4d9c92 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ This implementation makes available the following quantum safe algorithms: - **CRYSTALS-Dilithium**:`dilithium2`\*, `p256_dilithium2`\*, `rsa3072_dilithium2`\*, `dilithium3`\*, `p384_dilithium3`\*, `dilithium5`\*, `p521_dilithium5`\* - **ML-DSA**:`mldsa44`\*, `p256_mldsa44`\*, `rsa3072_mldsa44`\*, `mldsa44_pss2048`\*, `mldsa44_rsa2048`\*, `mldsa44_ed25519`\*, `mldsa44_p256`\*, `mldsa44_bp256`\*, `mldsa65`\*, `p384_mldsa65`\*, `mldsa65_pss3072`\*, `mldsa65_rsa3072`\*, `mldsa65_p256`\*, `mldsa65_bp256`\*, `mldsa65_ed25519`\*, `mldsa87`\*, `p521_mldsa87`\*, `mldsa87_p384`\*, `mldsa87_bp384`\*, `mldsa87_ed448`\* -- **Falcon**:`falcon512`\*, `p256_falcon512`\*, `rsa3072_falcon512`\*, `falcon512_p256`\*, `falcon512_bp256`\*, `falcon512_ed25519`\*, `falcon1024`\*, `p521_falcon1024`\* +- **Falcon**:`falcon512`\*, `p256_falcon512`\*, `rsa3072_falcon512`\*, `falcon1024`\*, `p521_falcon1024`\* - **SPHINCS-SHA2**:`sphincssha2128fsimple`\*, `p256_sphincssha2128fsimple`\*, `rsa3072_sphincssha2128fsimple`\*, `sphincssha2128ssimple`\*, `p256_sphincssha2128ssimple`\*, `rsa3072_sphincssha2128ssimple`\*, `sphincssha2192fsimple`\*, `p384_sphincssha2192fsimple`\*, `sphincssha2192ssimple`, `p384_sphincssha2192ssimple`, `sphincssha2256fsimple`, `p521_sphincssha2256fsimple`, `sphincssha2256ssimple`, `p521_sphincssha2256ssimple` - **SPHINCS-SHAKE**:`sphincsshake128fsimple`\*, `p256_sphincsshake128fsimple`\*, `rsa3072_sphincsshake128fsimple`\*, `sphincsshake128ssimple`, `p256_sphincsshake128ssimple`, `rsa3072_sphincsshake128ssimple`, `sphincsshake192fsimple`, `p384_sphincsshake192fsimple`, `sphincsshake192ssimple`, `p384_sphincsshake192ssimple`, `sphincsshake256fsimple`, `p521_sphincsshake256fsimple`, `sphincsshake256ssimple`, `p521_sphincsshake256ssimple` diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index b0cb5ffe..3cb69dce 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -426,7 +426,7 @@ sigs: # 'oid': '2.16.840.1.114027.80.1.8'}] - # The Composite OIDs are kept up to date by @feventura (Entrust) - # These are prototype OIDs and are in line with draft-ounsworth-pq-composite-sigs-12 + # These are prototype OIDs and are in line with draft-ounsworth-pq-composite-sigs-13 # OID scheme for composite variants: # joint-iso-itu-t (2) # country (16) @@ -666,18 +666,6 @@ sigs: 'pretty_name': 'RSA3072', 'oid': '1.3.9999.3.8', 'code_point': '0xfeb0'}] - composite: [{'name': 'p256', - 'pretty_name': 'ECDSA p256', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.14'}, - {'name': 'bp256', - 'pretty_name': 'ECDSA brainpoolP256r1', - 'security': '256', - 'oid': '2.16.840.1.114027.80.8.1.15'}, - {'name': 'ed25519', - 'pretty_name': 'ED25519', - 'security': '128', - 'oid': '2.16.840.1.114027.80.8.1.16'}] extra_nids: old: - implementation_version: NIST Round 3 submission diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index d9bee34f..2ab814da 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -751,13 +751,6 @@ MAKE_DECODER(, "p256_falcon512", p256_falcon512, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "rsa3072_falcon512", rsa3072_falcon512, oqsx, PrivateKeyInfo); MAKE_DECODER(, "rsa3072_falcon512", rsa3072_falcon512, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "falcon512_p256", falcon512_p256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "falcon512_p256", falcon512_p256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "falcon512_bp256", falcon512_bp256, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "falcon512_bp256", falcon512_bp256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "falcon512_ed25519", falcon512_ed25519, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "falcon512_ed25519", falcon512_ed25519, oqsx, - SubjectPublicKeyInfo); MAKE_DECODER(, "falcon1024", falcon1024, oqsx, PrivateKeyInfo); MAKE_DECODER(, "falcon1024", falcon1024, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "p521_falcon1024", p521_falcon1024, oqsx, PrivateKeyInfo); diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index 985453cb..167083f2 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -1180,15 +1180,6 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define rsa3072_falcon512_evp_type 0 #define rsa3072_falcon512_input_type "rsa3072_falcon512" #define rsa3072_falcon512_pem_type "rsa3072_falcon512" -#define falcon512_p256_evp_type 0 -#define falcon512_p256_input_type "falcon512_p256" -#define falcon512_p256_pem_type "falcon512_p256" -#define falcon512_bp256_evp_type 0 -#define falcon512_bp256_input_type "falcon512_bp256" -#define falcon512_bp256_pem_type "falcon512_bp256" -#define falcon512_ed25519_evp_type 0 -#define falcon512_ed25519_input_type "falcon512_ed25519" -#define falcon512_ed25519_pem_type "falcon512_ed25519" #define falcon1024_evp_type 0 #define falcon1024_input_type "falcon1024" #define falcon1024_pem_type "falcon1024" @@ -2478,27 +2469,6 @@ MAKE_ENCODER(, rsa3072_falcon512, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, rsa3072_falcon512, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, rsa3072_falcon512, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, rsa3072_falcon512); -MAKE_ENCODER(, falcon512_p256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_p256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_p256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_p256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_p256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, falcon512_p256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, falcon512_p256); -MAKE_ENCODER(, falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_bp256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_bp256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_bp256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, falcon512_bp256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, falcon512_bp256); -MAKE_ENCODER(, falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_ed25519, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, falcon512_ed25519, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, falcon512_ed25519, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, falcon512_ed25519, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, falcon512_ed25519); MAKE_ENCODER(, falcon1024, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, falcon1024, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, falcon1024, oqsx, PrivateKeyInfo, der); diff --git a/oqsprov/oqs_kmgmt.c b/oqsprov/oqs_kmgmt.c index 013c0ef2..5f017457 100644 --- a/oqsprov/oqs_kmgmt.c +++ b/oqsprov/oqs_kmgmt.c @@ -927,93 +927,60 @@ static void *rsa3072_falcon512_gen_init(void *provctx, int selection) return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, "rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 29); } -static void *falcon512_p256_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_p256", KEY_TYPE_CMP_SIG, NULL, 128, 30); -} - -static void *falcon512_p256_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_p256", KEY_TYPE_CMP_SIG, 128, 30); -} -static void *falcon512_bp256_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 31); -} - -static void *falcon512_bp256_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_bp256", KEY_TYPE_CMP_SIG, 256, 31); -} -static void *falcon512_ed25519_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 32); -} - -static void *falcon512_ed25519_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_ed25519", KEY_TYPE_CMP_SIG, 128, 32); -} static void *falcon1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024, - "falcon1024", KEY_TYPE_SIG, NULL, 256, 33); + "falcon1024", KEY_TYPE_SIG, NULL, 256, 30); } static void *falcon1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024, - "falcon1024", 0, 256, 33); + "falcon1024", 0, 256, 30); } static void *p521_falcon1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024, - "p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 34); + "p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 31); } static void *p521_falcon1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024, - "p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 34); + "p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 31); } static void *sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 35); + "sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 32); } static void *sphincssha2128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "sphincssha2128fsimple", 0, 128, 35); + "sphincssha2128fsimple", 0, 128, 32); } static void *p256_sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 36); + "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 33); } static void *p256_sphincssha2128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 36); + "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 33); } static void *rsa3072_sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 37); + "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 34); } static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx, @@ -1021,39 +988,39 @@ static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 37); + "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 34); } static void *sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 38); + "sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 35); } static void *sphincssha2128ssimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "sphincssha2128ssimple", 0, 128, 38); + "sphincssha2128ssimple", 0, 128, 35); } static void *p256_sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 39); + "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 36); } static void *p256_sphincssha2128ssimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 39); + "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 36); } static void *rsa3072_sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 40); + "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 37); } static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx, @@ -1061,66 +1028,66 @@ static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 40); + "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 37); } static void *sphincssha2192fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_192f_simple, - "sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 41); + "sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 38); } static void *sphincssha2192fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_192f_simple, - "sphincssha2192fsimple", 0, 192, 41); + "sphincssha2192fsimple", 0, 192, 38); } static void *p384_sphincssha2192fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_192f_simple, - "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 42); + "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 39); } static void *p384_sphincssha2192fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_192f_simple, - "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 42); + "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 39); } static void *sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 43); + "sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 40); } static void *sphincsshake128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "sphincsshake128fsimple", 0, 128, 43); + "sphincsshake128fsimple", 0, 128, 40); } static void *p256_sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 44); + "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 41); } static void *p256_sphincsshake128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 44); + "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 41); } static void *rsa3072_sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 45); + "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 42); } static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, @@ -1128,7 +1095,7 @@ static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 45); + "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 42); } ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END @@ -1310,9 +1277,6 @@ MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa87_ed448) MAKE_SIG_KEYMGMT_FUNCTIONS(falcon512) MAKE_SIG_KEYMGMT_FUNCTIONS(p256_falcon512) MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_falcon512) -MAKE_SIG_KEYMGMT_FUNCTIONS(falcon512_p256) -MAKE_SIG_KEYMGMT_FUNCTIONS(falcon512_bp256) -MAKE_SIG_KEYMGMT_FUNCTIONS(falcon512_ed25519) MAKE_SIG_KEYMGMT_FUNCTIONS(falcon1024) MAKE_SIG_KEYMGMT_FUNCTIONS(p521_falcon1024) MAKE_SIG_KEYMGMT_FUNCTIONS(sphincssha2128fsimple) diff --git a/oqsprov/oqs_prov.h b/oqsprov/oqs_prov.h index e2d26585..62268b31 100644 --- a/oqsprov/oqs_prov.h +++ b/oqsprov/oqs_prov.h @@ -1661,57 +1661,6 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_rsa3072_falcon512_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_rsa3072_falcon512_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_p256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_p256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_falcon512_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_falcon512_p256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_bp256_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_bp256_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_falcon512_bp256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_falcon512_bp256_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_falcon512_ed25519_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_ed25519_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_falcon512_ed25519_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_falcon512_ed25519_decoder_functions[]; extern const OSSL_DISPATCH oqs_falcon1024_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH @@ -2023,9 +1972,6 @@ extern const OSSL_DISPATCH oqs_mldsa87_ed448_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_falcon512_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p256_falcon512_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_rsa3072_falcon512_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_p256_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_bp256_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_falcon512_ed25519_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_falcon1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p521_falcon1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_sphincssha2128fsimple_keymgmt_functions[]; diff --git a/oqsprov/oqsdecoders.inc b/oqsprov/oqsdecoders.inc index 2f9e8399..89ee333d 100644 --- a/oqsprov/oqsdecoders.inc +++ b/oqsprov/oqsdecoders.inc @@ -334,17 +334,6 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), rsa3072_falcon512), DECODER_w_structure("rsa3072_falcon512", der, SubjectPublicKeyInfo, rsa3072_falcon512), - DECODER_w_structure("falcon512_p256", der, PrivateKeyInfo, falcon512_p256), - DECODER_w_structure("falcon512_p256", der, SubjectPublicKeyInfo, - falcon512_p256), - DECODER_w_structure("falcon512_bp256", der, PrivateKeyInfo, - falcon512_bp256), - DECODER_w_structure("falcon512_bp256", der, SubjectPublicKeyInfo, - falcon512_bp256), - DECODER_w_structure("falcon512_ed25519", der, PrivateKeyInfo, - falcon512_ed25519), - DECODER_w_structure("falcon512_ed25519", der, SubjectPublicKeyInfo, - falcon512_ed25519), #endif #ifdef OQS_ENABLE_SIG_falcon_1024 DECODER_w_structure("falcon1024", der, PrivateKeyInfo, falcon1024), diff --git a/oqsprov/oqsencoders.inc b/oqsprov/oqsencoders.inc index aa87bce1..d9852a14 100644 --- a/oqsprov/oqsencoders.inc +++ b/oqsprov/oqsencoders.inc @@ -1002,43 +1002,6 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), ENCODER_w_structure("rsa3072_falcon512", rsa3072_falcon512, pem, SubjectPublicKeyInfo), ENCODER_TEXT("rsa3072_falcon512", rsa3072_falcon512), - ENCODER_w_structure("falcon512_p256", falcon512_p256, der, PrivateKeyInfo), - ENCODER_w_structure("falcon512_p256", falcon512_p256, pem, PrivateKeyInfo), - ENCODER_w_structure("falcon512_p256", falcon512_p256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_p256", falcon512_p256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_p256", falcon512_p256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("falcon512_p256", falcon512_p256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("falcon512_p256", falcon512_p256), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, der, - PrivateKeyInfo), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, pem, - PrivateKeyInfo), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("falcon512_bp256", falcon512_bp256, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("falcon512_bp256", falcon512_bp256), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, der, - PrivateKeyInfo), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, pem, - PrivateKeyInfo), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("falcon512_ed25519", falcon512_ed25519, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("falcon512_ed25519", falcon512_ed25519), #endif #ifdef OQS_ENABLE_SIG_falcon_1024 ENCODER_w_structure("falcon1024", falcon1024, der, PrivateKeyInfo), diff --git a/oqsprov/oqsprov.c b/oqsprov/oqsprov.c index 672361d6..73da9e63 100644 --- a/oqsprov/oqsprov.c +++ b/oqsprov/oqsprov.c @@ -49,9 +49,9 @@ extern OSSL_FUNC_provider_get_capabilities_fn oqs_provider_get_capabilities; ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_START #ifdef OQS_KEM_ENCODERS -# define OQS_OID_CNT 198 +# define OQS_OID_CNT 192 #else -# define OQS_OID_CNT 92 +# define OQS_OID_CNT 86 #endif const char *oqs_oid_alg_list[OQS_OID_CNT] = { @@ -226,12 +226,6 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "p256_falcon512", "1.3.9999.3.8", "rsa3072_falcon512", - "2.16.840.1.114027.80.8.1.14", - "falcon512_p256", - "2.16.840.1.114027.80.8.1.15", - "falcon512_bp256", - "2.16.840.1.114027.80.8.1.16", - "falcon512_ed25519", "1.3.9999.3.9", "falcon1024", "1.3.9999.3.10", @@ -622,95 +616,80 @@ int oqs_patch_encodings(void) if (getenv("OQS_ENCODING_RSA3072_FALCON512_ALGNAME")) oqs_alg_encoding_list[59] = getenv("OQS_ENCODING_RSA3072_FALCON512_ALGNAME"); - if (getenv("OQS_ENCODING_FALCON512_P256")) - oqs_alg_encoding_list[60] = getenv("OQS_ENCODING_FALCON512_P256"); - if (getenv("OQS_ENCODING_FALCON512_P256_ALGNAME")) - oqs_alg_encoding_list[61] - = getenv("OQS_ENCODING_FALCON512_P256_ALGNAME"); - if (getenv("OQS_ENCODING_FALCON512_BP256")) - oqs_alg_encoding_list[62] = getenv("OQS_ENCODING_FALCON512_BP256"); - if (getenv("OQS_ENCODING_FALCON512_BP256_ALGNAME")) - oqs_alg_encoding_list[63] - = getenv("OQS_ENCODING_FALCON512_BP256_ALGNAME"); - if (getenv("OQS_ENCODING_FALCON512_ED25519")) - oqs_alg_encoding_list[64] = getenv("OQS_ENCODING_FALCON512_ED25519"); - if (getenv("OQS_ENCODING_FALCON512_ED25519_ALGNAME")) - oqs_alg_encoding_list[65] - = getenv("OQS_ENCODING_FALCON512_ED25519_ALGNAME"); if (getenv("OQS_ENCODING_FALCON1024")) - oqs_alg_encoding_list[66] = getenv("OQS_ENCODING_FALCON1024"); + oqs_alg_encoding_list[60] = getenv("OQS_ENCODING_FALCON1024"); if (getenv("OQS_ENCODING_FALCON1024_ALGNAME")) - oqs_alg_encoding_list[67] = getenv("OQS_ENCODING_FALCON1024_ALGNAME"); + oqs_alg_encoding_list[61] = getenv("OQS_ENCODING_FALCON1024_ALGNAME"); if (getenv("OQS_ENCODING_P521_FALCON1024")) - oqs_alg_encoding_list[68] = getenv("OQS_ENCODING_P521_FALCON1024"); + oqs_alg_encoding_list[62] = getenv("OQS_ENCODING_P521_FALCON1024"); if (getenv("OQS_ENCODING_P521_FALCON1024_ALGNAME")) - oqs_alg_encoding_list[69] + oqs_alg_encoding_list[63] = getenv("OQS_ENCODING_P521_FALCON1024_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[70] + oqs_alg_encoding_list[64] = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[71] + oqs_alg_encoding_list[65] = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[72] + oqs_alg_encoding_list[66] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[73] + oqs_alg_encoding_list[67] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[74] + oqs_alg_encoding_list[68] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[75] + oqs_alg_encoding_list[69] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[76] + oqs_alg_encoding_list[70] = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[77] + oqs_alg_encoding_list[71] = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[78] + oqs_alg_encoding_list[72] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[79] + oqs_alg_encoding_list[73] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[80] + oqs_alg_encoding_list[74] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[81] + oqs_alg_encoding_list[75] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE")) - oqs_alg_encoding_list[82] + oqs_alg_encoding_list[76] = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[83] + oqs_alg_encoding_list[77] = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE")) - oqs_alg_encoding_list[84] + oqs_alg_encoding_list[78] = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[85] + oqs_alg_encoding_list[79] = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[86] + oqs_alg_encoding_list[80] = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[87] + oqs_alg_encoding_list[81] = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[88] + oqs_alg_encoding_list[82] = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[89] + oqs_alg_encoding_list[83] = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[90] + oqs_alg_encoding_list[84] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[91] + oqs_alg_encoding_list[85] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME"); ///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_END return 1; @@ -799,9 +778,6 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = { SIGALG("falcon512", 128, oqs_signature_functions), SIGALG("p256_falcon512", 128, oqs_signature_functions), SIGALG("rsa3072_falcon512", 128, oqs_signature_functions), - SIGALG("falcon512_p256", 128, oqs_signature_functions), - SIGALG("falcon512_bp256", 256, oqs_signature_functions), - SIGALG("falcon512_ed25519", 128, oqs_signature_functions), #endif #ifdef OQS_ENABLE_SIG_falcon_1024 SIGALG("falcon1024", 256, oqs_signature_functions), @@ -973,9 +949,6 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] SIGALG("falcon512", 128, oqs_falcon512_keymgmt_functions), SIGALG("p256_falcon512", 128, oqs_p256_falcon512_keymgmt_functions), SIGALG("rsa3072_falcon512", 128, oqs_rsa3072_falcon512_keymgmt_functions), - SIGALG("falcon512_p256", 128, oqs_falcon512_p256_keymgmt_functions), - SIGALG("falcon512_bp256", 256, oqs_falcon512_bp256_keymgmt_functions), - SIGALG("falcon512_ed25519", 128, oqs_falcon512_ed25519_keymgmt_functions), #endif #ifdef OQS_ENABLE_SIG_falcon_1024 SIGALG("falcon1024", 256, oqs_falcon1024_keymgmt_functions), diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index d4df842b..27d1f8ff 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -54,9 +54,9 @@ static int oqsx_key_recreate_classickey(OQSX_KEY *key, oqsx_key_op_t op); ///// OQS_TEMPLATE_FRAGMENT_OQSNAMES_START #ifdef OQS_KEM_ENCODERS -# define NID_TABLE_LEN 99 +# define NID_TABLE_LEN 96 #else -# define NID_TABLE_LEN 46 +# define NID_TABLE_LEN 43 #endif static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { @@ -157,9 +157,6 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_SIG, 128}, {0, "p256_falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_HYB_SIG, 128}, {0, "rsa3072_falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_HYB_SIG, 128}, - {0, "falcon512_p256", OQS_SIG_alg_falcon_512, KEY_TYPE_CMP_SIG, 128}, - {0, "falcon512_bp256", OQS_SIG_alg_falcon_512, KEY_TYPE_CMP_SIG, 256}, - {0, "falcon512_ed25519", OQS_SIG_alg_falcon_512, KEY_TYPE_CMP_SIG, 128}, {0, "falcon1024", OQS_SIG_alg_falcon_1024, KEY_TYPE_SIG, 256}, {0, "p521_falcon1024", OQS_SIG_alg_falcon_1024, KEY_TYPE_HYB_SIG, 256}, {0, "sphincssha2128fsimple", OQS_SIG_alg_sphincs_sha2_128f_simple, diff --git a/scripts/common.py b/scripts/common.py index 7913d4b2..f5b122b7 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -20,7 +20,7 @@ # post-quantum + classical signatures 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p521_falcon1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple', # post-quantum + classical signatures (COMPOSITE) - 'mldsa44_pss2048','mldsa44_rsa2048','mldsa44_ed25519','mldsa44_p256','mldsa44_bp256','mldsa65_pss3072','mldsa65_rsa3072','mldsa65_p256','mldsa65_bp256','mldsa65_ed25519','mldsa87_p384','mldsa87_bp384','mldsa87_ed448','falcon512_p256','falcon512_bp256','falcon512_ed25519', + 'mldsa44_pss2048','mldsa44_rsa2048','mldsa44_ed25519','mldsa44_p256','mldsa44_bp256','mldsa65_pss3072','mldsa65_rsa3072','mldsa65_p256','mldsa65_bp256','mldsa65_ed25519','mldsa87_p384','mldsa87_bp384','mldsa87_ed448', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_END ]