Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ML-DSA-ipd and ML-KEM-ipd & NIST supplied test vectors #1626

Merged
merged 27 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enable alias for KEMS & enable ML-KEM (non-ipd-alias)
  • Loading branch information
bhess committed Feb 19, 2024
commit 4f5d468692c60c04e08d112955438cf39cbece2e
3 changes: 3 additions & 0 deletions .CMake/alg_support.cmake
Original file line number Diff line number Diff line change
@@ -234,20 +234,23 @@ endif()

option(OQS_ENABLE_KEM_ML_KEM "Enable ml_kem algorithm family" ON)
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_512_ipd "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_512 "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if(OQS_DIST_X86_64_BUILD OR (OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_BMI2_INSTRUCTIONS AND OQS_USE_POPCNT_INSTRUCTIONS))
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_512_ipd_avx2 "" ON "OQS_ENABLE_KEM_ml_kem_512_ipd" OFF)
endif()
endif()

cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_768_ipd "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_768 "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if(OQS_DIST_X86_64_BUILD OR (OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_BMI2_INSTRUCTIONS AND OQS_USE_POPCNT_INSTRUCTIONS))
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_768_ipd_avx2 "" ON "OQS_ENABLE_KEM_ml_kem_768_ipd" OFF)
endif()
endif()

cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_1024_ipd "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_1024 "" ON "OQS_ENABLE_KEM_ML_KEM" OFF)
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
if(OQS_DIST_X86_64_BUILD OR (OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_BMI2_INSTRUCTIONS AND OQS_USE_POPCNT_INSTRUCTIONS))
cmake_dependent_option(OQS_ENABLE_KEM_ml_kem_1024_ipd_avx2 "" ON "OQS_ENABLE_KEM_ml_kem_1024_ipd" OFF)
3 changes: 3 additions & 0 deletions docs/algorithms/kem/ml_kem.yml
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ primary-upstream:
spdx-license-identifier: CC0-1.0 or Apache-2.0
parameter-sets:
- name: ML-KEM-512-ipd
alias: ML-KEM-512
claimed-nist-level: 1
claimed-security: IND-CCA2
length-public-key: 800
@@ -55,6 +56,7 @@ parameter-sets:
no-secret-dependent-branching-checked-by-valgrind: true
large-stack-usage: false
- name: ML-KEM-768-ipd
alias: ML-KEM-768
claimed-nist-level: 3
claimed-security: IND-CCA2
length-public-key: 1184
@@ -88,6 +90,7 @@ parameter-sets:
no-secret-dependent-branching-checked-by-valgrind: true
large-stack-usage: false
- name: ML-KEM-1024-ipd
alias: ML-KEM-1024
claimed-nist-level: 5
claimed-security: IND-CCA2
length-public-key: 1568
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@
option(OQS_ENABLE_KEM_{{ family['name']|upper }} "Enable {{ family['name'] }} algorithm family" ON)
{%- for scheme in family['schemes'] %}
cmake_dependent_option(OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['scheme'] }} "" ON "OQS_ENABLE_KEM_{{ family['name']|upper }}" OFF)
{%- if 'alias_scheme' in scheme %}
cmake_dependent_option(OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['alias_scheme'] }} "" ON "OQS_ENABLE_KEM_{{ family['name']|upper }}" OFF)
{%- endif -%}
{%- for impl in scheme['metadata']['implementations'] if impl['name'] != family['default_implementation'] and impl['supported_platforms'] -%}
{%- for platform in impl['supported_platforms'] if platform['architecture'] == 'x86_64' %}
{% if platform['operating_systems'] %}if(CMAKE_SYSTEM_NAME MATCHES "{{ platform['operating_systems']|join('|') }}")
4 changes: 3 additions & 1 deletion scripts/copy_from_upstream/copy_from_upstream.py
Original file line number Diff line number Diff line change
@@ -549,7 +549,9 @@ def process_families(instructions, basedir, with_kat, with_generator):
except KeyError: # new key
print("Adding new KAT for %s" % (scheme['pretty_name_full']))
pass
kats['kem'][scheme['pretty_name_full']]['single'] = scheme['metadata']['nistkat-sha256']
kats['kem'][scheme['pretty_name_full']] = scheme['metadata']['nistkat-sha256']
if 'alias_pretty_name_full' in scheme:
kats['kem'][scheme['alias_pretty_name_full']]['single'] = scheme['metadata']['nistkat-sha256']
else:
try:
if kats['sig'][scheme['pretty_name_full']]['single'] != scheme['metadata']['nistkat-sha256']:
6 changes: 6 additions & 0 deletions scripts/copy_from_upstream/copy_from_upstream.yml
Original file line number Diff line number Diff line change
@@ -146,14 +146,20 @@ kems:
scheme: "512_ipd"
pqclean_scheme: ml-kem-512-ipd
pretty_name_full: ML-KEM-512-ipd
alias_scheme: "512"
alias_pretty_name_full: ML-KEM-512
-
scheme: "768_ipd"
pqclean_scheme: ml-kem-768-ipd
pretty_name_full: ML-KEM-768-ipd
alias_scheme: "768"
alias_pretty_name_full: ML-KEM-768
-
scheme: "1024_ipd"
pqclean_scheme: ml-kem-1024-ipd
pretty_name_full: ML-KEM-1024-ipd
alias_scheme: "1024"
alias_pretty_name_full: ML-KEM-1024
sigs:
-
name: dilithium
12 changes: 11 additions & 1 deletion scripts/copy_from_upstream/src/kem/family/kem_family.h
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
#include <oqs/oqs.h>

