This repository was archived by the owner on Jan 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed
oqs-template/include/openssl/evp.h Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 104104# define EVP_PKEY_RSA3072_SPHINCSHARAKA128FROBUST NID_rsa3072_sphincsharaka128frobust
105105#define OQS_OPENSSL_SIG_algs_length 38
106106#define OQS_OPENSSL_KEM_algs_length 39
107+ #define IS_OQS_OPENSSL_KEM_NID (a ) ((a >= NID_oqs_kem_default) && (a <= NID_p521_papabearephem))
108+ #define IS_OQS_OPENSSL_SIG_NID (a ) ((a >= NID_oqs_sig_default) && (a <= NID_rsa3072_sphincsharaka128frobust))
107109/////// OQS_TEMPLATE_FRAGMENT_DEFINE_EVP_PKEYS_END
108110const char * OQSKEM_options (void );
109111const char * OQSSIG_options (void );
Original file line number Diff line number Diff line change 1111{%- endfor %}
1212#define OQS_OPENSSL_SIG_algs_length {{ count.val }}
1313#define OQS_OPENSSL_KEM_algs_length {{ config['kems']|length }}
14+ {%- set last_kem_hybrid_level = (config['kems']|last)['bit_security'] -%}
15+ {%- if last_kem_hybrid_level == 128 -%}
16+ {%- set hybrid_curve = "p256_" -%}
17+ {%- elif last_kem_hybrid_level == 192 -%}
18+ {%- set hybrid_curve = "p384_" -%}
19+ {%- elif last_kem_hybrid_level == 256 -%}
20+ {%- set hybrid_curve = "p521_" -%}
21+ {%- else -%}
22+ {%- set hybrid_curve = "" -%}
23+ {%- endif %}
24+ #define IS_OQS_OPENSSL_KEM_NID(a) ((a >= NID_oqs_kem_default) && (a <= NID_{{ hybrid_curve }}{{ (config['kems'] | last)['name_group'] }}))
25+ {%- set last_sig_variant = (config['sigs']|last)['variants']|last %}
26+ #define IS_OQS_OPENSSL_SIG_NID(a) ((a >= NID_oqs_sig_default) && (a <= NID_{{ (last_sig_variant['mix_with']|last)['name'] }}_{{ last_sig_variant['name'] }}))
1427//
Original file line number Diff line number Diff line change 519519#define CERT_PRIVATE_KEY 2
520520*/
521521
522-
523- /* Returns true if the nid is for an OQS KEM */
524- #define NID_OQS_START NID_oqs_kem_default
525- #define NID_OQS_END NID_bike1l3fo
526- #define NID_HYBRID_START NID_p256_oqs_kem_default
527- #define NID_HYBRID_END NID_p256_bike1l3fo
528- #define IS_OQS_KEM_NID (nid ) (nid >= NID_OQS_START && nid <= NID_OQS_END)
529-
530522/* Returns the curve ID for an OQS KEM NID */
531523///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_CURVEID_START
532524#define OQS_KEM_CURVEID (nid ) \
You can’t perform that action at this time.
0 commit comments