1135 Commits

Author SHA1 Message Date
Jason Goertzen
636d9725b2
Adding armv8 crypto extensions to SHA256/224 (#1052)
* sha256 cyrpto extensions seem to work, want to add neon version if crypto isn't available

* Added additional files to CMakeLists.txt

* SHA256 armv8 implementation is done. Still need to double check that everything is happen when complied on a non-arm system, and an arm system that doesn't have the cyrpto extensions

* Updated sha2 CMakeList.txt to resolve issue compiling on aws ARM system

* I think I have resolved the aws/rock1 build issues

* Removed an resolved TODO comment

* Fixed a cmake build bug when OQS_DIST_BUILD is "ON"

* Made CMAKE sha2 build more flexible when using OQS_DIST_BUILD

* Signature datasheets (#1053).

* Fixed a typo in the common CMakeLists.txt file related to SHA2

* Add runtime feature detection for macOS on Apple Silicon

* Changed macos_feature_detection to return unsigned int to fix warnings, and updated some uint32_t to const uint32_t to fix warnings on macOS on Apple silicon

Co-authored-by: Goutam Tamvada <xvzcf@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2021-07-29 20:09:47 -04:00
Karolin Varner
e0c7f33689
Fixes necessary to compile on raspberry pi 4 with clang (#1055)
* Make compile on raspberry pi 4 with clang

* asm -> __asm__

* Prettyprint

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2021-07-29 13:25:52 -04:00
Goutam Tamvada
6315abe19e
Signature datasheets (#1053). 2021-07-23 14:35:24 -04:00
Goutam Tamvada
760b3886fa
New datasheets (#1030)
* Documentation YAML files and automatic markdown generation for KEMS.

* Escape underscores

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2021-07-15 13:50:46 -04:00
Douglas Stebila
f52f908715 liboqs 0.7.0-rc1 2021-07-14 11:13:01 -04:00
Vitaly Chikunov
9c2b485cd0
Support for x86 and ppc64le architectures (#1037)
* x86: Optimistic port to x86

No processor extensions support.
Tests are passed.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>

* ppc64le: Optimistic port to ppc64le

No (AltiVec/VSX) processor extensions support is detected.
Tests are passed.

Note that `secure_cmp32` may require additional treatment for this
architecture.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2021-07-09 10:30:20 -04:00
Basil Hess
568a9df20c
Suppression file update for Dilithium (#1048)
Simple TravisCI integration for ppc64le
2021-07-08 08:36:40 +02:00
Douglas Stebila
9b4d4bb683
Change CMake files to support macos on Apple Silicon (#1034) 2021-07-05 11:55:39 -04:00
Douglas Stebila
1009721f15
Update Doxygen file (#1046)
Fixes #1029
2021-07-05 17:23:52 +02:00
Christian Paquin
c4122ecfea
Added macOS formatting rules for exported arm assembly symbols (#1042)
* Added macOS formatting rules for exported arm assembly symbols

* namespaced assembly exports

* Added alignment instruction in ARM asm files.
2021-07-02 14:12:50 -04:00
Michael Baentsch
706cc898c7
removing BIKE R2 from README (#1047) 2021-07-01 17:48:49 +02:00
Michael Baentsch
f3caccff9e
Removing default algs (#1044)
* change to retain OQS_MINIMAL_BUILD logic

* remove default alg support
2021-07-01 11:42:12 +02:00
John Schanck
21dcba4eae
Remove old versions of BIKE (#1045)
* oqsconfig.h: CLMUL definitions

* BIKE: unhook old versions from OQS

* BIKE: improve cpu_features.h

* BIKE: update CMakeLists.txt

* BIKE: support dist build on compilers without -mvpclmulqdq

* BIKE: compile with -Wno-missing-braces -Wno-missing-field-initializers

* Manually update algorithm count
2021-07-01 07:05:49 +02:00
Christian Paquin
c071b01272
Sike June updates (#1028)
* Integrated SIKE's latest commits.

* Integrated SIKE June 2021 commits, part 2

* Reverted back asm macro guards
2021-06-29 15:08:45 -04:00
Michael Baentsch
a822f0e62d
PQClean / NTRU Prime update (#1039)
* updating upstream algorithms

* update Kyber upstream ref

* adding compat.h

* add SPDX

* move to PQClean shims

* alpine-breaking gcc feature check changed

* remove error case as per PR review comment
2021-06-29 15:05:34 -04:00
John Schanck
d9fb4e0e81
Add OQS_PERMIT_UNSUPPORTED_ARCHITECTURE flag (#1021)
* Add OQS_PERMIT_UNSUPPORTED_ARCHITECTURE flag

* Add warning for unsupported architecture

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2021-06-24 20:57:34 -04:00
Geovandro Pereira
7a5097dbd4
Make BIKE compile for different CMake versions when AVX512 is used (#1033) 2021-06-24 10:22:57 -04:00
Goutam Tamvada
44cbde234a
Fixed downstream triggering bug in CircleCI config and also refactored the config.yml (#1027) 2021-06-22 11:17:31 -04:00
John Schanck
bf0e388545
Remove Picnic's compatibility layer (#1023)
* Add OQS_MEM_secure_bcmp

* Replace picnic compat.h with OQS shims

* Remove exceptions from test_namespace
2021-06-17 16:07:06 -04:00
dkostic
17d3e0bab5
Import BIKE Round-3 Additional code (#1013)
* Import BIKE Round-3 Additional code

* astyle fix

* Fix for the shared build

* Added KATs sha256sum for BIKE-L1 and BIKE-L3

* Add check if the compiler supports VPCLMUL flag (some older ones don't)

* Disable BIKE build on 32-bit ARM

* Addressing comments on the PR

Co-authored-by: Dusan Kostic <dkostic@amazon.com>
2021-06-17 11:17:22 -04:00
John Schanck
dc0a14445e
CMake: Do not set march or mcpu when OQS_OPT_TARGET=generic (#1017) 2021-06-14 12:39:12 -04:00
Douglas Stebila
00d6c7d541 liboqs 0.6.0 0.6.0 2021-06-08 10:42:31 -04:00
Douglas Stebila
08ac2b1ced liobqs 0.6.0-rc3 0.6.0-rc3 2021-06-06 19:35:22 +00:00
Douglas Stebila
70eae32dd5
Quick fix to Kyber768-90s NIST level (#1014) 2021-06-05 07:08:07 +02:00
Douglas Stebila
2e7f65752b Add astyle to Ubuntu install instructions [skip ci] 2021-06-04 17:45:35 +00:00
Douglas Stebila
f8e339dcae liboqs 0.6.0 RC2 0.6.0-rc2 2021-06-02 21:04:37 -04:00
John Schanck
bd23977818
tests/constant_time: update SIKE suppression files [skip ci] (#1009) 2021-06-01 17:50:17 -04:00
Douglas Stebila
8d7e8f5579
Consistent type in KEM decaps API (#1004) (#1005)
* Consistent type in KEM decaps API (#1004)

* uint8_t in non-PQClean KEM APIs

* uint8_t in PQCleam KEM APIs

* Additional uint8_t tweaks in PQClean KEM APIs

Co-authored-by: Sebastian <sebastianv89@users.noreply.github.com>
2021-06-01 17:49:32 -04:00
Christian Paquin
63ffa9854a
Integrated sike compressed elligator fix. (#1008)
* Integrated sike compressed elligator fix.

* Updated SIKE's github commit ref
2021-06-01 14:30:13 -04:00
Michael Baentsch
35489ee823
ARM64 via CCI machine (#1010)
* activating ARM64 machine use for CCI
2021-06-01 07:21:37 +02:00
Michael Baentsch
3a56677a93
fix for #865 (#1002) 2021-05-21 15:52:03 -04:00
Michael Baentsch
92e6418b35
BIKE and Picnic enablement for cygwin (#1001)
* BIKE and Picnic enablement for cygwin

* no doxygen support for cygwin
2021-05-18 08:17:05 +02:00
John Schanck
530d7059b2
sha3: respect OQS_ENABLE_SHA3_xkcp_low_avx2=OFF in CMakeLists.txt (#999) 2021-05-11 21:09:34 -04:00
Michael Baentsch
f42b8b0033
change MSVC compile opts to openssl integration (#996) 2021-05-11 10:38:51 -04:00
Michael Baentsch
e4568033cc
documentation consolidation (#998) 2021-05-11 10:30:31 -04:00
John Schanck
1b25f45f35
tests/constant_time: update passes file for AVX2 impl of HQC [skip ci] (#994) 2021-05-06 19:51:20 -04:00
John Schanck
83af71078b
Add canaries around malloc'd regions in test_sig (#993)
* test_sig: Add canaries around malloc'd regions

* test_sig/kem: disable canary checks in test_constant_time

* test_kem: test canaries after testing malformed ciphertext
2021-05-06 19:50:53 -04:00
John Schanck
8981b7f337
tests/constant_time: SIKE issues are resolved (#987) 2021-05-06 10:52:35 -04:00
John Schanck
9e2044ff2d
Pull latest HQC-192 from PQClean (#992) 2021-05-06 10:18:02 -04:00
Sofía Celi
8ae15e6a88
astyle is needed to be installed on MacOS for run_tests to succeed (#991) 2021-05-05 10:25:17 -04:00
Thom Wiggers
1923b82a3b
Test without alignment (#986)
* Fix potential NULL dereference in fix_test_kem

* Test without aligned pk, sk

This changes the test_kem.c functions like those in PQClean:
* also prefix magic bytes for checking for out-of-bounds access
* use odd numbers for breaking alignment

Includes #985

* Fix style
2021-05-04 20:27:07 -04:00
Michael Baentsch
8f8bb44c2f
output CPU feature CT/RT distinction (#984) 2021-05-03 15:03:23 +02:00
Christian Paquin
b1d07278d1
SIKE March 2021 bug fix (#981)
* SIKE March 2021 bug fix

* Reverted typo.
2021-04-29 14:35:57 -04:00
Douglas Stebila
5f28a2af5d liboqs 0.6.0-rc1 0.6.0-rc1 2021-04-25 16:43:56 -04:00
John Schanck
a89e3ac581
Improve random sources when not using OpenSSL (#976)
* rand.c: request at most 256 bytes per getentropy call

* CMake: Set OQS_HAVE_GETENTROPY

* rand.c: fopen/fread error handling

* rand.c: redundant test to silence warn_unused_result

* CMake: include CheckSymbolExists
2021-04-20 19:48:24 -04:00
jyao1
e48bc41c4f
Enable liboqs build in UEFI/EDKII. (#975)
UEFI/EDKII used openssl as crypto lib with OPENSSL_SYS_UEFI.

This patch adds OQS_SYS_UEFI macro in liboqs to indicate special build in UEFI/EDKII.
With this patch, we can start building liboqs in UEFI/EDKII.

For algorithm specific patches, we will submit one by one later.

Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
2021-04-20 08:55:31 -04:00
Douglas Stebila
a04ef8d3ca
Switch AES C implementation to PQClean's (#971)
* Switch AES C implementation to PQClean's

* Tweaks to AES C implementation
2021-04-19 15:55:25 -04:00
John Schanck
f1673911c3
KeccakP-1600times4/avx2: Switch a memmove to a memcpy for musl libc (#972) 2021-04-18 06:55:39 +02:00
Douglas Stebila
7b56fa83f8
Remove AES decryption functions (#970)
* added OQS_NO_AESDEC define

* disable _dec only subroutines

* further non-openssl _dec subroutines disabled

* Remove decryption subroutines

* Remove further AES decryption code

* Forgot one function

Co-authored-by: Michael <57787676+baentsch@users.noreply.github.com>
2021-04-15 09:50:28 -04:00
Douglas Stebila
008ba89dc4
Don't do feature detection inside a tight loop (#969)
* Don't do feature detection inside a tight loop

* Prettyprint
2021-04-14 16:57:28 -04:00