Skip to content

Commit

Permalink
Adding mayo5
Browse files Browse the repository at this point in the history
Signed-off-by: Basil Hess <[email protected]>
  • Loading branch information
bhess committed Jul 16, 2024
1 parent 3002ff5 commit 79aa5af
Show file tree
Hide file tree
Showing 16 changed files with 336 additions and 179 deletions.
10 changes: 7 additions & 3 deletions ALGORITHMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ As standardization for these algorithms within TLS is not done, all TLS code poi
| sphincsshake256ssimple | 0xfece |No| OQS_CODEPOINT_SPHINCSSHAKE256SSIMPLE
| p521_sphincsshake256ssimple | 0xfecf |No| OQS_CODEPOINT_P521_SPHINCSSHAKE256SSIMPLE
| mayo1 | 0xfeee |Yes| OQS_CODEPOINT_MAYO1
| p256_mayo1 | 0xfef1 |Yes| OQS_CODEPOINT_P256_MAYO1
| p256_mayo1 | 0xfef2 |Yes| OQS_CODEPOINT_P256_MAYO1
| mayo2 | 0xfeef |Yes| OQS_CODEPOINT_MAYO2
| p256_mayo2 | 0xfef2 |Yes| OQS_CODEPOINT_P256_MAYO2
| p256_mayo2 | 0xfef3 |Yes| OQS_CODEPOINT_P256_MAYO2
| mayo3 | 0xfef0 |Yes| OQS_CODEPOINT_MAYO3
| p384_mayo3 | 0xfef3 |Yes| OQS_CODEPOINT_P384_MAYO3
| p384_mayo3 | 0xfef4 |Yes| OQS_CODEPOINT_P384_MAYO3
| mayo5 | 0xfef1 |Yes| OQS_CODEPOINT_MAYO5
| p521_mayo5 | 0xfef5 |Yes| OQS_CODEPOINT_P521_MAYO5
<!--- OQS_TEMPLATE_FRAGMENT_IDS_END -->

Changing code points
Expand Down Expand Up @@ -219,6 +221,8 @@ adapting the OIDs of all supported signature algorithms as per the table below.
| p256_mayo2 | 1.3.9999.8.2.2 |Yes| OQS_OID_P256_MAYO2
| mayo3 | 1.3.9999.8.3.1 |Yes| OQS_OID_MAYO3
| p384_mayo3 | 1.3.9999.8.3.2 |Yes| OQS_OID_P384_MAYO3
| mayo5 | 1.3.9999.8.5.1 |Yes| OQS_OID_MAYO5
| p521_mayo5 | 1.3.9999.8.5.2 |Yes| OQS_OID_P521_MAYO5

