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

Integrate Kyber from libjade #1745

Merged
merged 84 commits into from
Aug 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
de97c41
Add copy_from_libjade.yml
praveksharma Apr 2, 2024
ddcfdb3
Modify copy_from_upstream.py
praveksharma Apr 2, 2024
a18fa2a
Add patches for libjade Kyber code
praveksharma Apr 2, 2024
e81c66e
Update alg_support.cmake templates
praveksharma Apr 2, 2024
75b33ba
Update KEM famiy templates
praveksharma Apr 2, 2024
7137e8c
Fix copy_from_upstream.py
praveksharma Apr 2, 2024
532cadf
Correct copy_from_upstream.py
praveksharma Apr 2, 2024
4912808
Modify copy_from_upstream.yml
praveksharma Apr 2, 2024
8b8a7ef
Update KEM family templates
praveksharma Apr 2, 2024
cca5cd4
Fix copy_from_upstream.py
praveksharma Apr 2, 2024
0b4af0b
Fix KEM family templates
praveksharma Apr 2, 2024
e1238f9
Fix KEM family templates
praveksharma Apr 2, 2024
4d6aa1f
Update templates for build system files
praveksharma Apr 2, 2024
41b4af6
Update build system files
praveksharma Apr 2, 2024
0cd7af0
Fix add_enable_by_alg_conditional.libjade
praveksharma Apr 2, 2024
d62113d
Run copy_from_upstream.py
praveksharma Apr 2, 2024
32b2f99
Update KEM family templates
praveksharma Apr 3, 2024
71577e1
Update KEM templates
praveksharma Apr 3, 2024
87d39de
Update KEM templates
praveksharma Apr 3, 2024
0bd3be8
Update copy_from_upstream.yml with libjade implementation info
praveksharma Apr 3, 2024
a1450bf
Update KEM templates
praveksharma Apr 3, 2024
1bc0ff7
Edit KEM templates
praveksharma Apr 3, 2024
06b1036
Run copy_from_upstream.py
praveksharma Apr 3, 2024
36a1dcf
Update copy_from_upstream.py
praveksharma Apr 3, 2024
70fd60f
Fix KEM temlates
praveksharma Apr 3, 2024
421886a
Run copy_from_upstream.py
praveksharma Apr 3, 2024
d5bc956
Add libjade_shim
praveksharma Apr 3, 2024
79ccabf
Add jasmin/libjade namespaces to test_binary.py
praveksharma Apr 3, 2024
6f5a968
Update testing
praveksharma Apr 3, 2024
1b6034f
Allow manually triggering CI tests
praveksharma Apr 3, 2024
f418438
Change container for upstreamcheck in unix.yml
praveksharma Apr 3, 2024
109092e
Update copy_from_upstream.py
praveksharma Apr 3, 2024
f8ca495
Edit unix.yml
praveksharma Apr 3, 2024
578eab7
Edit unix.yml
praveksharma Apr 3, 2024
176c5cb
Restrict copying of code from libjade repo to relevant files
praveksharma Apr 4, 2024
f2c6c04
Remove irrelevant libjade code
praveksharma Apr 4, 2024
123d4c8
Remove redundant KEM templates
praveksharma Apr 4, 2024
4e92667
Update KEM template to accomodate new dir structure
praveksharma Apr 4, 2024
d0e72a9
Debug: tweak unix.yml
praveksharma Apr 4, 2024
7f5ec38
Re-build libjade with jasmin version used in CI
praveksharma Apr 4, 2024
d26f552
Debug: undo unix.yml tweak
praveksharma Apr 4, 2024
88d1997
Allow MSVC to ignore libjade_shims
praveksharma Apr 4, 2024
c79a15a
Simplify name scheme for libjade code
praveksharma Apr 8, 2024
762ba8d
Update alg docs, libjade code name scheme, and license
praveksharma Apr 9, 2024
0f1d3bd
Update copy_from_upstream documentation
praveksharma Apr 9, 2024
92df906
Fix copy_from_upstream.py and simply libjade code name scheme
praveksharma Apr 9, 2024
ff78985
Update alg docs and CBOM
praveksharma Apr 9, 2024
e741027
Correct alg doc generation
praveksharma Apr 9, 2024
32de1d2
Generate CBOM with unique bom-ref
praveksharma Apr 9, 2024
4213a66
Cleanup unix.yml
praveksharma Apr 10, 2024
2819622
fix patches to include api.c; fix kem templates
praveksharma Apr 19, 2024
7f46047
fix kyber patch
praveksharma Apr 19, 2024
ba7bedf
turn off weekly constant time tests for libjade implementations
praveksharma Apr 19, 2024
a53ce69
update documentation
praveksharma Apr 19, 2024
35e34b0
change upstream to stable libjade release
praveksharma Apr 19, 2024
30b3259
fix kyber documentation
praveksharma Apr 22, 2024
e962361
fix kyber documentation
praveksharma Apr 22, 2024
6eae7d0
fix kem template again
praveksharma Apr 22, 2024
eec545b
fix weekly.yml and unix.yml to test libjade code
praveksharma Apr 22, 2024
e1b0edf
rename libjade asm files from *.s to *.S
praveksharma Apr 22, 2024
17ed11e
end libjade_kyber*/api.c files with newline
praveksharma Apr 23, 2024
6368bcc
fix kem template to prevent duplicate symbols in object files
praveksharma Apr 24, 2024
2255ed7
fix indentation in weekly.yml
praveksharma Apr 24, 2024
3783c4f
skip testing libjade on macos-14 in CI
praveksharma Apr 24, 2024
5c40696
use release tag/branch with libjade upstream url instead of commit
praveksharma Apr 24, 2024
05b069e
fix build error when OQS_ENABLE_LIBJADE_KEM_ALG=OFF
praveksharma Apr 25, 2024
54598ad
initialize LIBJADE_RANDOMBYTES when OQS_LIBJADE_BUILD=OFF
praveksharma Apr 25, 2024
5b11e20
remove redundant comment
praveksharma Apr 25, 2024
f5f64f3
fix comment typo
praveksharma Apr 25, 2024
b8cd0be
make string explicit when comparing with variable in cmake
praveksharma Apr 25, 2024
efb20eb
add libjade kyber licensing to README.md
praveksharma Apr 25, 2024
2107194
remove reference to oldpqclean_kyber* code from libjade if branchin k…
praveksharma Apr 25, 2024
ad8d626
Update CMakeLists.txt
praveksharma Apr 26, 2024
7d92d32
track jasminc version in copy_from_libjade.yml; check jasminc version…
praveksharma May 16, 2024
d27901f
add OQS_LIBJADE_BUILD to build flags output
praveksharma May 16, 2024
3796695
remove link from CONFIGURE.md
praveksharma May 24, 2024
597c78a
Update libjade to dual license
praveksharma Jul 16, 2024
14dcca7
Patch gcc version for MacOS CI runs
praveksharma Jul 16, 2024
b10de91
Merge branch 'main' into ps-jasmin
praveksharma Jul 16, 2024
1b17ad9
Fix doc generation
praveksharma Jul 16, 2024
bb888d2
Fix libjade docs
praveksharma Jul 17, 2024
6eeeb53
fix license info in README.md
praveksharma Aug 11, 2024
3721500
Merge branch 'main' into ps-jasmin
praveksharma Aug 11, 2024
b1c4950
update libjade_randombytes spdx-license
praveksharma Aug 16, 2024
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
fix patches to include api.c; fix kem templates
Signed-off-by: Pravek Sharma <sharmapravek@gmail.com>
  • Loading branch information