{% for scheme in schemes -%}
#ifdef OQS_ENABLE_KEM_{{ family }}_{{ scheme['scheme'] }}
#if defined(OQS_ENABLE_KEM_{{ family }}_{{ scheme['scheme'] }}) {%- if 'alias_scheme' in scheme %} || defined(OQS_ENABLE_KEM_{{ family }}_{{ scheme['alias_scheme'] }}){%- endif %}
#define OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_public_key {{ scheme['metadata']['length-public-key'] }}
#define OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_secret_key {{ scheme['metadata']['length-secret-key'] }}
#define OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_ciphertext {{ scheme['metadata']['length-ciphertext'] }}
@@ -15,6 +15,16 @@ OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_new(void);
OQS_API OQS_STATUS OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_keypair(uint8_t *public_key, uint8_t *secret_key);
OQS_API OQS_STATUS OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key);
OQS_API OQS_STATUS OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
{% if 'alias_scheme' in scheme %}
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_public_key OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_public_key
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_secret_key OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_secret_key
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_ciphertext OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_ciphertext
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_shared_secret OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_length_shared_secret
OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_new(void);
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_keypair OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_keypair
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_encaps OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_encaps
#define OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_decaps OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_decaps
{% endif -%}
#endif

{% endfor -%}
28 changes: 28 additions & 0 deletions scripts/copy_from_upstream/src/kem/family/kem_scheme.c
Original file line number Diff line number Diff line change
@@ -31,6 +31,34 @@ OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['scheme'] }}_new(void) {
return kem;
}

{%- if 'alias_scheme' in scheme %}

/** Alias */
OQS_KEM *OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_new(void) {

OQS_KEM *kem = malloc(sizeof(OQS_KEM));
if (kem == NULL) {
return NULL;
}
kem->method_name = OQS_KEM_alg_{{ family }}_{{ scheme['alias_scheme'] }};
kem->alg_version = "{{ scheme['metadata']['implementations'][0]['version'] }}";

kem->claimed_nist_level = {{ scheme['metadata']['claimed-nist-level'] }};
kem->ind_cca = {{ scheme['metadata']['ind_cca'] }};

kem->length_public_key = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_public_key;
kem->length_secret_key = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_secret_key;
kem->length_ciphertext = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_ciphertext;
kem->length_shared_secret = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_length_shared_secret;

kem->keypair = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_keypair;
kem->encaps = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_encaps;
kem->decaps = OQS_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_decaps;

return kem;
}
{%- endif -%}

{%- for impl in scheme['metadata']['implementations'] if impl['name'] == scheme['default_implementation'] %}