If [OQS_KEM_ENCODERS](CONFIGURE.md#OQS_KEM_ENCODERS) is enabled the following list is also available:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +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**:`mayo1`\*, `p256_mayo1`\*, `mayo2`\*, `p256_mayo2`\*, `mayo3`\*, `p384_mayo3`\*
- **MAYO**:`mayo1`\*, `p256_mayo1`\*, `mayo2`\*, `p256_mayo2`\*, `mayo3`\*, `p384_mayo3`\*, `mayo5`\*, `p521_mayo5`\*

<!--- OQS_TEMPLATE_FRAGMENT_ALGS_END -->

Expand Down
19 changes: 15 additions & 4 deletions oqs-template/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 0xfef4
# Next free signature ID: 0xfef6
sigs:
# -
# iso (1)
Expand Down Expand Up @@ -1482,7 +1482,7 @@ sigs:
mix_with: [{'name': 'p256',
'pretty_name': 'ECDSA p256',
'oid': '1.3.9999.8.1.2',
'code_point': '0xfef1'}]
'code_point': '0xfef2'}]
-
name: 'mayo2'
pretty_name: 'MAYO-2'
Expand All @@ -1493,7 +1493,7 @@ sigs:
mix_with: [{'name': 'p256',
'pretty_name': 'ECDSA p256',
'oid': '1.3.9999.8.2.2',
'code_point': '0xfef2'}]
'code_point': '0xfef3'}]
-
name: 'mayo3'
pretty_name: 'MAYO-3'
Expand All @@ -1504,4 +1504,15 @@ sigs:
mix_with: [{'name': 'p384',
'pretty_name': 'ECDSA p384',
'oid': '1.3.9999.8.3.2',
'code_point': '0xfef3'}]
'code_point': '0xfef4'}]
-
name: 'mayo5'
pretty_name: 'MAYO-5'
oqs_meth: 'OQS_SIG_alg_mayo_5'
oid: '1.3.9999.8.5.1'
code_point: '0xfef1'
enable: true
mix_with: [{'name': 'p521',
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.8.5.2',
'code_point': '0xfef5'}]
324 changes: 163 additions & 161 deletions oqs-template/oqs-sig-info.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions oqsprov/oqs_decode_der2key.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,4 +828,8 @@ MAKE_DECODER(, "mayo3", mayo3, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "mayo3", mayo3, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "p384_mayo3", p384_mayo3, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "p384_mayo3", p384_mayo3, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "mayo5", mayo5, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "mayo5", mayo5, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "p521_mayo5", p521_mayo5, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "p521_mayo5", p521_mayo5, oqsx, SubjectPublicKeyInfo);
///// OQS_TEMPLATE_FRAGMENT_DECODER_MAKE_END
20 changes: 20 additions & 0 deletions oqsprov/oqs_encode_key2any.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,12 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder)
#define p384_mayo3_evp_type 0
#define p384_mayo3_input_type "p384_mayo3"
#define p384_mayo3_pem_type "p384_mayo3"
#define mayo5_evp_type 0
#define mayo5_input_type "mayo5"
#define mayo5_pem_type "mayo5"
#define p521_mayo5_evp_type 0
#define p521_mayo5_input_type "p521_mayo5"
#define p521_mayo5_pem_type "p521_mayo5"
///// OQS_TEMPLATE_FRAGMENT_ENCODER_DEFINES_END

/* ---------------------------------------------------------------------- */
Expand Down Expand Up @@ -2736,4 +2742,18 @@ MAKE_ENCODER(, p384_mayo3, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, p384_mayo3, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, p384_mayo3, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, p384_mayo3);
MAKE_ENCODER(, mayo5, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, mayo5, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, mayo5, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, mayo5, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, mayo5, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, mayo5, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, mayo5);
MAKE_ENCODER(, p521_mayo5, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, p521_mayo5, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, p521_mayo5, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, p521_mayo5, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, p521_mayo5, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, p521_mayo5, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, p521_mayo5);
///// OQS_TEMPLATE_FRAGMENT_ENCODER_MAKE_END
24 changes: 24 additions & 0 deletions oqsprov/oqs_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,28 @@ static void *p384_mayo3_gen_init(void *provctx, int selection)
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_3, "p384_mayo3",
KEY_TYPE_HYB_SIG, 192, 53);
}
static void *mayo5_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_5,
"mayo5", KEY_TYPE_SIG, NULL, 256, 54);
}

static void *mayo5_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_5, "mayo5", 0,
256, 54);
}
static void *p521_mayo5_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_5,
"p521_mayo5", KEY_TYPE_HYB_SIG, NULL, 256, 55);
}

static void *p521_mayo5_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_mayo_5, "p521_mayo5",
KEY_TYPE_HYB_SIG, 256, 55);
}

///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END

Expand Down Expand Up @@ -1524,6 +1546,8 @@ MAKE_SIG_KEYMGMT_FUNCTIONS(mayo2)
MAKE_SIG_KEYMGMT_FUNCTIONS(p256_mayo2)
MAKE_SIG_KEYMGMT_FUNCTIONS(mayo3)
MAKE_SIG_KEYMGMT_FUNCTIONS(p384_mayo3)
MAKE_SIG_KEYMGMT_FUNCTIONS(mayo5)
MAKE_SIG_KEYMGMT_FUNCTIONS(p521_mayo5)

MAKE_KEM_KEYMGMT_FUNCTIONS(frodo640aes, OQS_KEM_alg_frodokem_640_aes, 128)