praveksharma committed Jul 16, 2024
commit 2819622b2dea2ed9e0025d0348229b6c90730987
108 changes: 108 additions & 0 deletions scripts/copy_from_upstream/patches/libjade-kyber-api.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
diff --git a/src/crypto_kem/kyber/kyber512/amd64/avx2/api.c b/src/crypto_kem/kyber/kyber512/amd64/avx2/api.c
new file mode 100644
index 0000000..d71f2df
--- /dev/null
+++ b/src/crypto_kem/kyber/kyber512/amd64/avx2/api.c
@@ -0,0 +1,20 @@
+#include <oqs/rand.h>
+#include "libjade_shims.h"
+#include "api.h"
+
+int libjade_kyber512_avx2_keypair(uint8_t *public_key, uint8_t *secret_key) {
+ uint8_t keypair_coins[JADE_KEM_kyber_kyber512_amd64_avx2_KEYPAIRCOINBYTES];
+ OQS_randombytes(keypair_coins, JADE_KEM_kyber_kyber512_amd64_avx2_KEYPAIRCOINBYTES/2);
+ OQS_randombytes((uint8_t *)(keypair_coins + (JADE_KEM_kyber_kyber512_amd64_avx2_KEYPAIRCOINBYTES/2)), JADE_KEM_kyber_kyber512_amd64_avx2_KEYPAIRCOINBYTES/2);
+ return jade_kem_kyber_kyber512_amd64_avx2_keypair_derand(public_key, secret_key, keypair_coins);
+}
+
+int libjade_kyber512_avx2_enc(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key) {
+ uint8_t enc_coins[JADE_KEM_kyber_kyber512_amd64_avx2_ENCCOINBYTES];
+ OQS_randombytes(enc_coins, JADE_KEM_kyber_kyber512_amd64_avx2_ENCCOINBYTES);
+ return jade_kem_kyber_kyber512_amd64_avx2_enc_derand(ciphertext, shared_secret, public_key, enc_coins);
+}
+
+int libjade_kyber512_avx2_dec(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key) {
+ return jade_kem_kyber_kyber512_amd64_avx2_dec( shared_secret, ciphertext, secret_key);
+}
\ No newline at end of file
diff --git a/src/crypto_kem/kyber/kyber512/amd64/avx2/include/api.h b/src/crypto_kem/kyber/kyber512/amd64/avx2/include/api.h
index 5148fd5..419112e 100644
--- a/src/crypto_kem/kyber/kyber512/amd64/avx2/include/api.h
@@ -48,6 +75,33 @@ index 5148fd5..419112e 100644
+);
+
#endif
diff --git a/src/crypto_kem/kyber/kyber512/amd64/ref/api.c b/src/crypto_kem/kyber/kyber512/amd64/ref/api.c
new file mode 100644
index 0000000..851a282
--- /dev/null
+++ b/src/crypto_kem/kyber/kyber512/amd64/ref/api.c
@@ -0,0 +1,20 @@
+#include <oqs/rand.h>
+#include "libjade_shims.h"
+#include "api.h"
+
+int libjade_kyber512_ref_keypair(uint8_t *public_key, uint8_t *secret_key) {
+ uint8_t keypair_coins[JADE_KEM_kyber_kyber512_amd64_ref_KEYPAIRCOINBYTES];
+ OQS_randombytes(keypair_coins, JADE_KEM_kyber_kyber512_amd64_ref_KEYPAIRCOINBYTES/2);
+ OQS_randombytes((uint8_t *)(keypair_coins + (JADE_KEM_kyber_kyber512_amd64_ref_KEYPAIRCOINBYTES/2)), JADE_KEM_kyber_kyber512_amd64_ref_KEYPAIRCOINBYTES/2);
+ return jade_kem_kyber_kyber512_amd64_ref_keypair_derand(public_key, secret_key, keypair_coins);
+}
+
+int libjade_kyber512_ref_enc(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key) {
+ uint8_t enc_coins[JADE_KEM_kyber_kyber512_amd64_ref_ENCCOINBYTES];
+ OQS_randombytes(enc_coins, JADE_KEM_kyber_kyber512_amd64_ref_ENCCOINBYTES);
+ return jade_kem_kyber_kyber512_amd64_ref_enc_derand(ciphertext, shared_secret, public_key, enc_coins);
+}
+
+int libjade_kyber512_ref_dec(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key) {
+ return jade_kem_kyber_kyber512_amd64_ref_dec(shared_secret, ciphertext, secret_key);
+}
\ No newline at end of file
diff --git a/src/crypto_kem/kyber/kyber512/amd64/ref/include/api.h b/src/crypto_kem/kyber/kyber512/amd64/ref/include/api.h
index 38127cf..fcce52b 100644
--- a/src/crypto_kem/kyber/kyber512/amd64/ref/include/api.h
@@ -99,6 +153,33 @@ index 38127cf..fcce52b 100644
+);
+
#endif
diff --git a/src/crypto_kem/kyber/kyber768/amd64/avx2/api.c b/src/crypto_kem/kyber/kyber768/amd64/avx2/api.c
new file mode 100644
index 0000000..b90330b
--- /dev/null
+++ b/src/crypto_kem/kyber/kyber768/amd64/avx2/api.c
@@ -0,0 +1,20 @@
+#include <oqs/rand.h>
+#include "libjade_shims.h"
+#include "api.h"
+
+int libjade_kyber768_avx2_keypair(uint8_t *public_key, uint8_t *secret_key) {
+ uint8_t keypair_coins[JADE_KEM_kyber_kyber768_amd64_avx2_KEYPAIRCOINBYTES];
+ OQS_randombytes(keypair_coins, JADE_KEM_kyber_kyber768_amd64_avx2_KEYPAIRCOINBYTES/2);
+ OQS_randombytes((uint8_t *)(keypair_coins + (JADE_KEM_kyber_kyber768_amd64_avx2_KEYPAIRCOINBYTES/2)), JADE_KEM_kyber_kyber768_amd64_avx2_KEYPAIRCOINBYTES/2);
+ return jade_kem_kyber_kyber768_amd64_avx2_keypair_derand(public_key, secret_key, keypair_coins);
+}
+
+int libjade_kyber768_avx2_enc(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key) {
+ uint8_t enc_coins[JADE_KEM_kyber_kyber768_amd64_avx2_ENCCOINBYTES];
+ OQS_randombytes(enc_coins, JADE_KEM_kyber_kyber768_amd64_avx2_ENCCOINBYTES);
+ return jade_kem_kyber_kyber768_amd64_avx2_enc_derand(ciphertext, shared_secret, public_key, enc_coins);
+}
+
+int libjade_kyber768_avx2_dec(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key) {
+ return jade_kem_kyber_kyber768_amd64_avx2_dec(shared_secret, ciphertext, secret_key);
+}
\ No newline at end of file
diff --git a/src/crypto_kem/kyber/kyber768/amd64/avx2/include/api.h b/src/crypto_kem/kyber/kyber768/amd64/avx2/include/api.h
index d3b3500..ac36577 100644
--- a/src/crypto_kem/kyber/kyber768/amd64/avx2/include/api.h
@@ -149,6 +230,33 @@ index d3b3500..ac36577 100644
+);
+
#endif
diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/api.c b/src/crypto_kem/kyber/kyber768/amd64/ref/api.c
new file mode 100644
index 0000000..5d178f5
--- /dev/null
+++ b/src/crypto_kem/kyber/kyber768/amd64/ref/api.c
@@ -0,0 +1,20 @@
+#include <oqs/rand.h>
+#include "libjade_shims.h"
+#include "api.h"
+
+int libjade_kyber768_ref_keypair(uint8_t *public_key, uint8_t *secret_key) {
+ uint8_t keypair_coins[JADE_KEM_kyber_kyber768_amd64_ref_KEYPAIRCOINBYTES];
+ OQS_randombytes(keypair_coins, JADE_KEM_kyber_kyber768_amd64_ref_KEYPAIRCOINBYTES/2);
+ OQS_randombytes((uint8_t *)(keypair_coins + (JADE_KEM_kyber_kyber768_amd64_ref_KEYPAIRCOINBYTES/2)), JADE_KEM_kyber_kyber768_amd64_ref_KEYPAIRCOINBYTES/2);
+ return jade_kem_kyber_kyber768_amd64_ref_keypair_derand(public_key, secret_key, keypair_coins);
+}
+
+int libjade_kyber768_ref_enc(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key) {
+ uint8_t enc_coins[JADE_KEM_kyber_kyber768_amd64_ref_ENCCOINBYTES];
+ OQS_randombytes(enc_coins, JADE_KEM_kyber_kyber768_amd64_ref_ENCCOINBYTES);
+ return jade_kem_kyber_kyber768_amd64_ref_enc_derand(ciphertext, shared_secret, public_key, enc_coins);
+}
+
+int libjade_kyber768_ref_dec(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key) {
+ return jade_kem_kyber_kyber768_amd64_ref_dec(shared_secret, ciphertext, secret_key);
+}
\ No newline at end of file
diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/include/api.h b/src/crypto_kem/kyber/kyber768/amd64/ref/include/api.h
index e23e1bf..0c453e0 100644
--- a/src/crypto_kem/kyber/kyber768/amd64/ref/include/api.h
24 changes: 12 additions & 12 deletions scripts/copy_from_upstream/src/kem/family/CMakeLists.txt.libjade
Original file line number Diff line number Diff line change
@@ -4,14 +4,14 @@

