258 Commits

Author SHA1 Message Date
Basil Hess
9cf6171007
Dilithium 3.1 update, partially autogenerating docs (#923)
* Updates to Dilithium 3.1 (randomized)

* Update dilithium.md, point to pqcrystals-repo

* Partially autogenerating algorithm docs
2021-02-24 06:39:08 +01:00
Michael Baentsch
6040f559ec
Update Falcon & McEliece (adding AVX) (#920)
* fixing copy_from_upstream issues (>2 optimized implementations)

* adding mceliece-avx & falcon

* alg doc added
2021-02-23 16:45:56 +01:00
Basil Hess
405654c6ec
Kyber768 ref dependencies (#899) (#905) 2021-02-10 14:07:57 +01:00
Basil Hess
bd4d09da75
Sync upstream with copy_from_upstram / pqcrystals pull (#891)
* Point Kyber and Dilithium to pqcrystals-repo.

* Pulls Kyber and Dilithium from PQCrystals using copy_from_upstream

* Dilithium Round 3
* Kyber round 3
* Updates Dilithium Round 3 KAT

* Updates kyber.md and dilithium.md (manual changes after running copy_from_upstream)
2021-02-04 15:46:45 +01:00
Basil Hess
fc35e09a14
Update copy_from_pqclean / copy_from_upstream (#883)
* Update copy_from_pqclean / copy_from_upstream (#880)

* Renames copy_from_pqclean to copy_from_upstream.

* Adds 'upstreams' field to copy_from_upstream.yml, allowing to specify upstream repositories, branches and commits.

* Modifies "copy" command in copy_from_upstream: sources are pulled from specified git-repositories. Implementation folders in $LIBOQS_DIR/src will be prefixed with the upstream-name.

* Adds "verify" command in copy_from_upstream: Implementations in $LIBOQS_DIR/src are compared with expected upstream versions.

* Prepares for copying pqclean, pqcrystals-kyber and pqcrystals-dilithium from upstream.

* Updates copy_from_upstream to process common dependencies from an upstream.

* Adds reminder text to manually update algorithm docs .md files after copying
2021-02-03 18:43:02 +01:00
Douglas Stebila
85597bbc6c
Rainbow Round 3 (#867) 2021-01-04 09:25:35 -05:00
Goutam Tamvada
dd739fc8f2
OQS_BUILD_PORTABLE -> OQS_PORTABLE_BUILD and other refactoring. (#864)
* OQS_BUILD_PORTABLE -> OQS_PORTABLE_BUILD and associated changes.

* subprocess.run() -> subprocess.Popen() + subprocess.communicate().

* Changed temporary storage location used for memory benchmarking.
2020-12-09 15:03:57 -05:00
Douglas Stebila
1ad950ac00
Sync with PQClean (#851)
* Remove HQC round 2

* Sync with PQClean

3c8be3cb1f8ca0953f2df44ea665f118efb468d6

* Add HQC from PQClean
2020-11-24 10:04:49 -05:00
Douglas Stebila
46693cf93a
Add NTRU-Prime from PQClean (#848) 2020-11-03 13:36:24 -05:00
Douglas Stebila
1a923c79e0
Sync with PQClean (#846)
* Change BMI1 and add PCLMUL

* Copy from PQClean

Commit b4078aae55f9efbc7b3ab7b3c702be376f7a7987, excluding HQC

* Update algorithm datasheets

* Prettyprint

* Update version to 0.5.0-dev
2020-10-29 19:46:39 -04:00
Michael Baentsch
993c1d757b
selectively exclude NOT_READY algorithms from copy_from_pyclean (#841) 2020-10-28 12:53:40 -04:00
Goutam Tamvada
3f89b987c7
Refactored CI. (#829) 2020-09-24 11:16:23 -04:00
Douglas Stebila
226b4637d9
Remove non-Round 3 algorithms (NewHope, ThreeBears, MQDSS, qTesla) (#810) 2020-08-17 13:25:08 -04:00
Douglas Stebila
adac989932
Added HQC from PQClean. (#805) 2020-08-04 13:22:45 -04:00
Douglas Stebila
aa7f1dfa3d
Cleanup PQClean implementations (#803)
* Sync with PQClean commit 90630db2ebada4bacceb5331b0a1a9a356ba65b9

* Delete duplicate implementations due to underscore bug; add MQDSS AVX2

* Delete more duplicate PQClean implementations
2020-08-04 11:54:25 -04:00
Douglas Stebila
ed1baf3d27 Change to 0.4.0-dev and some cleanup 2020-07-24 20:38:46 -04:00
Michael Baentsch
b24a046495
Enable automated upstream imports (#789) 2020-07-16 15:36:58 +02:00
Michael Baentsch
5f277fc019
KAT testing using hashes (#784)
* removed full-size KATs

* corrected qTesla avx2 KAT selection

* Fixed macOS build warnings. (#782)

* removed full-size KATs

* corrected qTesla avx2 KAT selection

* KATs as dicts; simplified & corrected logic
2020-07-08 10:40:50 -04:00
Douglas Stebila
ffae460a71
Remove LEDAcrypt v2.1 temporarily (#756)
Due to attack in https://eprint.iacr.org/2020/455
2020-05-26 14:11:11 -04:00
Douglas Stebila
6e0b0d79a9
Add SPDX-License-Identifier headers (#749)
* Add SPDX-License-Identifier in src/common

* Add SPDX-License-Identifier in FrodoKEM

* Add SPDX-License-Identifier in SIKE

* Add SPDX-License-Identifier in BIKE

* Add SPDX-License-Identifier in OQS headers

* Add SPDX-License-Identifier in files generated during copy-from-pqclean

* Add SPDX-License-Identifier in Picnic

* Add SPDX-License-Identifier in qTesla

* Add SPDX-License-Identifier in CMake files

* Update license info in README

* Add SPDX-License-Identifier in scripts

* Add SPDX-License-Info to CMakeLists

* Add SPDX-License-Info in tests

* Add SPDX-License-Info to various files

* Prettyprint

* Add test for SPDX-License-Identifier headers

* Updated license identifiers for CPU extension detection code.

* Use conjunction for SPDX in file with two licenses

Co-authored-by: xvzcf <xvzcf@users.noreply.github.com>
2020-05-12 11:45:37 -04:00
Douglas Stebila
3bad81851f
Add AVX2 and AESNI versions of SPHINCS+ (#736)
* Add AVX2 and AESNI versions of SPHINCS+

Also remove all of the dead code that was included (probably due to
a name format change sometime)

* Don't include empty operating_system matcher

* Rerun copy_from_pqclean

Co-authored-by: Thom Wiggers <thom@thomwiggers.nl>
2020-04-27 21:22:38 -04:00
xvzcf
faa7589e6f
Refactoring (#730)
* Refactored build and templating scripts.

* Added check for OQS_PORTABLE_BUILD to Frodo.

* Removed security_strength parameter from OQS_randombytes_nist_kat_init.
2020-04-23 15:34:36 -04:00
xvzcf
8950275409
Removed non-standard CMake build types and fixed other bugs. (#726)
* Removed non-standard CMake build types and introduced new variables to customize the build.

* Added handling for new build variables to all KEMS and signatures and updated CI.

* Added clang-9 test to CI.
2020-04-16 13:53:04 -04:00
xvzcf
722ca648a1
Overhauled compiler-time CPU-extension detection. (#713)
Refactored .CMake/alg_support.cmake, and kem/ and sig/ CMakeLists.txt files.

Refactored copy_from_pqclean/ templating.

Added custom x64 CPU extension detection code and removed cpu_features.

Removed duplicate Kyber source directories.
2020-04-14 07:58:41 +02:00
Douglas Stebila
94e37fed6a
Cleanup a few quirks in copy_from_pqclean (#708)
* Delete accidentally added object files

* Sort filenames when generating CMakeLists

So that execution of copy_from_pqclean on different systems doesn't 
generate different outputs each time
2020-04-07 13:38:24 -04:00
Douglas Stebila
854f074808
Fix AddressSanitizer issues and enable in nightly runs (#707)
* Fix buffer overrun on Falcon KATs

* Fix memory leak in Picnic2

* Enable address sanitizer in nightly builds
2020-04-07 13:38:02 -04:00
Michael Baentsch
c847efab8f addresses issue #691 2020-04-06 14:51:54 +02:00
Douglas Stebila
c254fddf18
Update AES key schedule API to match PQClean (#701)
* Fix Falcon kat_sig template to match generated code

* Change OQS AES API to match PQClean's

https://github.com/PQClean/PQClean/pull/279

* Change callers to OQS AES API

* copy_from_pqclean commit db0d5800c5c8a32df63414297671cd418ddc3129

* Fix missing argument

* Fix memory leak
2020-04-04 17:10:12 +02:00
xvzcf
7c083329f3
Enabled more Clang warning flags. (#663) 2020-03-16 15:33:14 -04:00
Douglas Stebila
4c3016f43e
Add Rainbow from PQClean (#662)
* Add Rainbow from PQClean

* Adapt CircleCI config to handle larger number of local files
2020-03-15 20:25:42 -04:00
Douglas Stebila
eaec7972ba
Add Classic McEliece from PQClean (#661)
* Add Classic McEliece from PQClean

* Enlarge stack size on Windows

* Enlarge stack size with Mingw/Cygwin
2020-03-15 08:54:55 -04:00
Douglas Stebila
795c1b7932
Add Falcon from PQClean (#660)
* More cleanup after replaced dashes in filenames

* Add Falcon from PQClean and sync with latest PQClean commits

* Try to fix type punning warning in Falcon

* Missed templating

* Formatting change
2020-03-14 10:56:42 -04:00
xvzcf
0d39a601b1
CMake refactoring. (#652)
* Overhauled the propagation of compiler flags

* Added "Dependency" CMake build type

* Removed src/common/CMakeLists.txt and src/crypto/CMakeLists.txt

* Set default build type to exclude CPU extension-based optimizations
2020-03-11 10:48:28 -04:00
Douglas Stebila
5653455ff1 Don't skip build if running in CircleCI local 2020-03-11 09:28:26 -04:00
Nick Fulton
24eb40f121
Enable cross-compilation for Android (#627)
* Update CMakeLists.txt

Prevent breaking options on Android compilation

* Create build-android.sh

Created build script for Android cross-compilation.
2020-02-29 16:05:57 -05:00
xvzcf
9c01847b21
Refactored oqsconfig.h.cmake (#628)
* Added OQS_ prefix and assigned values to all #defines in oqsconfig.h.cmake

* Updated CI and templating scripts
2020-02-24 18:04:01 -05:00
Douglas Stebila
ca66375f30
Switch from clang-format to astyle (#613)
* Initial format with astyle

* Fix templating to match

* Fix files with missing newline at EOF

* Remove old line

* Remove old .clang-format spec

* Add prettyprint target to CMake
2020-02-15 23:34:31 -05:00
xvzcf
889a03bd15
Switched build system to CMake. (#556)
* Removed cross-compilation scripts and associated Travis CI workflows.
2020-02-14 14:03:29 -05:00
Douglas Stebila
fb45816569
Add ThreeBears and LEDAcrypt from PQClean (#589)
* Add SHA256 incremental state destroy function

Following https://github.com/PQClean/PQClean/pull/247

* Add ThreeBears from PQClean

* Parallelize make test

* Add KEMs and documentation for ThreeBears

* cSHAKE shims

* Add LEDAcryptKEM from PQClean

* Undo rebase quirk

* Undo rebase quirk
2020-01-31 07:36:27 -05:00
Douglas Stebila
28f7c668f1
OSX testing on CircleCI alternative (#597)
* Use OpenSSL's EVP_MD_CTX_new and _free

* OSX testing added (only on checkin, only on master)

* Alternative way of running stuff only on recent check-ins

* OR not AND

* Build OSX on commit temporarily

* Missing checkout

* Install missing Python module on OSX

* Remove macOS on Travis

Co-authored-by: Michael Baentsch <57787676+baentsch@users.noreply.github.com>
2020-01-30 22:40:01 -05:00
Douglas Stebila
02b57bf420
Sync with PQClean as of January 22, 2020 (#584)
* Sync with PQClean as of January 22, 2020

* Add SHA256 incremental state destroy function

Following https://github.com/PQClean/PQClean/pull/247

* Fix typo

* Update PQClean commit in algorithm data sheets

[skip ci]

* Single underscore in header inclusion guards
2020-01-23 18:44:04 -05:00
Douglas Stebila
01014db7d5 Add Kyber90s variants 2019-10-23 22:07:13 -04:00
Douglas Stebila
c6e646f4c2 Sync with PQClean 2019-10-23 22:04:55 -04:00
Nir Drucker
4a2a3cd059 BIKE Round 2 (#554)
* Supporting BIKE KEM reference code

* Hiding print global symbol when VERBOSE!=2

* Supporting USE_OPENSSL + OPENSSL_DIR

* Rename functions by using a legend instead of the FN() macro

* prettyprint

* Fixing the bug caused by OpenSSL GF2m_mod_inv API change in 1.1* see https://github.com/open-quantum-safe/openssl/issues/42 for more details.

* 1) Adding BIKE-1 Level-1/3 with the FO tranformation
2) Removing BIKE-2/3
3) Removing BIKE-1 Level-5
4) Renaming BIKE-1 Level-1/3 to BIKE-1-CPA

* Fixing tests

* Fixing the CPA KATs

* Supporting AVX512

* Enable BIKE in CircleCI

* Fixing ARM script with the new BIKE names.

* Don't include OpenSSL headers when the flag --without-openssl is provided

* Fixing duplicate symbol

* Typo in symbol name

* Removing the dependency on config.h

* Addressing comments from the review

* Update KEM algorithms length [skip ci]
2019-10-17 15:21:44 -04:00
Douglas Stebila
98f83b8e81 Fix algorithm count for signature schemes 2019-09-25 14:06:23 -04:00
Christian Paquin
71568f8fa0 Re-enabled qtestla sig arm tests. 2019-09-23 10:45:17 -04:00
Christian Paquin
92fda4ab70 Added qtesla round2, replacing heuristic param sets with the provably-secure ones. 2019-09-19 13:14:39 -04:00
Douglas Stebila
d768b1f89a Update templates to match 2019-09-16 20:27:24 -04:00
Christian Paquin
36b13ec53e Integrated the SIKE v3.2 library, containing the compressed variants. 2019-09-11 16:26:40 -04:00
Douglas Stebila
4d10e865c1 Temporarily remove Rainbow 2019-08-13 17:08:10 -04:00