Expand Down
33 changes: 33 additions & 0 deletions oqsprov/oqs_prov.h
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,37 @@ extern const OSSL_DISPATCH
oqs_PrivateKeyInfo_der_to_p384_mayo3_decoder_functions[];
extern const OSSL_DISPATCH
oqs_SubjectPublicKeyInfo_der_to_p384_mayo3_decoder_functions[];
extern const OSSL_DISPATCH oqs_mayo5_to_PrivateKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH oqs_mayo5_to_PrivateKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH
oqs_mayo5_to_EncryptedPrivateKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH
oqs_mayo5_to_EncryptedPrivateKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH
oqs_mayo5_to_SubjectPublicKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH
oqs_mayo5_to_SubjectPublicKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH oqs_mayo5_to_text_encoder_functions[];
extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_mayo5_decoder_functions[];
extern const OSSL_DISPATCH
oqs_SubjectPublicKeyInfo_der_to_mayo5_decoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_PrivateKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_PrivateKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_EncryptedPrivateKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_EncryptedPrivateKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_SubjectPublicKeyInfo_der_encoder_functions[];
extern const OSSL_DISPATCH
oqs_p521_mayo5_to_SubjectPublicKeyInfo_pem_encoder_functions[];
extern const OSSL_DISPATCH oqs_p521_mayo5_to_text_encoder_functions[];
extern const OSSL_DISPATCH
oqs_PrivateKeyInfo_der_to_p521_mayo5_decoder_functions[];
extern const OSSL_DISPATCH
oqs_SubjectPublicKeyInfo_der_to_p521_mayo5_decoder_functions[];
///// OQS_TEMPLATE_FRAGMENT_ENDECODER_FUNCTIONS_END

///// OQS_TEMPLATE_FRAGMENT_ALG_FUNCTIONS_START
Expand Down Expand Up @@ -2192,6 +2223,8 @@ extern const OSSL_DISPATCH oqs_mayo2_keymgmt_functions[];
extern const OSSL_DISPATCH oqs_p256_mayo2_keymgmt_functions[];
extern const OSSL_DISPATCH oqs_mayo3_keymgmt_functions[];
extern const OSSL_DISPATCH oqs_p384_mayo3_keymgmt_functions[];
extern const OSSL_DISPATCH oqs_mayo5_keymgmt_functions[];
extern const OSSL_DISPATCH oqs_p521_mayo5_keymgmt_functions[];

extern const OSSL_DISPATCH oqs_frodo640aes_keymgmt_functions[];

