diff --git a/ALGORITHMS.md b/ALGORITHMS.md index da839eef..bfb7a84d 100644 --- a/ALGORITHMS.md +++ b/ALGORITHMS.md @@ -117,6 +117,12 @@ As standardization for these algorithms within TLS is not done, all TLS code poi | p521_sphincsshake256fsimple | 0xfecd |No| OQS_CODEPOINT_P521_SPHINCSSHAKE256FSIMPLE | sphincsshake256ssimple | 0xfece |No| OQS_CODEPOINT_SPHINCSSHAKE256SSIMPLE | p521_sphincsshake256ssimple | 0xfecf |No| OQS_CODEPOINT_P521_SPHINCSSHAKE256SSIMPLE +| mayo_1 | 0xfeee |Yes| OQS_CODEPOINT_MAYO_1 +| p256_mayo_1 | 0xfef1 |Yes| OQS_CODEPOINT_P256_MAYO_1 +| mayo_2 | 0xfeef |Yes| OQS_CODEPOINT_MAYO_2 +| p256_mayo_2 | 0xfef2 |Yes| OQS_CODEPOINT_P256_MAYO_2 +| mayo_3 | 0xfef0 |Yes| OQS_CODEPOINT_MAYO_3 +| p384_mayo_3 | 0xfef3 |Yes| OQS_CODEPOINT_P384_MAYO_3 Changing code points @@ -207,6 +213,12 @@ adapting the OIDs of all supported signature algorithms as per the table below. | p521_sphincsshake256fsimple | 1.3.9999.6.9.11 |No| OQS_OID_P521_SPHINCSSHAKE256FSIMPLE | sphincsshake256ssimple | 1.3.9999.6.9.12 |No| OQS_OID_SPHINCSSHAKE256SSIMPLE | p521_sphincsshake256ssimple | 1.3.9999.6.9.13 |No| OQS_OID_P521_SPHINCSSHAKE256SSIMPLE +| mayo_1 | 1.3.9999.8.1.1 |Yes| OQS_OID_MAYO_1 +| p256_mayo_1 | 1.3.9999.8.1.2 |Yes| OQS_OID_P256_MAYO_1 +| mayo_2 | 1.3.9999.8.2.1 |Yes| OQS_OID_MAYO_2 +| p256_mayo_2 | 1.3.9999.8.2.2 |Yes| OQS_OID_P256_MAYO_2 +| mayo_3 | 1.3.9999.8.3.1 |Yes| OQS_OID_MAYO_3 +| p384_mayo_3 | 1.3.9999.8.3.2 |Yes| OQS_OID_P384_MAYO_3 If [OQS_KEM_ENCODERS](CONFIGURE.md#OQS_KEM_ENCODERS) is enabled the following list is also available: diff --git a/README.md b/README.md index 9f58f618..e178da1a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ This implementation makes available the following quantum safe algorithms: - **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` +- **MAYO**:`mayo_1`\*, `p256_mayo_1`\*, `mayo_2`\*, `p256_mayo_2`\*, `mayo_3`\*, `p384_mayo_3`\* diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index a0b9e230..5cc74df9 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -399,7 +399,7 @@ kem_nid_end: '0x0250' kem_nid_hybrid_end: '0x2FFF' # need to edit ssl_local.h macros IS_OQS_KEM_CURVEID and IS_OQS_KEM_HYBRID_CURVEID with the above _end values -# Next free signature ID: 0xfeee +# Next free signature ID: 0xfef4 sigs: # - # iso (1) @@ -1469,5 +1469,39 @@ sigs: 'pretty_name': 'ECDSA p521', 'oid': '1.3.9999.6.9.8', 'code_point': '0xfe95'}] - - + - + family: 'MAYO' + variants: + - + name: 'mayo_1' + pretty_name: 'MAYO_1' + oqs_meth: 'OQS_SIG_alg_mayo_1' + oid: '1.3.9999.8.1.1' + code_point: '0xfeee' + enable: true + mix_with: [{'name': 'p256', + 'pretty_name': 'ECDSA p256', + 'oid': '1.3.9999.8.1.2', + 'code_point': '0xfef1'}] + - + name: 'mayo_2' + pretty_name: 'MAYO_2' + oqs_meth: 'OQS_SIG_alg_mayo_2' + oid: '1.3.9999.8.2.1' + code_point: '0xfeef' + enable: true + mix_with: [{'name': 'p256', + 'pretty_name': 'ECDSA p256', + 'oid': '1.3.9999.8.2.2', + 'code_point': '0xfef2'}] + - + name: 'mayo_3' + pretty_name: 'MAYO_3' + oqs_meth: 'OQS_SIG_alg_mayo_3' + oid: '1.3.9999.8.3.1' + code_point: '0xfef0' + enable: true + mix_with: [{'name': 'p384', + 'pretty_name': 'ECDSA p384', + 'oid': '1.3.9999.8.3.2', + 'code_point': '0xfef3'}] diff --git a/oqs-template/oqs-sig-info.md b/oqs-template/oqs-sig-info.md index e61a9824..04c56512 100644 --- a/oqs-template/oqs-sig-info.md +++ b/oqs-template/oqs-sig-info.md @@ -34,6 +34,12 @@ | falcon1024 **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe0f | 1.3.9999.3.5 | | falconpadded1024 | 20211101 | 3 | 5 | 0xfedf | 1.3.9999.3.19 | | falconpadded1024 **hybrid with** p521 | 20211101 | 3 | 5 | 0xfee0 | 1.3.9999.3.20 | +| mayo_1 | https://eprint.iacr.org/2023/1683 | 1 | 1 | 0xfeee | 1.3.9999.8.1.1 | +| mayo_1 **hybrid with** p256 | https://eprint.iacr.org/2023/1683 | 1 | 1 | 0xfef1 | 1.3.9999.8.1.2 | +| mayo_2 | https://eprint.iacr.org/2023/1683 | 1 | 1 | 0xfeef | 1.3.9999.8.2.1 | +| mayo_2 **hybrid with** p256 | https://eprint.iacr.org/2023/1683 | 1 | 1 | 0xfef2 | 1.3.9999.8.2.2 | +| mayo_3 | https://eprint.iacr.org/2023/1683 | 1 | 3 | 0xfef0 | 1.3.9999.8.3.1 | +| mayo_3 **hybrid with** p384 | https://eprint.iacr.org/2023/1683 | 1 | 3 | 0xfef3 | 1.3.9999.8.3.2 | | mldsa44 | ML-DSA-ipd | ipd | 1 | 0xfed0 | 1.3.6.1.4.1.2.267.12.4.4 | | mldsa44 **hybrid with** p256 | ML-DSA-ipd | ipd | 1 | 0xfed3 | 1.3.9999.7.1 | | mldsa44 **hybrid with** rsa3072 | ML-DSA-ipd | ipd | 1 | 0xfed4 | 1.3.9999.7.2 | diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index 99093ffa..a1de9df8 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -816,4 +816,16 @@ MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, oqsx, PrivateKeyInfo); MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mayo_1", mayo_1, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mayo_1", mayo_1, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p256_mayo_1", p256_mayo_1, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p256_mayo_1", p256_mayo_1, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mayo_2", mayo_2, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mayo_2", mayo_2, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p256_mayo_2", p256_mayo_2, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p256_mayo_2", p256_mayo_2, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mayo_3", mayo_3, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mayo_3", mayo_3, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p384_mayo_3", p384_mayo_3, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p384_mayo_3", p384_mayo_3, oqsx, SubjectPublicKeyInfo); ///// OQS_TEMPLATE_FRAGMENT_DECODER_MAKE_END diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index b06e6138..32243051 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -1271,6 +1271,24 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define rsa3072_sphincsshake128fsimple_input_type \ "rsa3072_sphincsshake128fsimple" #define rsa3072_sphincsshake128fsimple_pem_type "rsa3072_sphincsshake128fsimple" +#define mayo_1_evp_type 0 +#define mayo_1_input_type "mayo_1" +#define mayo_1_pem_type "mayo_1" +#define p256_mayo_1_evp_type 0 +#define p256_mayo_1_input_type "p256_mayo_1" +#define p256_mayo_1_pem_type "p256_mayo_1" +#define mayo_2_evp_type 0 +#define mayo_2_input_type "mayo_2" +#define mayo_2_pem_type "mayo_2" +#define p256_mayo_2_evp_type 0 +#define p256_mayo_2_input_type "p256_mayo_2" +#define p256_mayo_2_pem_type "p256_mayo_2" +#define mayo_3_evp_type 0 +#define mayo_3_input_type "mayo_3" +#define mayo_3_pem_type "mayo_3" +#define p384_mayo_3_evp_type 0 +#define p384_mayo_3_input_type "p384_mayo_3" +#define p384_mayo_3_pem_type "p384_mayo_3" ///// OQS_TEMPLATE_FRAGMENT_ENCODER_DEFINES_END /* ---------------------------------------------------------------------- */ @@ -2650,4 +2668,46 @@ MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, rsa3072_sphincsshake128fsimple); +MAKE_ENCODER(, mayo_1, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mayo_1, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_1, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mayo_1, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_1, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mayo_1, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mayo_1); +MAKE_ENCODER(, p256_mayo_1, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p256_mayo_1, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mayo_1, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p256_mayo_1, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mayo_1, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p256_mayo_1, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p256_mayo_1); +MAKE_ENCODER(, mayo_2, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mayo_2, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_2, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mayo_2, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_2, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mayo_2, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mayo_2); +MAKE_ENCODER(, p256_mayo_2, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p256_mayo_2, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mayo_2, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p256_mayo_2, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mayo_2, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p256_mayo_2, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p256_mayo_2); +MAKE_ENCODER(, mayo_3, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mayo_3, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_3, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mayo_3, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mayo_3, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mayo_3, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mayo_3); +MAKE_ENCODER(, p384_mayo_3, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p384_mayo_3, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p384_mayo_3, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p384_mayo_3, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p384_mayo_3, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p384_mayo_3, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p384_mayo_3); ///// OQS_TEMPLATE_FRAGMENT_ENCODER_MAKE_END diff --git a/oqsprov/oqs_kmgmt.c b/oqsprov/oqs_kmgmt.c index 50ad3012..bd40bfba 100644 --- a/oqsprov/oqs_kmgmt.c +++ b/oqsprov/oqs_kmgmt.c @@ -1254,6 +1254,73 @@ static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 47); } +static void *mayo_1_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_1, + "mayo_1", KEY_TYPE_SIG, NULL, 128, 48); +} + +static void *mayo_1_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_1, "mayo_1", 0, + 128, 48); +} +static void *p256_mayo_1_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_1, + "p256_mayo_1", KEY_TYPE_HYB_SIG, NULL, 128, 49); +} + +static void *p256_mayo_1_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_1, "p256_mayo_1", + KEY_TYPE_HYB_SIG, 128, 49); +} +static void *mayo_2_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_2, + "mayo_2", KEY_TYPE_SIG, NULL, 128, 50); +} + +static void *mayo_2_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_2, "mayo_2", 0, + 128, 50); +} +static void *p256_mayo_2_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_2, + "p256_mayo_2", KEY_TYPE_HYB_SIG, NULL, 128, 51); +} + +static void *p256_mayo_2_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_2, "p256_mayo_2", + KEY_TYPE_HYB_SIG, 128, 51); +} +static void *mayo_3_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_3, + "mayo_3", KEY_TYPE_SIG, NULL, 192, 52); +} + +static void *mayo_3_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_3, "mayo_3", 0, + 192, 52); +} +static void *p384_mayo_3_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_3, + "p384_mayo_3", KEY_TYPE_HYB_SIG, NULL, 192, 53); +} + +static void *p384_mayo_3_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_3, "p384_mayo_3", + KEY_TYPE_HYB_SIG, 192, 53); +} + ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END #define MAKE_SIG_KEYMGMT_FUNCTIONS(alg) \ @@ -1451,6 +1518,12 @@ MAKE_SIG_KEYMGMT_FUNCTIONS(p384_sphincssha2192fsimple) MAKE_SIG_KEYMGMT_FUNCTIONS(sphincsshake128fsimple) MAKE_SIG_KEYMGMT_FUNCTIONS(p256_sphincsshake128fsimple) MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_sphincsshake128fsimple) +MAKE_SIG_KEYMGMT_FUNCTIONS(mayo_1) +MAKE_SIG_KEYMGMT_FUNCTIONS(p256_mayo_1) +MAKE_SIG_KEYMGMT_FUNCTIONS(mayo_2) +MAKE_SIG_KEYMGMT_FUNCTIONS(p256_mayo_2) +MAKE_SIG_KEYMGMT_FUNCTIONS(mayo_3) +MAKE_SIG_KEYMGMT_FUNCTIONS(p384_mayo_3) MAKE_KEM_KEYMGMT_FUNCTIONS(frodo640aes, OQS_KEM_alg_frodokem_640_aes, 128) diff --git a/oqsprov/oqs_prov.h b/oqsprov/oqs_prov.h index 2a08b0b8..aae2d444 100644 --- a/oqsprov/oqs_prov.h +++ b/oqsprov/oqs_prov.h @@ -2039,6 +2039,99 @@ extern const OSSL_DISPATCH extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_rsa3072_sphincsshake128fsimple_decoder_functions []; +extern const OSSL_DISPATCH oqs_mayo_1_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_1_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_1_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_1_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_1_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_1_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_1_to_text_encoder_functions[]; +extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_mayo_1_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mayo_1_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_1_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p256_mayo_1_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p256_mayo_1_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p256_mayo_1_decoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_2_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_2_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_2_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_2_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_2_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_2_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_2_to_text_encoder_functions[]; +extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_mayo_2_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mayo_2_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mayo_2_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p256_mayo_2_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p256_mayo_2_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p256_mayo_2_decoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_3_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_3_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_3_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_3_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_3_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mayo_3_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mayo_3_to_text_encoder_functions[]; +extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_mayo_3_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mayo_3_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mayo_3_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p384_mayo_3_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p384_mayo_3_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p384_mayo_3_decoder_functions[]; ///// OQS_TEMPLATE_FRAGMENT_ENDECODER_FUNCTIONS_END ///// OQS_TEMPLATE_FRAGMENT_ALG_FUNCTIONS_START @@ -2093,6 +2186,12 @@ extern const OSSL_DISPATCH oqs_sphincsshake128fsimple_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p256_sphincsshake128fsimple_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_rsa3072_sphincsshake128fsimple_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mayo_1_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p256_mayo_1_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mayo_2_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p256_mayo_2_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mayo_3_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p384_mayo_3_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_frodo640aes_keymgmt_functions[]; diff --git a/oqsprov/oqsdecoders.inc b/oqsprov/oqsdecoders.inc index f9d9fc4d..ea29d31e 100644 --- a/oqsprov/oqsdecoders.inc +++ b/oqsprov/oqsdecoders.inc @@ -418,5 +418,23 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), rsa3072_sphincsshake128fsimple), DECODER_w_structure("rsa3072_sphincsshake128fsimple", der, SubjectPublicKeyInfo, rsa3072_sphincsshake128fsimple), +#endif +#ifdef OQS_ENABLE_SIG_mayo_1 + DECODER_w_structure("mayo_1", der, PrivateKeyInfo, mayo_1), + DECODER_w_structure("mayo_1", der, SubjectPublicKeyInfo, mayo_1), + DECODER_w_structure("p256_mayo_1", der, PrivateKeyInfo, p256_mayo_1), + DECODER_w_structure("p256_mayo_1", der, SubjectPublicKeyInfo, p256_mayo_1), +#endif +#ifdef OQS_ENABLE_SIG_mayo_2 + DECODER_w_structure("mayo_2", der, PrivateKeyInfo, mayo_2), + DECODER_w_structure("mayo_2", der, SubjectPublicKeyInfo, mayo_2), + DECODER_w_structure("p256_mayo_2", der, PrivateKeyInfo, p256_mayo_2), + DECODER_w_structure("p256_mayo_2", der, SubjectPublicKeyInfo, p256_mayo_2), +#endif +#ifdef OQS_ENABLE_SIG_mayo_3 + DECODER_w_structure("mayo_3", der, PrivateKeyInfo, mayo_3), + DECODER_w_structure("mayo_3", der, SubjectPublicKeyInfo, mayo_3), + DECODER_w_structure("p384_mayo_3", der, PrivateKeyInfo, p384_mayo_3), + DECODER_w_structure("p384_mayo_3", der, SubjectPublicKeyInfo, p384_mayo_3), #endif ///// OQS_TEMPLATE_FRAGMENT_MAKE_END diff --git a/oqsprov/oqsencoders.inc b/oqsprov/oqsencoders.inc index 34537f51..3cfe3e52 100644 --- a/oqsprov/oqsencoders.inc +++ b/oqsprov/oqsencoders.inc @@ -1267,5 +1267,59 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), SubjectPublicKeyInfo), ENCODER_TEXT("rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple), +#endif +#ifdef OQS_ENABLE_SIG_mayo_1 + ENCODER_w_structure("mayo_1", mayo_1, der, PrivateKeyInfo), + ENCODER_w_structure("mayo_1", mayo_1, pem, PrivateKeyInfo), + ENCODER_w_structure("mayo_1", mayo_1, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_1", mayo_1, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_1", mayo_1, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mayo_1", mayo_1, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mayo_1", mayo_1), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, der, PrivateKeyInfo), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, pem, PrivateKeyInfo), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, der, SubjectPublicKeyInfo), + ENCODER_w_structure("p256_mayo_1", p256_mayo_1, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("p256_mayo_1", p256_mayo_1), +#endif +#ifdef OQS_ENABLE_SIG_mayo_2 + ENCODER_w_structure("mayo_2", mayo_2, der, PrivateKeyInfo), + ENCODER_w_structure("mayo_2", mayo_2, pem, PrivateKeyInfo), + ENCODER_w_structure("mayo_2", mayo_2, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_2", mayo_2, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_2", mayo_2, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mayo_2", mayo_2, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mayo_2", mayo_2), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, der, PrivateKeyInfo), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, pem, PrivateKeyInfo), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, der, SubjectPublicKeyInfo), + ENCODER_w_structure("p256_mayo_2", p256_mayo_2, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("p256_mayo_2", p256_mayo_2), +#endif +#ifdef OQS_ENABLE_SIG_mayo_3 + ENCODER_w_structure("mayo_3", mayo_3, der, PrivateKeyInfo), + ENCODER_w_structure("mayo_3", mayo_3, pem, PrivateKeyInfo), + ENCODER_w_structure("mayo_3", mayo_3, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_3", mayo_3, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mayo_3", mayo_3, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mayo_3", mayo_3, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mayo_3", mayo_3), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, der, PrivateKeyInfo), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, pem, PrivateKeyInfo), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, der, SubjectPublicKeyInfo), + ENCODER_w_structure("p384_mayo_3", p384_mayo_3, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("p384_mayo_3", p384_mayo_3), #endif ///// OQS_TEMPLATE_FRAGMENT_MAKE_END diff --git a/oqsprov/oqsprov.c b/oqsprov/oqsprov.c index 17ee3d5e..bdff6c00 100644 --- a/oqsprov/oqsprov.c +++ b/oqsprov/oqsprov.c @@ -50,9 +50,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 202 +# define OQS_OID_CNT 214 #else -# define OQS_OID_CNT 96 +# define OQS_OID_CNT 108 #endif const char *oqs_oid_alg_list[OQS_OID_CNT] = { @@ -263,6 +263,18 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "p256_sphincsshake128fsimple", "1.3.9999.6.7.15", "rsa3072_sphincsshake128fsimple", + "1.3.9999.8.1.1", + "mayo_1", + "1.3.9999.8.1.2", + "p256_mayo_1", + "1.3.9999.8.2.1", + "mayo_2", + "1.3.9999.8.2.2", + "p256_mayo_2", + "1.3.9999.8.3.1", + "mayo_3", + "1.3.9999.8.3.2", + "p384_mayo_3", ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_END }; @@ -473,6 +485,18 @@ int oqs_patch_oids(void) oqs_oid_alg_list[66 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE"))) oqs_oid_alg_list[68 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_MAYO_1"))) + oqs_oid_alg_list[70 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_P256_MAYO_1"))) + oqs_oid_alg_list[72 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_MAYO_2"))) + oqs_oid_alg_list[74 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_P256_MAYO_2"))) + oqs_oid_alg_list[76 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_MAYO_3"))) + oqs_oid_alg_list[78 + OQS_KEMOID_CNT] = envval; + if ((envval = getenv("OQS_OID_P384_MAYO_3"))) + oqs_oid_alg_list[80 + OQS_KEMOID_CNT] = envval; } ///// OQS_TEMPLATE_FRAGMENT_OID_PATCHING_END return 1; } @@ -697,6 +721,30 @@ int oqs_patch_encodings(void) if ((envval = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME"))) oqs_alg_encoding_list[95] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_1"))) + oqs_alg_encoding_list[96] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_1_ALGNAME"))) + oqs_alg_encoding_list[97] = envval; + if ((envval = getenv("OQS_ENCODING_P256_MAYO_1"))) + oqs_alg_encoding_list[98] = envval; + if ((envval = getenv("OQS_ENCODING_P256_MAYO_1_ALGNAME"))) + oqs_alg_encoding_list[99] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_2"))) + oqs_alg_encoding_list[100] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_2_ALGNAME"))) + oqs_alg_encoding_list[101] = envval; + if ((envval = getenv("OQS_ENCODING_P256_MAYO_2"))) + oqs_alg_encoding_list[102] = envval; + if ((envval = getenv("OQS_ENCODING_P256_MAYO_2_ALGNAME"))) + oqs_alg_encoding_list[103] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_3"))) + oqs_alg_encoding_list[104] = envval; + if ((envval = getenv("OQS_ENCODING_MAYO_3_ALGNAME"))) + oqs_alg_encoding_list[105] = envval; + if ((envval = getenv("OQS_ENCODING_P384_MAYO_3"))) + oqs_alg_encoding_list[106] = envval; + if ((envval = getenv("OQS_ENCODING_P384_MAYO_3_ALGNAME"))) + oqs_alg_encoding_list[107] = envval; } ///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_END return 1; @@ -817,6 +865,18 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = { SIGALG("sphincsshake128fsimple", 128, oqs_signature_functions), SIGALG("p256_sphincsshake128fsimple", 128, oqs_signature_functions), SIGALG("rsa3072_sphincsshake128fsimple", 128, oqs_signature_functions), +#endif +#ifdef OQS_ENABLE_SIG_mayo_1 + SIGALG("mayo_1", 128, oqs_signature_functions), + SIGALG("p256_mayo_1", 128, oqs_signature_functions), +#endif +#ifdef OQS_ENABLE_SIG_mayo_2 + SIGALG("mayo_2", 128, oqs_signature_functions), + SIGALG("p256_mayo_2", 128, oqs_signature_functions), +#endif +#ifdef OQS_ENABLE_SIG_mayo_3 + SIGALG("mayo_3", 192, oqs_signature_functions), + SIGALG("p384_mayo_3", 192, oqs_signature_functions), #endif ///// OQS_TEMPLATE_FRAGMENT_SIG_FUNCTIONS_END {NULL, NULL, NULL}}; @@ -917,8 +977,7 @@ static const OSSL_ALGORITHM oqsprovider_asym_kems[] = { ///// OQS_TEMPLATE_FRAGMENT_KEM_FUNCTIONS_END {NULL, NULL, NULL}}; -static const OSSL_ALGORITHM oqsprovider_keymgmt[] - = { +static const OSSL_ALGORITHM oqsprovider_keymgmt[] = { ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_START // clang-format off @@ -998,6 +1057,18 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] SIGALG("p256_sphincsshake128fsimple", 128, oqs_p256_sphincsshake128fsimple_keymgmt_functions), SIGALG("rsa3072_sphincsshake128fsimple", 128, oqs_rsa3072_sphincsshake128fsimple_keymgmt_functions), #endif +#ifdef OQS_ENABLE_SIG_mayo_1 + SIGALG("mayo_1", 128, oqs_mayo_1_keymgmt_functions), + SIGALG("p256_mayo_1", 128, oqs_p256_mayo_1_keymgmt_functions), +#endif +#ifdef OQS_ENABLE_SIG_mayo_2 + SIGALG("mayo_2", 128, oqs_mayo_2_keymgmt_functions), + SIGALG("p256_mayo_2", 128, oqs_p256_mayo_2_keymgmt_functions), +#endif +#ifdef OQS_ENABLE_SIG_mayo_3 + SIGALG("mayo_3", 192, oqs_mayo_3_keymgmt_functions), + SIGALG("p384_mayo_3", 192, oqs_p384_mayo_3_keymgmt_functions), +#endif #ifdef OQS_ENABLE_KEM_frodokem_640_aes KEMKMALG(frodo640aes, 128) @@ -1106,9 +1177,9 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] KEMKMHYBALG(p521_hqc256, 256, ecp) #endif - // clang-format on - ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_END - {NULL, NULL, NULL}}; + // clang-format on + ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_END + {NULL, NULL, NULL}}; static const OSSL_ALGORITHM oqsprovider_encoder[] = { #define ENCODER_PROVIDER "oqsprovider" diff --git a/oqsprov/oqsprov_capabilities.c b/oqsprov/oqsprov_capabilities.c index 551f7598..035dfe1e 100644 --- a/oqsprov/oqsprov_capabilities.c +++ b/oqsprov/oqsprov_capabilities.c @@ -289,6 +289,9 @@ static OQS_SIGALG_CONSTANTS oqs_sigalg_list[] = { {0xfeb8, 128, TLS1_3_VERSION, 0}, {0xfeb9, 192, TLS1_3_VERSION, 0}, {0xfeba, 192, TLS1_3_VERSION, 0}, {0xfec2, 128, TLS1_3_VERSION, 0}, {0xfec3, 128, TLS1_3_VERSION, 0}, {0xfec4, 128, TLS1_3_VERSION, 0}, + {0xfeee, 128, TLS1_3_VERSION, 0}, {0xfef1, 128, TLS1_3_VERSION, 0}, + {0xfeef, 128, TLS1_3_VERSION, 0}, {0xfef2, 128, TLS1_3_VERSION, 0}, + {0xfef0, 192, TLS1_3_VERSION, 0}, {0xfef3, 192, TLS1_3_VERSION, 0}, ///// OQS_TEMPLATE_FRAGMENT_SIGALG_ASSIGNMENTS_END }; @@ -575,6 +578,21 @@ int oqs_patch_codepoints() if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")) oqs_sigalg_list[47].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")); + if (getenv("OQS_CODEPOINT_MAYO_1")) + oqs_sigalg_list[48].code_point = atoi(getenv("OQS_CODEPOINT_MAYO_1")); + if (getenv("OQS_CODEPOINT_P256_MAYO_1")) + oqs_sigalg_list[49].code_point + = atoi(getenv("OQS_CODEPOINT_P256_MAYO_1")); + if (getenv("OQS_CODEPOINT_MAYO_2")) + oqs_sigalg_list[50].code_point = atoi(getenv("OQS_CODEPOINT_MAYO_2")); + if (getenv("OQS_CODEPOINT_P256_MAYO_2")) + oqs_sigalg_list[51].code_point + = atoi(getenv("OQS_CODEPOINT_P256_MAYO_2")); + if (getenv("OQS_CODEPOINT_MAYO_3")) + oqs_sigalg_list[52].code_point = atoi(getenv("OQS_CODEPOINT_MAYO_3")); + if (getenv("OQS_CODEPOINT_P384_MAYO_3")) + oqs_sigalg_list[53].code_point + = atoi(getenv("OQS_CODEPOINT_P384_MAYO_3")); ///// OQS_TEMPLATE_FRAGMENT_CODEPOINT_PATCHING_END return 1; } @@ -736,6 +754,21 @@ static const OSSL_PARAM oqs_param_sigalg_list[][12] = { OQS_SIGALG_ENTRY(rsa3072_sphincsshake128fsimple, rsa3072_sphincsshake128fsimple, rsa3072_sphincsshake128fsimple, "1.3.9999.6.7.15", 47), +# endif +# ifdef OQS_ENABLE_SIG_mayo_1 + OQS_SIGALG_ENTRY(mayo_1, mayo_1, mayo_1, "1.3.9999.8.1.1", 48), + OQS_SIGALG_ENTRY(p256_mayo_1, p256_mayo_1, p256_mayo_1, "1.3.9999.8.1.2", + 49), +# endif +# ifdef OQS_ENABLE_SIG_mayo_2 + OQS_SIGALG_ENTRY(mayo_2, mayo_2, mayo_2, "1.3.9999.8.2.1", 50), + OQS_SIGALG_ENTRY(p256_mayo_2, p256_mayo_2, p256_mayo_2, "1.3.9999.8.2.2", + 51), +# endif +# ifdef OQS_ENABLE_SIG_mayo_3 + OQS_SIGALG_ENTRY(mayo_3, mayo_3, mayo_3, "1.3.9999.8.3.1", 52), + OQS_SIGALG_ENTRY(p384_mayo_3, p384_mayo_3, p384_mayo_3, "1.3.9999.8.3.2", + 53), # endif ///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_END }; diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index c20b3892..0c2374a8 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -55,9 +55,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 101 +# define NID_TABLE_LEN 107 #else -# define NID_TABLE_LEN 48 +# define NID_TABLE_LEN 54 #endif static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { @@ -190,6 +190,12 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { KEY_TYPE_HYB_SIG, 128}, {0, "rsa3072_sphincsshake128fsimple", OQS_SIG_alg_sphincs_shake_128f_simple, KEY_TYPE_HYB_SIG, 128}, + {0, "mayo_1", OQS_SIG_alg_mayo_1, KEY_TYPE_SIG, 128}, + {0, "p256_mayo_1", OQS_SIG_alg_mayo_1, KEY_TYPE_HYB_SIG, 128}, + {0, "mayo_2", OQS_SIG_alg_mayo_2, KEY_TYPE_SIG, 128}, + {0, "p256_mayo_2", OQS_SIG_alg_mayo_2, KEY_TYPE_HYB_SIG, 128}, + {0, "mayo_3", OQS_SIG_alg_mayo_3, KEY_TYPE_SIG, 192}, + {0, "p384_mayo_3", OQS_SIG_alg_mayo_3, KEY_TYPE_HYB_SIG, 192}, ///// OQS_TEMPLATE_FRAGMENT_OQSNAMES_END }; diff --git a/scripts/common.py b/scripts/common.py index 98716939..c2b2065b 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -16,9 +16,9 @@ 'ecdsap256', 'rsa3072', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_START # post-quantum signatures - 'dilithium2','dilithium3','dilithium5','mldsa44','mldsa65','mldsa87','falcon512','falconpadded512','falcon1024','falconpadded1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple', + 'dilithium2','dilithium3','dilithium5','mldsa44','mldsa65','mldsa87','falcon512','falconpadded512','falcon1024','falconpadded1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple','mayo_1','mayo_2','mayo_3', # post-quantum + classical signatures - 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p256_falconpadded512','rsa3072_falconpadded512','p521_falcon1024','p521_falconpadded1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple', + 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p256_falconpadded512','rsa3072_falconpadded512','p521_falcon1024','p521_falconpadded1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple','p256_mayo_1','p256_mayo_2','p384_mayo_3', # 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', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_END diff --git a/test/oqs_test_evp_pkey_params.c b/test/oqs_test_evp_pkey_params.c index f3f2ed0f..bc5ac6e8 100644 --- a/test/oqs_test_evp_pkey_params.c +++ b/test/oqs_test_evp_pkey_params.c @@ -40,6 +40,9 @@ const char *kHybridSignatureAlgorithms[] = { "p384_sphincssha2192fsimple", "p256_sphincsshake128fsimple", "rsa3072_sphincsshake128fsimple", + "p256_mayo_1", + "p256_mayo_2", + "p384_mayo_3", NULL, }; ///// OQS_TEMPLATE_FRAGMENT_HYBRID_SIG_ALGS_END