Skip to content

Commit

Permalink
Update API of stfl with context strings - needs to be compatible with…
Browse files Browse the repository at this point in the history
… the SIG API

Signed-off-by: Basil Hess <[email protected]>
  • Loading branch information
bhess committed Nov 12, 2024
1 parent 3d0f999 commit 4a59d11
Show file tree
Hide file tree
Showing 54 changed files with 299 additions and 111 deletions.
9 changes: 9 additions & 0 deletions scripts/copy_from_upstream/src/sig/family/sig_scheme.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ OQS_API OQS_STATUS OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_keypair(uint8_t *
}

OQS_API OQS_STATUS OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
{%- set default_impl = scheme['metadata']['implementations'] | selectattr("name", "equalto", scheme['default_implementation']) | first -%}
{%- if not ('api-with-context-string' in default_impl and default_impl['api-with-context-string']) %}
(void) ctx_str;
(void) ctx_str_len;
{%- endif %}
{%- for impl in scheme['metadata']['implementations'] if impl['name'] != scheme['default_implementation'] %}
{%- if loop.first %}
#if defined(OQS_ENABLE_SIG_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }}) {%- if 'alias_scheme' in scheme %} || defined(OQS_ENABLE_SIG_{{ family }}_{{ scheme['alias_scheme'] }}_{{ impl['name'] }}){%- endif %}
Expand Down Expand Up @@ -222,6 +227,10 @@ OQS_API OQS_STATUS OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_sign(uint8_t *sig
}

OQS_API OQS_STATUS OQS_SIG_{{ family }}_{{ scheme['scheme'] }}_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
{%- if not ('api-with-context-string' in default_impl and default_impl['api-with-context-string']) %}
(void) ctx_str;
(void) ctx_str_len;
{%- endif %}
{%- for impl in scheme['metadata']['implementations'] if impl['name'] != scheme['default_implementation'] %}
{%- if loop.first %}
#if defined(OQS_ENABLE_SIG_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }}) {%- if 'alias_scheme' in scheme %} || defined(OQS_ENABLE_SIG_{{ family }}_{{ scheme['alias_scheme'] }}_{{ impl['name'] }}){%- endif %}
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_128_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_balanced_sign(uint8_t *signature, size
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_128_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_fast_keypair(uint8_t *public_key, uint
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_fast_sign(uint8_t *signature, size_t *
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_128_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_small_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_128_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_128_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_192_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_balanced_sign(uint8_t *signature, size
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_192_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_fast_keypair(uint8_t *public_key, uint
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_fast_sign(uint8_t *signature, size_t *
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_192_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_small_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_192_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_192_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_256_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_balanced_sign(uint8_t *signature, size
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_256_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_fast_keypair(uint8_t *public_key, uint
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_fast_sign(uint8_t *signature, size_t *
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdp_256_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_small_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdp_256_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdp_256_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_128_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_balanced_sign(uint8_t *signature, siz
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_128_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_fast_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_fast_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_128_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_small_keypair(uint8_t *public_key, ui
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_128_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_128_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_192_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_balanced_sign(uint8_t *signature, siz
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_192_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_fast_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_fast_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_192_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_small_keypair(uint8_t *public_key, ui
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_192_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_192_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_256_balanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_balanced_keypair(uint8_t *public_key,
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_balanced_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_balanced_sign(uint8_t *signature, siz
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_balanced_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_balanced_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_256_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_fast_keypair(uint8_t *public_key, uin
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_fast_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_fast_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_fast_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_fast_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sig/cross/sig_cross_rsdpg_256_small.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_small_keypair(uint8_t *public_key, ui
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_small_sign(uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *secret_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand All @@ -72,6 +74,8 @@ OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_small_sign(uint8_t *signature, size_t
}

OQS_API OQS_STATUS OQS_SIG_cross_rsdpg_256_small_verify(const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, size_t ctx_str_len, const uint8_t *public_key) {
(void) ctx_str;
(void) ctx_str_len;
#if defined(OQS_ENABLE_SIG_cross_rsdpg_256_small_avx2)
#if defined(OQS_DIST_BUILD)
if (OQS_CPU_has_extension(OQS_CPU_EXT_AVX2)) {
Expand Down
Loading

0 comments on commit 4a59d11

Please sign in to comment.