Expand Down
6 changes: 6 additions & 0 deletions oqsprov/oqsdecoders.inc
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,11 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes),
DECODER_w_structure("mayo3", der, SubjectPublicKeyInfo, mayo3),
DECODER_w_structure("p384_mayo3", der, PrivateKeyInfo, p384_mayo3),
DECODER_w_structure("p384_mayo3", der, SubjectPublicKeyInfo, p384_mayo3),
#endif
#ifdef OQS_ENABLE_SIG_mayo_5
DECODER_w_structure("mayo5", der, PrivateKeyInfo, mayo5),
DECODER_w_structure("mayo5", der, SubjectPublicKeyInfo, mayo5),
DECODER_w_structure("p521_mayo5", der, PrivateKeyInfo, p521_mayo5),
DECODER_w_structure("p521_mayo5", der, SubjectPublicKeyInfo, p521_mayo5),
#endif
///// OQS_TEMPLATE_FRAGMENT_MAKE_END
16 changes: 16 additions & 0 deletions oqsprov/oqsencoders.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1315,5 +1315,21 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo),
ENCODER_w_structure("p384_mayo3", p384_mayo3, der, SubjectPublicKeyInfo),
ENCODER_w_structure("p384_mayo3", p384_mayo3, pem, SubjectPublicKeyInfo),
ENCODER_TEXT("p384_mayo3", p384_mayo3),
#endif
#ifdef OQS_ENABLE_SIG_mayo_5
ENCODER_w_structure("mayo5", mayo5, der, PrivateKeyInfo),
ENCODER_w_structure("mayo5", mayo5, pem, PrivateKeyInfo),
ENCODER_w_structure("mayo5", mayo5, der, EncryptedPrivateKeyInfo),
ENCODER_w_structure("mayo5", mayo5, pem, EncryptedPrivateKeyInfo),
ENCODER_w_structure("mayo5", mayo5, der, SubjectPublicKeyInfo),
ENCODER_w_structure("mayo5", mayo5, pem, SubjectPublicKeyInfo),
ENCODER_TEXT("mayo5", mayo5),
ENCODER_w_structure("p521_mayo5", p521_mayo5, der, PrivateKeyInfo),
ENCODER_w_structure("p521_mayo5", p521_mayo5, pem, PrivateKeyInfo),
ENCODER_w_structure("p521_mayo5", p521_mayo5, der, EncryptedPrivateKeyInfo),
ENCODER_w_structure("p521_mayo5", p521_mayo5, pem, EncryptedPrivateKeyInfo),
ENCODER_w_structure("p521_mayo5", p521_mayo5, der, SubjectPublicKeyInfo),
ENCODER_w_structure("p521_mayo5", p521_mayo5, pem, SubjectPublicKeyInfo),
ENCODER_TEXT("p521_mayo5", p521_mayo5),
#endif
///// OQS_TEMPLATE_FRAGMENT_MAKE_END
28 changes: 26 additions & 2 deletions oqsprov/oqsprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 214
# define OQS_OID_CNT 218
#else
# define OQS_OID_CNT 108
# define OQS_OID_CNT 112
#endif
const char *oqs_oid_alg_list[OQS_OID_CNT] = {

Expand Down Expand Up @@ -275,6 +275,10 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = {
"mayo3",
"1.3.9999.8.3.2",
"p384_mayo3",
"1.3.9999.8.5.1",
"mayo5",
"1.3.9999.8.5.2",
"p521_mayo5",
///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_END
};

Expand Down Expand Up @@ -523,6 +527,10 @@ int oqs_patch_oids(void)
oqs_oid_alg_list[104 + OQS_KEMOID_CNT] = envval;
if ((envval = getenv("OQS_OID_P384_MAYO3")))
oqs_oid_alg_list[106 + OQS_KEMOID_CNT] = envval;
if ((envval = getenv("OQS_OID_MAYO5")))
oqs_oid_alg_list[108 + OQS_KEMOID_CNT] = envval;
if ((envval = getenv("OQS_OID_P521_MAYO5")))
oqs_oid_alg_list[110 + OQS_KEMOID_CNT] = envval;
} ///// OQS_TEMPLATE_FRAGMENT_OID_PATCHING_END
return 1;
}
Expand Down Expand Up @@ -771,6 +779,14 @@ int oqs_patch_encodings(void)
oqs_alg_encoding_list[106] = envval;
if ((envval = getenv("OQS_ENCODING_P384_MAYO3_ALGNAME")))
oqs_alg_encoding_list[107] = envval;
if ((envval = getenv("OQS_ENCODING_MAYO5")))
oqs_alg_encoding_list[108] = envval;
if ((envval = getenv("OQS_ENCODING_MAYO5_ALGNAME")))
oqs_alg_encoding_list[109] = envval;
if ((envval = getenv("OQS_ENCODING_P521_MAYO5")))
oqs_alg_encoding_list[110] = envval;
if ((envval = getenv("OQS_ENCODING_P521_MAYO5_ALGNAME")))
oqs_alg_encoding_list[111] = envval;
}
///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_END
return 1;
Expand Down Expand Up @@ -903,6 +919,10 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = {
#ifdef OQS_ENABLE_SIG_mayo_3
SIGALG("mayo3", 192, oqs_signature_functions),
SIGALG("p384_mayo3", 192, oqs_signature_functions),
#endif
#ifdef OQS_ENABLE_SIG_mayo_5
SIGALG("mayo5", 256, oqs_signature_functions),
SIGALG("p521_mayo5", 256, oqs_signature_functions),
#endif
///// OQS_TEMPLATE_FRAGMENT_SIG_FUNCTIONS_END
{NULL, NULL, NULL}};
Expand Down Expand Up @@ -1096,6 +1116,10 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[]
SIGALG("mayo3", 192, oqs_mayo3_keymgmt_functions),
SIGALG("p384_mayo3", 192, oqs_p384_mayo3_keymgmt_functions),
#endif
#ifdef OQS_ENABLE_SIG_mayo_5
SIGALG("mayo5", 256, oqs_mayo5_keymgmt_functions),
SIGALG("p521_mayo5", 256, oqs_p521_mayo5_keymgmt_functions),
#endif

#ifdef OQS_ENABLE_KEM_frodokem_640_aes
KEMKMALG(frodo640aes, 128)
Expand Down
16 changes: 13 additions & 3 deletions oqsprov/oqsprov_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ 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},
{0xfeee, 128, TLS1_3_VERSION, 0}, {0xfef2, 128, TLS1_3_VERSION, 0},
{0xfeef, 128, TLS1_3_VERSION, 0}, {0xfef3, 128, TLS1_3_VERSION, 0},
{0xfef0, 192, TLS1_3_VERSION, 0}, {0xfef4, 192, TLS1_3_VERSION, 0},
{0xfef1, 256, TLS1_3_VERSION, 0}, {0xfef5, 256, TLS1_3_VERSION, 0},
///// OQS_TEMPLATE_FRAGMENT_SIGALG_ASSIGNMENTS_END
};