if({% for used_by in common_deps_usedby[common_dep['name']] -%}OQS_ENABLE_LIBJADE_KEM_{{ family }}_{{ used_by['scheme_c'] }}{%- if used_by['impl_name'] != default_implementation %}_{{ used_by['impl_name'] }}{% endif -%}{%- if not loop.last %} OR {% endif -%}{%- endfor -%})
add_library(jasmin_{{ family }}_{{ common_dep['name'] }} OBJECT {% for source_file in common_dep['sources_addl']|sort -%}{{ upstream_location }}_{{ common_dep['name'] }}/{{ source_file }}{%- if not loop.last %} {% endif -%}{%- endfor -%})
target_include_directories({{ family }}_{{ common_dep['name'] }} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/{{ upstream_location }}_{{ common_dep['name'] }})
target_include_directories(jasmin_{{ family }}_{{ common_dep['name'] }} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/{{ upstream_location }}_{{ common_dep['name'] }})
{%- if common_dep['required_flags'] %}
target_compile_options({{ family }}_{{ common_dep['name'] }} PRIVATE {%- for flag in common_dep['required_flags'] %}{%- if flag != 'arm_neon' %} -m{%- if flag == 'bmi1' -%} bmi {%- elif flag == 'sse4_1' -%} sse4.1 {%- elif flag == 'pclmulqdq' -%} pclmul {%- else -%}{{ flag }}{%- endif -%}{%- endif -%}{%- endfor -%})
target_compile_options(jasmin_{{ family }}_{{ common_dep['name'] }} PRIVATE {%- for flag in common_dep['required_flags'] %}{%- if flag != 'arm_neon' %} -m{%- if flag == 'bmi1' -%} bmi {%- elif flag == 'sse4_1' -%} sse4.1 {%- elif flag == 'pclmulqdq' -%} pclmul {%- else -%}{{ flag }}{%- endif -%}{%- endif -%}{%- endfor -%})
{%- endif %}
{%- if common_dep['compile_opts'] %}
target_compile_options({{ family }}_{{ common_dep['name'] }} PUBLIC {{ common_dep['compile_opts'] }})
target_compile_options(jasmin_{{ family }}_{{ common_dep['name'] }} PUBLIC {{ common_dep['compile_opts'] }})
{%- endif %}
set(_{{ family|upper }}_OBJS ${_{{ family|upper }}_OBJS} $<TARGET_OBJECTS:{{ family }}_{{ common_dep['name'] }}>)
set(_{{ family|upper }}_OBJS ${_{{ family|upper }}_OBJS} $<TARGET_OBJECTS:jasmin_{{ family }}_{{ common_dep['name'] }}>)
endif()