{%- if impl['signature_keypair'] %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{% for family in instructions['kems'] %}{% for scheme in family['schemes'] %}
OQS_KEM_alg_{{ family['name'] }}_{{ scheme['scheme'] }},{% endfor %}{% endfor %}
OQS_KEM_alg_{{ family['name'] }}_{{ scheme['scheme'] }},
{%- if 'alias_scheme' in scheme %}
OQS_KEM_alg_{{ family['name'] }}_{{ scheme['alias_scheme'] }},
{%- endif -%}
{% endfor %}{% endfor %}

11 changes: 10 additions & 1 deletion scripts/copy_from_upstream/src/kem/kem.c/enabled_case.fragment
Original file line number Diff line number Diff line change
@@ -4,5 +4,14 @@
return 1;
#else
return 0;
#endif{% endfor %}{% endfor %}
#endif
{% if 'alias_scheme' in scheme %}
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_{{ family['name'] }}_{{ scheme['alias_scheme'] }})) {
#ifdef OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['alias_scheme'] }}
return 1;
#else
return 0;
#endif
{% endif -%}
{% endfor %}{% endfor %}

11 changes: 10 additions & 1 deletion scripts/copy_from_upstream/src/kem/kem.c/new_case.fragment
Original file line number Diff line number Diff line change
@@ -4,5 +4,14 @@
return OQS_KEM_{{ family['name'] }}_{{ scheme['scheme'] }}_new();
#else
return NULL;
#endif{% endfor %}{% endfor %}
#endif
{% if 'alias_scheme' in scheme %}
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_{{ family['name'] }}_{{ scheme['alias_scheme'] }})) {
#ifdef OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['alias_scheme'] }}
return OQS_KEM_{{ family['name'] }}_{{ scheme['alias_scheme'] }}_new();
#else
return NULL;
#endif
{% endif -%}
{% endfor %}{% endfor %}

Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{% for family in instructions['kems'] %}{% for scheme in family['schemes'] %}
/** Algorithm identifier for {{ scheme['pretty_name_full'] }} KEM. */
#define OQS_KEM_alg_{{ family['name'] }}_{{ scheme['scheme'] }} "{{ scheme['pretty_name_full'] }}"{% endfor %}{% endfor %}
#define OQS_KEM_alg_{{ family['name'] }}_{{ scheme['scheme'] }} "{{ scheme['pretty_name_full'] }}"
{%- if 'alias_scheme' in scheme %}
/** Algorithm identifier for {{ scheme['alias_pretty_name_full'] }} KEM. */
#define OQS_KEM_alg_{{ family['name'] }}_{{ scheme['alias_scheme'] }} "{{ scheme['alias_pretty_name_full'] }}"
{%- endif -%}
{% endfor %}{% endfor %}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% set unary %}{% for family in instructions['kems'] %}{% for scheme in family['schemes'] %}1{% endfor %}{% endfor %}{% endset %}
{% set unary_alias %}{% for family in instructions['kems'] %}{% for scheme in family['schemes'] if 'alias_scheme' in scheme %}2{% endfor %}{% endfor %}{% endset %}
/** Number of algorithm identifiers above. */
#define OQS_KEM_algs_length {{ unary|length + non_upstream_kems }}
#define OQS_KEM_algs_length {{ unary|length + unary_alias|length + non_upstream_kems }}

Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@
#cmakedefine OQS_ENABLE_KEM_{{ family['name']|upper }} 1
{%- for scheme in family['schemes'] %}
#cmakedefine OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['scheme'] }} 1
{%- if 'alias_scheme' in scheme %}
#cmakedefine OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['alias_scheme'] }} 1
{%- endif -%}
{%- for impl in scheme['metadata']['implementations'] if impl['name'] != family['default_implementation'] %}
#cmakedefine OQS_ENABLE_KEM_{{ family['name'] }}_{{ scheme['scheme'] }}_{{ impl['name'] }} 1
{%- endfor -%}
20 changes: 10 additions & 10 deletions src/kem/classic_mceliece/kem_classic_mceliece.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

#include <oqs/oqs.h>