Expand Down Expand Up @@ -593,6 +594,11 @@ int oqs_patch_codepoints()
if (getenv("OQS_CODEPOINT_P384_MAYO3"))
oqs_sigalg_list[53].code_point
= atoi(getenv("OQS_CODEPOINT_P384_MAYO3"));
if (getenv("OQS_CODEPOINT_MAYO5"))
oqs_sigalg_list[54].code_point = atoi(getenv("OQS_CODEPOINT_MAYO5"));
if (getenv("OQS_CODEPOINT_P521_MAYO5"))
oqs_sigalg_list[55].code_point
= atoi(getenv("OQS_CODEPOINT_P521_MAYO5"));
///// OQS_TEMPLATE_FRAGMENT_CODEPOINT_PATCHING_END
return 1;
}
Expand Down Expand Up @@ -766,6 +772,10 @@ static const OSSL_PARAM oqs_param_sigalg_list[][12] = {
# ifdef OQS_ENABLE_SIG_mayo_3
OQS_SIGALG_ENTRY(mayo3, mayo3, mayo3, "1.3.9999.8.3.1", 52),
OQS_SIGALG_ENTRY(p384_mayo3, p384_mayo3, p384_mayo3, "1.3.9999.8.3.2", 53),
# endif
# ifdef OQS_ENABLE_SIG_mayo_5
OQS_SIGALG_ENTRY(mayo5, mayo5, mayo5, "1.3.9999.8.5.1", 54),
OQS_SIGALG_ENTRY(p521_mayo5, p521_mayo5, p521_mayo5, "1.3.9999.8.5.2", 55),
# endif
///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_END
};
Expand Down
6 changes: 4 additions & 2 deletions oqsprov/oqsprov_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 107
# define NID_TABLE_LEN 109
#else
# define NID_TABLE_LEN 54
# define NID_TABLE_LEN 56
#endif

static oqs_nid_name_t nid_names[NID_TABLE_LEN] = {
Expand Down Expand Up @@ -196,6 +196,8 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = {
{0, "p256_mayo2", OQS_SIG_alg_mayo_2, KEY_TYPE_HYB_SIG, 128},
{0, "mayo3", OQS_SIG_alg_mayo_3, KEY_TYPE_SIG, 192},
{0, "p384_mayo3", OQS_SIG_alg_mayo_3, KEY_TYPE_HYB_SIG, 192},
{0, "mayo5", OQS_SIG_alg_mayo_5, KEY_TYPE_SIG, 256},
{0, "p521_mayo5", OQS_SIG_alg_mayo_5, KEY_TYPE_HYB_SIG, 256},
///// OQS_TEMPLATE_FRAGMENT_OQSNAMES_END
};

Expand Down
4 changes: 2 additions & 2 deletions scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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','mayo1','mayo2','mayo3',
'dilithium2','dilithium3','dilithium5','mldsa44','mldsa65','mldsa87','falcon512','falconpadded512','falcon1024','falconpadded1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple','mayo1','mayo2','mayo3','mayo5',
# 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_mayo1','p256_mayo2','p384_mayo3',
'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_mayo1','p256_mayo2','p384_mayo3','p521_mayo5',
# 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/fullbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ $# -gt 0 ]; then
fi

if [ -z "$LIBOQS_BRANCH" ]; then
export LIBOQS_BRANCH=bhe-nibbling-mayo
export LIBOQS_BRANCH=main
fi

if [ -z "$OQS_ALGS_ENABLED" ]; then
Expand Down
1 change: 1 addition & 0 deletions test/oqs_test_evp_pkey_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const char *kHybridSignatureAlgorithms[] = {
"p256_mayo1",
"p256_mayo2",
"p384_mayo3",
"p521_mayo5",
NULL,
};
///// OQS_TEMPLATE_FRAGMENT_HYBRID_SIG_ALGS_END
Expand Down

0 comments on commit 79aa5af

Please sign in to comment.