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 post-quantum cryptography #125

Merged
merged 128 commits into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from 127 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
1a2f2ee
Update copyright period
SergeySeroshtan Oct 3, 2019
4e29aa4
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 3, 2019
d5b6263
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 4, 2019
35058db
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 4, 2019
7af0019
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
aacc8ad
Allow any value for <feature default="..."/> attribute (codegen)
SergeySeroshtan Oct 7, 2019
1f9790c
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
736bff8
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
4e01982
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
26541e0
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
683005f
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
4e94f70
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
4367eeb
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
d92aabb
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
1c05fde
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
9c17132
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
58f63bf
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
2e8315e
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
6167c66
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
679688a
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
c1e9805
Bump required CMake version to 3.12 (cmake)
SergeySeroshtan Oct 7, 2019
1d5bc22
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
5207c3d
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
3cc044a
Bump required CMake version to 3.15 (cmake)
SergeySeroshtan Oct 7, 2019
9527b43
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
e294f46
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
8a0e49d
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
783a65e
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 7, 2019
543594f
[WIP] Add post-quantum cryptography - patch falcon-sign library
SergeySeroshtan Oct 8, 2019
d80afd9
Restore state of main.xml (codegen, models) [ci skip]
SergeySeroshtan Oct 8, 2019
cd90da0
Merge branch 'develop' into feature/post-quantum-crypto
SergeySeroshtan Oct 8, 2019
24a2f6e
Bump required CMake version to 3.12 (cmake)
SergeySeroshtan Oct 8, 2019
6593fdd
Patch nanopb plug-in with a suitable Python interpreter (cmake)
SergeySeroshtan Oct 8, 2019
d4d5fd0
Update root README.md with a new required CMake version 3.12
SergeySeroshtan Oct 8, 2019
a61fda5
[WIP] Add post-quantum cryptography
SergeySeroshtan Oct 8, 2019
55f11dd
Code formatting [ci skip]
SergeySeroshtan Oct 9, 2019
fcbad00
Fix python code generation - generate public constants only (codegen)
SergeySeroshtan Oct 9, 2019
0f7c05e
Add draft falcon-sign integration to the foundation library
SergeySeroshtan Oct 9, 2019
9a2293d
Add tests for the falcon-sign library (tests)
SergeySeroshtan Oct 10, 2019
d559f58
Add tests for the class "falcon" (tests)
SergeySeroshtan Oct 10, 2019
9d950e7
Interface 'KeySigner' method 'signatureLen()' now accept only a priva…
SergeySeroshtan Oct 10, 2019
147dbba
[WIP] Post quantum - Change "round5" library algorithm to R5ND_5PKE_5…
SergeySeroshtan Oct 11, 2019
a7c36fa
[WIP] Post quantum - Add method "setup defaults" to "falcon" implemen…
SergeySeroshtan Oct 14, 2019
4662479
[WIP] Post quantum - Integrate "round5" encryption/decryption (lib, f…
SergeySeroshtan Oct 14, 2019
a1dff78
Bump CMake version to 3.15.4 (travis-ci)
SergeySeroshtan Oct 14, 2019
cc309e5
Bump CMake version to 3.15.4 (2) (travis-ci)
SergeySeroshtan Oct 14, 2019
20fd5e9
[WIP] Post quantum - Fix "round5" linkage errors on Linux (lib, found…
SergeySeroshtan Oct 14, 2019
90eabe3
Revert "Bump CMake version to 3.15.4 (travis-ci)"
SergeySeroshtan Oct 14, 2019
98f86d4
[WIP] Post quantum - Fix "round5" linkage errors on Linux (lib, found…
SergeySeroshtan Oct 14, 2019
67b0160
[WIP] Post quantum - Fix memory leaks (tests, foundation)
SergeySeroshtan Oct 14, 2019
ff8995f
[WIP] Add support for compound keys - draft (lib, foundation)
SergeySeroshtan Oct 21, 2019
90027d0
[WIP] Add support for compound keys - add sign/verify (lib, foundation)
SergeySeroshtan Oct 22, 2019
5515207
[WIP] Compound keys - append encryption key signature to the keys (li…
SergeySeroshtan Oct 22, 2019
24f2aac
[WIP] Compound keys - fix memory leaks (lib, foundation)
SergeySeroshtan Oct 22, 2019
30dc0c1
[WIP] Add support for compound keys - add export (lib, foundation)
SergeySeroshtan Oct 22, 2019
4c7b85e
[WIP] Add support for compound keys - add imports and fix exports (li…
SergeySeroshtan Oct 23, 2019
84b86f9
[WIP] Add support for compound keys - regenerate code (lib, foundation)
SergeySeroshtan Oct 23, 2019
6ef29d0
Use AlgInfoSerializer within PKCS8 serializer (lib, foundation)
SergeySeroshtan Oct 28, 2019
41702c4
[WIP] Add support for compound keys - PKCS#8 serialization (lib, foun…
SergeySeroshtan Oct 29, 2019
8efd8f9
[WIP] Apply Virgil Security OIDs (lib, foundation)
SergeySeroshtan Oct 30, 2019
569369a
[WIP] Post-quantum extend tests (tests, foundation)
SergeySeroshtan Oct 30, 2019
9f9fbe0
Fix braking class RecipientCipher invariant (lib, foundation)
SergeySeroshtan Oct 30, 2019
7229001
[WIP] Add support for compound keys to the KeyAlgFactory (lib, founda…
SergeySeroshtan Oct 30, 2019
d9deef3
Add tests for Compound Keys with class RecipientCipher (tests, founda…
SergeySeroshtan Oct 30, 2019
a62f397
Apply Virgil Security OIDs in the comments (lib, foundation)
SergeySeroshtan Oct 30, 2019
644dd90
[WIP] Add support for compound keys - fix verify (lib, foundation)
SergeySeroshtan Oct 30, 2019
9bb15d1
Add complex test of high level sign/verify operations (tests, foundat…
SergeySeroshtan Oct 30, 2019
addb9ec
[WIP] Add compound private key generation to the KeyProvider (lib, fo…
SergeySeroshtan Oct 31, 2019
0887394
Code format
SergeySeroshtan Oct 31, 2019
7797ad5
Extract common use cases tests within KeyProvider tests (tests, found…
SergeySeroshtan Oct 31, 2019
1c9a125
[WIP] Post quantum - add correspond tests for KeyProvider (tests, fou…
SergeySeroshtan Oct 31, 2019
4dea623
Fix memory leak (tests, foundation)
SergeySeroshtan Oct 31, 2019
7a35bf4
Remove stale files (lib, foundation)
SergeySeroshtan Oct 31, 2019
a1c5a47
Add model attribute <require is_optional="1"/> (codegen)
SergeySeroshtan Oct 31, 2019
e072125
Fix compilation when VSCF_POST_QUANTUM feature is OFF (models, build,…
SergeySeroshtan Oct 31, 2019
1dd75e9
[WIP] Post quantum - finalizing (tests, foundation)
SergeySeroshtan Nov 7, 2019
408fc0c
Fix cross-project dependency to the class "error" (codegen, wasm)
SergeySeroshtan Nov 8, 2019
d5fca11
[WIP] Post quantum - regenerate code (lib, foundation)
SergeySeroshtan Nov 8, 2019
5b0c4ea
[WIP] Post quantum - fix memory leaks (lib, foundation)
SergeySeroshtan Nov 8, 2019
a91df00
[WIP] Post quantum - minimize openssl presence within round5 (build,…
SergeySeroshtan Nov 8, 2019
f0002f3
[WIP] Post quantum - fix compilation errors when VSCF_POST_QUANTUM=OF…
SergeySeroshtan Nov 8, 2019
0d33078
[WIP] Use a custom "CMakeLists.txt" file for the "round5" (cmake)
SergeySeroshtan Nov 11, 2019
c905d16
Fix cross-platform builds by using Python interpreter within host (cm…
SergeySeroshtan Nov 11, 2019
a7cfe08
[WIP] Patch the "round5" library to use MbedTLS crypto engine (cmake,…
SergeySeroshtan Nov 11, 2019
5080cf1
Drop dependency to the OpenSSL (travis-ci)
SergeySeroshtan Nov 11, 2019
053f646
[WIP] Use a custom "CMakeLists.txt" file for the "keccak" library (cm…
SergeySeroshtan Nov 12, 2019
7d63661
[WIP] Add installation steps for libraries: keccak, round5, falcon (c…
SergeySeroshtan Nov 12, 2019
38342aa
Enable post quantum for Apple Frameworks (build, pqc)
SergeySeroshtan Nov 12, 2019
f4d42e2
Fix compilation errors when VSCF_COMPOUND_KEY_ALG=OFF (lib, foundation)
SergeySeroshtan Nov 13, 2019
29b0f9a
[WIP] Add options to build "round5" library examples (build, round5)
SergeySeroshtan Nov 13, 2019
fd28ce2
Eliminate platform RNG from the "falcon" library (build, falcon)
SergeySeroshtan Nov 13, 2019
2caf9fd
Add "critical section" synchronization mechanism (lib, all)
SergeySeroshtan Nov 13, 2019
c86f142
Eliminate platform RNG from the "round5" library (build, round5)
SergeySeroshtan Nov 13, 2019
f42ad95
Eliminate platform RNG from the "falcon" library (2) (build, falcon)
SergeySeroshtan Nov 13, 2019
02f4321
Fix "critical section" synchronization mechanism (lib, all)
SergeySeroshtan Nov 13, 2019
ffa5919
Fix usage of the "round5" library in a multi-threading env (build, ro…
SergeySeroshtan Nov 13, 2019
30c9f1b
Fix missed "extern" keyword for the "round5" global variables (lib, r…
SergeySeroshtan Nov 14, 2019
31faf26
Remove "example.c" source file (lib, round5)
SergeySeroshtan Nov 14, 2019
0800ffc
Fix usage of the "round5" library in a multi-threading env (2) (build…
SergeySeroshtan Nov 14, 2019
d474d33
Fix PVS Studio warnings (static-code-analyzing)
SergeySeroshtan Nov 14, 2019
dad6c1f
Enable post-quantum builds for the C language (jenkins-ci)
SergeySeroshtan Nov 14, 2019
8b18914
Fix include paths for the "keccak" library (build, cmake)
SergeySeroshtan Nov 14, 2019
595b356
Fix usage of the "restrict" C99 keyword for the MSVC (lib, round5)
SergeySeroshtan Nov 14, 2019
7fff74c
Fix usage of the "restrict" C99 keyword for the MSVC (2) (lib, round5)
SergeySeroshtan Nov 14, 2019
0741d90
Fix usage of the "restrict" C99 keyword for the MSVC (3) (lib, round5)
SergeySeroshtan Nov 14, 2019
a9e084c
Fix include paths for the "keccak" library (2) (build, cmake)
SergeySeroshtan Nov 14, 2019
6fc12ff
Fix the "falcon" library build on Linux with GCC 4.8 (build, falcon, …
SergeySeroshtan Nov 14, 2019
9c71e60
Add ability to redefine feature of libraries and classes (codegen)
SergeySeroshtan Nov 14, 2019
cb182cd
Fix build if VIRGIL_POST_QUANTUM=OFF (cmake, build)
SergeySeroshtan Nov 14, 2019
a8c294e
Enable post-quantum builds for the Java, PHP and Python languages (je…
SergeySeroshtan Nov 14, 2019
dd7b2d0
Fix return of readonly interfaces (codegen, swift)
SergeySeroshtan Nov 15, 2019
b906707
Move methods that accept "disown" arguments to the "private" API (cod…
SergeySeroshtan Nov 15, 2019
d63d128
Fix compute shared key for ECC algorithms (lib, foundation)
SergeySeroshtan Nov 18, 2019
58b4f93
Merge branch 'develop' into feature/post-quantum-crypto
SergeySeroshtan Nov 18, 2019
67081cd
Fix typo
SergeySeroshtan Nov 18, 2019
e1cad0e
Add optional build for the "falcon" library executables (build, lib, …
SergeySeroshtan Nov 18, 2019
acd0f01
Upgrade the "nanopb" 0.3.9.1 -> 0.3.9.4 (lib, nanopb)
SergeySeroshtan Nov 19, 2019
fdabc19
Cleanup Travis-CI config file
SergeySeroshtan Nov 19, 2019
84c67da
Merge branch 'develop' into feature/post-quantum-crypto
SergeySeroshtan Nov 27, 2019
686a3fe
Fix strnstr function (codegen, models)
SergeySeroshtan Nov 28, 2019
0202ce4
Regenerate code
SergeySeroshtan Nov 28, 2019
d98a726
Fix typo (tests, foundation)
SergeySeroshtan Nov 28, 2019
16113a7
Implement KeySigner interface by ChainedKeyAlg (lib, foundation)
SergeySeroshtan Nov 28, 2019
e85a8e1
Fix typo (models, lib, foundation)
SergeySeroshtan Nov 28, 2019
0ce3bea
Fix test
SergeySeroshtan Nov 29, 2019
677b8a1
Replace post-quantum key generation mechanism (lib, foundation, pqc)
SergeySeroshtan Dec 6, 2019
620a465
Add class "KeyInfo" to inspect key details (lib, foundation)
SergeySeroshtan Dec 6, 2019
79a839d
Merge branch 'develop' into feature/post-quantum-crypto
SergeySeroshtan Dec 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ addons:
cloc

install:
- travis_retry wget https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh
- sudo bash cmake-3.11.1-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local
- travis_retry wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh
- sudo bash cmake-3.12.4-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local
- export PATH="/usr/local/bin:$PATH"
- mkdir -p $HOME/protobuf && pushd $HOME/protobuf
&& wget 'https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip' -O protoc-3.6.1-linux-x86_64.zip
&& unzip protoc-3.6.1-linux-x86_64.zip -d protoc-3.6.1-linux-x86_64
&& popd
- pushd $HOME/protobuf
&& wget 'https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-python-3.6.1.tar.gz' -O protobuf-python-3.6.1.tar.gz
&& tar xzf protobuf-python-3.6.1.tar.gz
&& cp protoc-3.6.1-linux-x86_64/bin/protoc protobuf-3.6.1/src/
Expand All @@ -36,7 +34,11 @@ before_script:
- valgrind --version

script:
- cmake -H. -Bbuild -DENABLE_HEAVY_TESTS=OFF -DVIRGIL_C_MT_TESTING=OFF -DENABLE_BENCHMARKING=ON
- cmake -H. -Bbuild
-DENABLE_HEAVY_TESTS=OFF
-DVIRGIL_C_MT_TESTING=OFF
-DENABLE_BENCHMARKING=ON
-DVIRGIL_POST_QUANTUM=ON
- cmake --build build -- -j8
&& pushd build
&& ctest -T memcheck --output-on-failure
Expand Down
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Lead Maintainer: Virgil Security Inc. <[email protected]>

cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(virgil_crypto VERSION 0.12.0 LANGUAGES C)

Expand Down Expand Up @@ -96,6 +96,11 @@ option(VIRGIL_LIB_ED25519 "Build 'ed25519' library" ON)
option(VIRGIL_LIB_RATCHET "Build 'ratchet' library" ON)
option(VIRGIL_LIB_PHE "Build 'phe' library" ON)

#
# Features
#
option(VIRGIL_POST_QUANTUM "Enable post-quantum cryptography [experemental]." OFF)

#
# Wrappers
#
Expand All @@ -105,6 +110,7 @@ option(VIRGIL_WRAP_PHP "Build 'PHP' wrapper" OFF)
option(VIRGIL_WRAP_JAVA "Build 'Java' wrapper" OFF)
option(VIRGIL_WRAP_WASM "Build 'WebAssembly' wrapper" OFF)


# ---------------------------------------------------------------------------
# Platfrom specific.
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -179,6 +185,14 @@ endif()
#
add_subdirectory("thirdparty/nanopb")

#
# Post-quantum
#
if(VIRGIL_POST_QUANTUM)
add_subdirectory("thirdparty/keccak")
add_subdirectory("thirdparty/round5")
add_subdirectory("thirdparty/falcon")
endif()

# ---------------------------------------------------------------------------
# Library core libraries
Expand Down
20 changes: 20 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def build_LangC_Unix(slave) {
-DCPACK_OUTPUT_FILE_PREFIX=c \
-DENABLE_CLANGFORMAT=OFF \
-DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
-DVIRGIL_C_MT_TESTING=ON \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build -- -j10
cd build
Expand Down Expand Up @@ -157,6 +159,7 @@ def build_LangC_Windows(slave) {
-DCPACK_OUTPUT_FILE_PREFIX=c ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_C_MT_TESTING=ON ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build
cd build
Expand Down Expand Up @@ -188,6 +191,7 @@ def build_LangPHP_Linux(slave) {
-DCPACK_OUTPUT_FILE_PREFIX=php \
-DENABLE_CLANGFORMAT=OFF \
-DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build -- -j10
cd build
Expand All @@ -208,6 +212,7 @@ def build_LangPHP_Linux(slave) {
-DVIRGIL_PACKAGE_LANGUAGE_VERSION=7.3 \
-DCPACK_OUTPUT_FILE_PREFIX=php \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build -- -j10
cd build
Expand Down Expand Up @@ -238,6 +243,7 @@ def build_LangPHP_MacOS(slave) {
-DCPACK_OUTPUT_FILE_PREFIX=php \
-DENABLE_CLANGFORMAT=OFF \
-DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build -- -j10
cd build
Expand All @@ -258,6 +264,7 @@ def build_LangPHP_MacOS(slave) {
-DVIRGIL_PACKAGE_LANGUAGE_VERSION=7.3 \
-DCPACK_OUTPUT_FILE_PREFIX=php \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build -- -j10
cd build
Expand Down Expand Up @@ -290,6 +297,7 @@ def build_LangPHP_Windows(slave) {
-DVIRGIL_PACKAGE_LANGUAGE_VERSION=7.2 ^
-DCPACK_OUTPUT_FILE_PREFIX=php ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build
cd build
Expand All @@ -316,6 +324,7 @@ def build_LangPHP_Windows(slave) {
-DVIRGIL_PACKAGE_LANGUAGE_VERSION=7.3 ^
-DCPACK_OUTPUT_FILE_PREFIX=php ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build
cd build
Expand Down Expand Up @@ -345,6 +354,7 @@ def build_LangJava_Linux(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/linux" \
-DENABLE_CLANGFORMAT=OFF \
-DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand All @@ -369,6 +379,7 @@ def build_LangJava_MacOS(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/macos" \
-DENABLE_CLANGFORMAT=OFF \
-DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand Down Expand Up @@ -396,6 +407,7 @@ def build_LangJava_Windows(slave) {
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="wrappers\\java\\binaries\\windows" ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build --target install

Expand All @@ -421,6 +433,7 @@ def build_LangJava_Android_x86(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/android" \
-DCMAKE_INSTALL_LIBDIR="lib/x86" \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand All @@ -445,6 +458,7 @@ def build_LangJava_Android_x86_64(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/android" \
-DCMAKE_INSTALL_LIBDIR="lib/x86_64" \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand All @@ -469,6 +483,7 @@ def build_LangJava_Android_armeabi_v7a(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/android" \
-DCMAKE_INSTALL_LIBDIR="lib/armeabi-v7a" \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand All @@ -493,6 +508,7 @@ def build_LangJava_Android_arm64_v8a(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/java/binaries/android" \
-DCMAKE_INSTALL_LIBDIR="lib/arm64-v8a" \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.

cmake --build build --target install -- -j10
Expand All @@ -518,6 +534,7 @@ def build_LangPython_Linux(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/python/virgil_crypto_lib" \
-DCMAKE_INSTALL_LIBDIR=_libs \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build --target install -- -j8

Expand All @@ -541,6 +558,7 @@ def build_LangPython_MacOS(slave) {
-DCMAKE_INSTALL_PREFIX="wrappers/python/virgil_crypto_lib" \
-DCMAKE_INSTALL_LIBDIR=_libs \
-DENABLE_CLANGFORMAT=OFF \
-DVIRGIL_POST_QUANTUM=ON \
-Bbuild -H.
cmake --build build --target install -- -j8

Expand Down Expand Up @@ -569,6 +587,7 @@ def build_LangPython_Windows(slave) {
-DCMAKE_INSTALL_LIBDIR=_libs ^
-DCMAKE_INSTALL_BINDIR=_libs ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build --target install

Expand All @@ -592,6 +611,7 @@ def build_LangPython_Windows(slave) {
-DCMAKE_INSTALL_LIBDIR=_libs ^
-DCMAKE_INSTALL_BINDIR=_libs ^
-DENABLE_CLANGFORMAT=OFF ^
-DVIRGIL_POST_QUANTUM=ON ^
-Bbuild -H.
cmake --build build --target install

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Implementation of the [Double Ratchet Algorithm](https://en.wikipedia.org/wiki/D
- `clang` (version >= 3.6), or
- `msvc` (version >= 14.0)
* Build tools:
- `cmake` (version >= 3.11)
- `cmake` (version >= 3.12)
- `python` (version >= 2.7)
- `python-protobuf`

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Lead Maintainer: Virgil Security Inc. <[email protected]>

cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(virgil_crypto_c_benchmarks VERSION ${virgil_crypto_VERSION} LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/foundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Lead Maintainer: Virgil Security Inc. <[email protected]>

cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.12)
project(virgil_crypto_c_foundation_benchmarks VERSION ${virgil_crypto_c_benchmarks_VERSION} LANGUAGES CXX)

add_subdirectory(data)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/foundation/data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Lead Maintainer: Virgil Security Inc. <[email protected]>

cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(benchmark_data_foundation VERSION ${virgil_crypto_c_foundation_benchmarks_VERSION} LANGUAGES C)

Expand Down
2 changes: 1 addition & 1 deletion cmake/find_host_utils.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2015-2017 Virgil Security Inc.
# Copyright (C) 2015-2019 Virgil Security, Inc.
#
# All rights reserved.
#
Expand Down
1 change: 1 addition & 0 deletions codegen/c_features.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function _F21_create_require (require, destination)

else
.feature = _F21_derive_require_name (my.require)
.is_optional = my.require.is_optional ?
endfor
endnew
endfunction
Expand Down
37 changes: 22 additions & 15 deletions codegen/class.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -297,23 +297,30 @@ endfunction
function class_create_feature (class, project, destination)
check_arguments (my, "class, project, destination", my)

new feature to my.destination
. = "Enable class '$(my.class.name)'."
.name = my.class.name
.project = my.project.name
my.class_feature = my.class->feature(feature.name = my.class.name) ?
if !defined(my.class_feature)
new feature to my.destination
.name = my.class.name
my.class_feature = feature
endnew
else
my.class_feature = item_copy_to(my.class_feature, my.destination)
endif
my.class_feature. ?= "Enable class '$(my.class.name)'."
my.class_feature.project = my.project.name

for my.class.require where defined (0.feature)
copy require to feature
endfor
for my.class.require where defined (0.feature)
copy require to my.class_feature
endfor

for my.class.require where has_one_of_attribute (require, "class, interface, impl")
new require to feature
.feature = -1.class ? -1.interface ? -1.impl
.scope = -1.scope ?
.project = -1.project ?
endnew
endfor
endnew
for my.class.require where has_one_of_attribute (require, "class, interface, impl")
new require to my.class_feature
.feature = -1.class ? -1.interface ? -1.impl
.scope = -1.scope ?
.project = -1.project ?
.is_optional = -1.is_optional ?
endnew
endfor
endfunction

# ---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion codegen/cmake_files_codegen.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function cmake_generate_features (source, license)


for c_features.c_feature where count (c_feature.c_require)
for c_feature.c_require
for c_feature.c_require where is_false(c_require.is_optional)
newline ()

for c_require.c_alternative
Expand Down
35 changes: 18 additions & 17 deletions codegen/features.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ function _D25_resolve_attr_default (item, parent)
check_arguments (my, "item", my)

my.item.default ?= "on"

my.valid_defaults = "on, off"

if ! string_in (my.item.default, my.valid_defaults)
my.component_dump = component_dump (my.item)

echo_fatal ("Invalid item attribute 'default' '$(my.component_dump:)'. " + \
"Expected {$(my.valid_defaults)}", my)
endif
endfunction

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -214,10 +205,15 @@ function features_list_update_from_library (features_list, library)
.path = my.library.path
.library = my.library.name

new feature to features
. = "Enable build of the '$(my.library.name:)' library"
.name = "library"
endnew
my.library_feature = my.library->feature(feature.name = "library") ?
if !defined(my.library_feature)
new feature to features
.name = "library"
my.library_feature = feature
endnew
endif
my.library_feature. ?= "Enable build of the '$(my.library.name:)' library"


for my.library.feature
copy feature to features
Expand Down Expand Up @@ -250,10 +246,15 @@ function features_list_update_from_project (features_list, project)
.project = my.project.name
.cmake_target = my.project.cmake_target

new feature to features
. = "Enable build of the '$(my.project.name:)' library"
.name = "library"
endnew

my.library_feature = my.project->feature(feature.name = "library") ?
if !defined(my.library_feature)
new feature to features
.name = "library"
my.library_feature = feature
endnew
endif
my.library_feature. ?= "Enable build of the '$(my.project.name:)' library"

for my.project.feature
copy feature to features
Expand Down
Loading