#ifdef OQS_ENABLE_KEM_classic_mceliece_348864
#if defined(OQS_ENABLE_KEM_classic_mceliece_348864)
#define OQS_KEM_classic_mceliece_348864_length_public_key 261120
#define OQS_KEM_classic_mceliece_348864_length_secret_key 6492
#define OQS_KEM_classic_mceliece_348864_length_ciphertext 96
@@ -16,7 +16,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_348864_encaps(uint8_t *ciphertext, u
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_348864_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_348864f
#if defined(OQS_ENABLE_KEM_classic_mceliece_348864f)
#define OQS_KEM_classic_mceliece_348864f_length_public_key 261120
#define OQS_KEM_classic_mceliece_348864f_length_secret_key 6492
#define OQS_KEM_classic_mceliece_348864f_length_ciphertext 96
@@ -27,7 +27,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_348864f_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_348864f_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_460896
#if defined(OQS_ENABLE_KEM_classic_mceliece_460896)
#define OQS_KEM_classic_mceliece_460896_length_public_key 524160
#define OQS_KEM_classic_mceliece_460896_length_secret_key 13608
#define OQS_KEM_classic_mceliece_460896_length_ciphertext 156
@@ -38,7 +38,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_460896_encaps(uint8_t *ciphertext, u
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_460896_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_460896f
#if defined(OQS_ENABLE_KEM_classic_mceliece_460896f)
#define OQS_KEM_classic_mceliece_460896f_length_public_key 524160
#define OQS_KEM_classic_mceliece_460896f_length_secret_key 13608
#define OQS_KEM_classic_mceliece_460896f_length_ciphertext 156
@@ -49,7 +49,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_460896f_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_460896f_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_6688128
#if defined(OQS_ENABLE_KEM_classic_mceliece_6688128)
#define OQS_KEM_classic_mceliece_6688128_length_public_key 1044992
#define OQS_KEM_classic_mceliece_6688128_length_secret_key 13932
#define OQS_KEM_classic_mceliece_6688128_length_ciphertext 208
@@ -60,7 +60,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6688128_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6688128_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_6688128f
#if defined(OQS_ENABLE_KEM_classic_mceliece_6688128f)
#define OQS_KEM_classic_mceliece_6688128f_length_public_key 1044992
#define OQS_KEM_classic_mceliece_6688128f_length_secret_key 13932
#define OQS_KEM_classic_mceliece_6688128f_length_ciphertext 208
@@ -71,7 +71,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6688128f_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6688128f_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_6960119
#if defined(OQS_ENABLE_KEM_classic_mceliece_6960119)
#define OQS_KEM_classic_mceliece_6960119_length_public_key 1047319
#define OQS_KEM_classic_mceliece_6960119_length_secret_key 13948
#define OQS_KEM_classic_mceliece_6960119_length_ciphertext 194
@@ -82,7 +82,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6960119_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6960119_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_6960119f
#if defined(OQS_ENABLE_KEM_classic_mceliece_6960119f)
#define OQS_KEM_classic_mceliece_6960119f_length_public_key 1047319
#define OQS_KEM_classic_mceliece_6960119f_length_secret_key 13948
#define OQS_KEM_classic_mceliece_6960119f_length_ciphertext 194
@@ -93,7 +93,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6960119f_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_6960119f_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_8192128
#if defined(OQS_ENABLE_KEM_classic_mceliece_8192128)
#define OQS_KEM_classic_mceliece_8192128_length_public_key 1357824
#define OQS_KEM_classic_mceliece_8192128_length_secret_key 14120
#define OQS_KEM_classic_mceliece_8192128_length_ciphertext 208
@@ -104,7 +104,7 @@ OQS_API OQS_STATUS OQS_KEM_classic_mceliece_8192128_encaps(uint8_t *ciphertext,
OQS_API OQS_STATUS OQS_KEM_classic_mceliece_8192128_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_classic_mceliece_8192128f
#if defined(OQS_ENABLE_KEM_classic_mceliece_8192128f)
#define OQS_KEM_classic_mceliece_8192128f_length_public_key 1357824
#define OQS_KEM_classic_mceliece_8192128f_length_secret_key 14120
#define OQS_KEM_classic_mceliece_8192128f_length_ciphertext 208
6 changes: 3 additions & 3 deletions src/kem/hqc/kem_hqc.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

#include <oqs/oqs.h>

#ifdef OQS_ENABLE_KEM_hqc_128
#if defined(OQS_ENABLE_KEM_hqc_128)
#define OQS_KEM_hqc_128_length_public_key 2249
#define OQS_KEM_hqc_128_length_secret_key 2305
#define OQS_KEM_hqc_128_length_ciphertext 4433
@@ -16,7 +16,7 @@ OQS_API OQS_STATUS OQS_KEM_hqc_128_encaps(uint8_t *ciphertext, uint8_t *shared_s
OQS_API OQS_STATUS OQS_KEM_hqc_128_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_hqc_192
#if defined(OQS_ENABLE_KEM_hqc_192)
#define OQS_KEM_hqc_192_length_public_key 4522
#define OQS_KEM_hqc_192_length_secret_key 4586
#define OQS_KEM_hqc_192_length_ciphertext 8978
@@ -27,7 +27,7 @@ OQS_API OQS_STATUS OQS_KEM_hqc_192_encaps(uint8_t *ciphertext, uint8_t *shared_s
OQS_API OQS_STATUS OQS_KEM_hqc_192_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key);
#endif

#ifdef OQS_ENABLE_KEM_hqc_256
#if defined(OQS_ENABLE_KEM_hqc_256)
#define OQS_KEM_hqc_256_length_public_key 7245
#define OQS_KEM_hqc_256_length_secret_key 7317
#define OQS_KEM_hqc_256_length_ciphertext 14421
Loading