{%- endfor %}
@@ -24,37 +24,37 @@ endif()
if(OQS_ENABLE_LIBJADE_KEM_{{ family }}_{{ scheme['scheme_c'] }}{%- if 'alias_scheme' in scheme %} OR OQS_ENABLE_LIBJADE_KEM_{{ family }}_{{ scheme['alias_scheme'] }}{%- endif %})
add_library(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} OBJECT kem_{{ family }}_{{ scheme['scheme'] }}.c {% for source_file in impl['sources']|sort -%}{{ impl['upstream']['name'] }}_{{ scheme['pqclean_scheme'] }}_{{ impl['name'] }}/{{ source_file }}{%- if not loop.last %} {% endif -%}{%- endfor -%})
{%- if impl['compile_opts'] %}
target_compile_options({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PUBLIC {{ impl['compile_opts'] }})
target_compile_options(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PUBLIC {{ impl['compile_opts'] }})
{%- endif -%}

{%- else %}

if(OQS_ENABLE_LIBJADE_KEM_{{ family }}_{{ scheme['scheme_c'] }}_{{ impl['name'] }}{%- if 'alias_scheme' in scheme %} OR OQS_ENABLE_LIBJADE_KEM_{{ family }}_{{ scheme['alias_scheme'] }}_{{ impl['name'] }}{%- endif %})
add_library(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} OBJECT {% for source_file in impl['sources']|sort -%}{{ impl['upstream']['name'] }}_{{ scheme['pqclean_scheme'] }}_{{ impl['name'] }}/{{ source_file }}{%- if not loop.last %} {% endif -%}{%- endfor -%})
{%- endif %}
target_include_directories({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/{{ impl['upstream']['name'] }}_{{ scheme['pqclean_scheme'] }}_{{ impl['name'] }})
target_include_directories({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
target_include_directories(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/{{ impl['upstream']['name'] }}_{{ scheme['pqclean_scheme'] }}_{{ impl['name'] }})
target_include_directories(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE ${PROJECT_SOURCE_DIR}/src/common/libjade_shims)
{%- if impl['name'] != scheme['default_implementation'] and impl['required_flags'] -%}
{%- set opts %}{% for flag in impl['required_flags'] %}{%- if flag != 'arm_neon' %} -m{%- if flag == 'bmi1' -%} bmi {% elif flag == 'sse4_1' -%} sse4.1 {% elif flag == 'pclmulqdq' -%} pclmul {% else -%}{{ flag }} {% endif %}{% endif -%}{% endfor %}{% endset %}
{%- if opts|length > 0 %}
target_compile_options({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE {{ opts }})
target_compile_options(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE {{ opts }})
{%- endif -%}
{%- endif %}
{%- if impl['compile_opts'] %}
target_compile_options({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PUBLIC {{ impl['compile_opts'] }})
target_compile_options(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PUBLIC {{ impl['compile_opts'] }})
{%- endif %}
{%- if family == 'classic_mceliece' and impl['name'] == 'avx2' %}
target_compile_options({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE -Wno-language-extension-token -O1)
target_compile_options(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE -Wno-language-extension-token -O1)
{%- endif %}
{%- if family == 'hqc' and impl['name'] == 'avx2' %}
target_compile_options({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE -Wno-missing-braces)
{%- endif %}
{%- if impl['upstream']['name'].endswith('pqclean') %}
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_compile_definitions({{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE old_gas_syntax)
target_compile_definitions(jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }} PRIVATE old_gas_syntax)
endif()
{%- endif %}
set(_{{ family|upper }}_OBJS ${_{{ family|upper }}_OBJS} $<TARGET_OBJECTS:{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }}>)
set(_{{ family|upper }}_OBJS ${_{{ family|upper }}_OBJS} $<TARGET_OBJECTS:jasmin_{{ family }}_{{ scheme['scheme'] }}_{{ impl['name'] }}>)
endif()
{%- endfor -%}
{%- endfor %}
Loading