1292 Commits

Author SHA1 Message Date
Michael Baentsch
da0dd47c5d
Config update (#1361)
* update default configs docs and DIST_BUILD

* toggle OQS_DIST_BUILD CCI tests

* setting ARM64 default for CMAKE_ARGS
2023-01-16 07:08:56 +01:00
Michael Baentsch
fe3cb02cb1
NIST std algs list selection enablement (#1355)
* std/r4/all algs enablement

* Switch example to use Kyber-768.

* std algs as option only

Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-01-14 10:01:29 +01:00
Douglas Stebila
aed3b4965f
Build Doxygen docs in whatever the CMake build directory is (#1357)
* Build Doxygen docs in whatever the CMake build directory is

Fixes #1341.

* Missing Doxygen build directory in CI
2023-01-13 16:58:03 -05:00
Douglas Stebila
f272232c86
Build dump_alg_info in tests (#1353)
Fixes #1334
2023-01-12 13:03:08 -05:00
Douglas Stebila
f30cae996c
Fix Doxygen Markdown failures (#1349)
* Fix Doxygen Markdown failures

Fixes #1332

* Fix another Doxygen Markdown failure
2023-01-11 18:32:26 -05:00
Basil Hess
63d4a00d07
Adds CBOM for liboqs (#1337)
* Adds CBOM:
- CBOM generator: update_cbom.py
- CBOM: cbom.json
- CBOM schema validation: validate_cbom.sh
- CBOM schema validation added to github actions

Adds oqs_alg to docs yml.
Corrects common crypto sources in Kyber and Dilithium docs.

* - removes forward references to OpenSSL OIDs
- move cbom to docs dir
- move update and validate cbom files to scripts dir
- update copy_from_upstream: scripts runs update_cbom.py (after update_docs_from_yaml.py)
2023-01-11 18:32:08 -05:00
Michael Baentsch
238eef129c
llvm15 update (#1350)
Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2023-01-11 16:06:52 -05:00
Michael Baentsch
cdf709864f
Revert "Enable algorithm filtering (#1333)" (#1351)
This reverts commit 9ba752ea9b0b4db375e21d2b27a16ed1de30e2be.
2023-01-11 09:05:49 -05:00
Michael Baentsch
9ba752ea9b
Enable algorithm filtering (#1333)
* std/r4/all algs enablement

* add documentation

* make doxygen happy

* Revert "make doxygen happy"

This reverts commit 9aedf2a7e651e0a686b2c5cade38db9af1e4b988.

* fall back to doxygen 1.9.2

* update github workflow to new filter naming

* adding appveyor testing for new OQS_ALGS_ENABLED option

* don't enable disabled vars

* add empty input test

* documenting focus on standard algs

* correct alg name typo

* Update README.md

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>

* Switch example to use Kyber-768.

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
Co-authored-by: Douglas Stebila <dstebila@uwaterloo.ca>
2023-01-10 20:29:24 -05:00
Basil Hess
12ad5be27f
fix: initialize context after reset in ossl_sha3x4 (#1339)
* fix: initialize context after reset in ossl_sha3x4

* add Github Actions config for openssl-all
2023-01-04 16:21:06 +01:00
Jeevesh Rishi Dindyal (Sarvesh)
2e42595804
Add ntruprime (#1328)
* Add back sntrup761
2022-12-22 07:37:44 +01:00
Goutam Tamvada
a7e1b8a32f
Removed NTRU. (#1335) 2022-12-15 12:19:29 -05:00
Mark Albert
d577d0b4e9
add valgrind option (#1327) 2022-12-07 07:26:46 +01:00
Goutam Tamvada
f5d96cab5c
Removed SABER. (#1326) 2022-12-01 14:04:08 -05:00
Goutam Tamvada
c50d38e5a8
Removed NTRU-Prime. (#1325) 2022-11-29 07:31:53 +01:00
Goutam Tamvada
fac5a818ed
Removed the Picnic signature scheme. (#1323) 2022-11-28 15:29:10 -05:00
Goutam Tamvada
203c9c269b
Removed the rainbow signature scheme (#1321). 2022-11-28 11:34:59 -05:00
Basil Hess
2e2ddb4e04
Update Kyber and Dilithium from upstream (#1316) 2022-11-23 15:15:27 -05:00
Michael Baentsch
e9cd9a5c55
automatically activate USE_RASPBERRY_PI define (#1313)
* automatically activate USE_RASPERRY_PI define

* prefix RASPBERRY_PI define with OQS_
2022-11-18 08:12:19 +01:00
Jason Goertzen
c520cdb871
Fixing OQS ARM inconsistencies (#1307)
* Renamed sha2 C_OR_NI to C_OR_ARM since we only select between C and ARM

* Updated AES C_OR_NI_OR_ARM's formatting and logic

* Renamed sha2_ni.c to sha2_armv8.c and updated CMakeLists.txt to fix build issues with arm optimized AES linking

* Fixed a feature detection logic issue

* Found an issue when compiling a distributed version

* Only apply -march=armv8-a+crypto to arm builds

* updated some naming
2022-11-15 16:47:36 -05:00
John Schanck
f88e6237c5
Integer overflow leading to incorrect computation of sha3 (#1312)
Suppose a user of the incremental SHA3 API absorbs 10 bytes, and then
absorbs 2^64 - 10 bytes. At the beginning of the second
`keccak_inc_absorb` call, the 25th element of the Keccak state is equal
to 10, and there is a uint64_t overflow in
```
if (s[25] && mlen + s[25] >= r)
```
which causes the branch to be skipped. Later code assumes that mlen >= r
implies that s[25] = 0, and calls
```
(*Keccak_AddBytes_ptr)(s, m, 0, r);
```
with third argument 0 instead of s[25]. This call modifies the wrong
elements of the Keccak state, which leads to an incorrect result.

I went looking for bugs of this form because of CVE-2022-37454, but this
one is not a security concern. It is also largely theoretical since it
involves processing close to 2^64 bytes.
2022-10-26 09:05:05 +02:00
Michael Baentsch
222374e067
addressing sig length questions (#1306)
* addressing sig length questions

Co-authored-by: Douglas Stebila <dstebila@users.noreply.github.com>
2022-09-15 06:49:03 +02:00
Michael Baentsch
46deaac9a9
update version string indicating dev status (#1305) 2022-09-14 17:17:09 +02:00
Sebastian Ramacher
8ac8b1c5ab
Fallback code for aligned_alloc and use of explicit_bzero (#1300)
* Check if aligned_alloc or memalign variants are available and use them

* Use explicit_bzero if available

* Check for memset_s
2022-09-08 07:10:28 +02:00
Michael Baentsch
489aa7eb59
ARM32 gcc12 build workaround (#1297)
* add ARM32 gcc compile option workaround

* add no-ipa-modref only in gcc11 and higher
2022-09-07 19:21:27 +02:00
Sebastian Ramacher
930f78d066
Fix typo in Picnic's NEON detection (#1298)
This change addresses the Picnic part of #1296.
2022-09-07 19:03:29 +02:00
Sebastian Ramacher
9ee96d803e
Ensure build without an executable stack (fixes #1285) (#1294)
* Ensure build without an executable stack (fixes #1285)

Until it is clear why the shared library on mips64el and hppa is built
with the executable bit set for the stack, build with both
`-Wa,--noexecstack` (for the assembler) and `-Wl,-z,--noexecstack` (for
the linker).

* Check if compiler/linker support flags for noexecstack before using them

* Add a warning if unable to check for support
2022-08-31 06:41:28 +02:00
thb@sb
c5b8cfe478
Solve '-Wstrict-prototypes' for clang >= 15.0 (#1293)
* Solve '-Wstrict-prototypes'

Manual changes are applied to the following algorithms only:

 * Bike
 * Frodo
 * Picnic

* Add prototype for implementation of `OQS_SIG_alg_count`

* Add prototype for implementation of `OQS_KEM_alg_count`

* Run `copy_from_upstream.py`

Now, the constructors have a full prototype. It compiles with clang 16.0
2022-08-30 11:20:05 +02:00
thb@sb
ff09345f5f
Add missing requirements to the requirements.txt (#1295)
The script `scripts/update_docs_from_yaml.py` is using the python package
`tabulate`. It is missing from the `requirements.txt` file.

This PR adds it the the `requirements.txt` file.
2022-08-26 07:07:28 +02:00
Douglas Stebila
ea44f391fd 0.7.2 0.7.2 2022-08-21 15:54:09 -04:00
Douglas Stebila
da6e54103a 0.7.2-rc2 0.7.2-rc2 2022-08-10 13:26:37 -04:00
Sebastian Ramacher
542b2d0b6b
Cover SHA3/SHAKE-implementation specific code paths in Picnic suppression files (#1286) 2022-08-10 10:06:31 -04:00
Michael Baentsch
d3c10161e3
add warning about HQC [skip ci] (#1284) 2022-08-09 11:26:41 -04:00
Douglas Stebila
b8c9c9f299
Update release notes (#1281) 2022-08-09 11:26:05 -04:00
Sebastian Ramacher
0511af68d7
Update to Picnic 3.0.17 (#1280)
* Update to Picnic 3.0.17

* Added valgrind constant time execptions for picnic

Co-authored-by: Christian Paquin <cpaquin@microsoft.com>
2022-08-08 17:02:00 +02:00
Douglas Stebila
42f36c2a1b
Add option to all pytests to skip particular algorithms (#1282)
* Add SKIP_ALGS option to all pytests to skip particular algorithms
2022-08-07 06:36:45 +02:00
Michael Baentsch
84fde26ed2
Fixup dilithium-avx2 valgrind test file (#1283) 2022-08-06 17:43:24 -04:00
Douglas Stebila
3cf9849cc4 0.7.2-rc1 0.7.2-rc1 2022-08-03 17:07:33 -04:00
Michael Baentsch
91bfca9bdd
Add library version retrieval function (#1273) 2022-08-03 13:32:11 -04:00
Vlad Gheorghiu
33738d9354
Update CODEOWNERS (#1274)
typo
2022-08-03 13:29:26 -04:00
Michael Baentsch
fe08f69c6e
Fix FreeBSD runtime ARM CPU feature detection (#1267) 2022-08-03 10:20:41 -04:00
Douglas Stebila
1e47e14556
Remove SIDH and SIKE (#1272)
Due to https://eprint.iacr.org/2022/975.

Fixes #1268.
2022-08-03 10:19:28 -04:00
Sebastian Ramacher
af76ca3b1f
Update to Picnic 3.0.16 (fixes #1253) (#1271)
This update fixes alignment issues when built with MSVC.
2022-08-02 09:43:21 -04:00
Michael Baentsch
4abd522492
update PR template to include oqs-provider (OSSL dependency) [skip ci] (#1269) 2022-08-01 19:58:53 -04:00
Christian Paquin
fb0edb7f85
Updated to SIKE v3.5.1 (#1231)
* Updated to SIKE v3.5.1

* Prettyprint

* Newline at the end of the file (to avoid error from -Wnewline-eof)

* Wrap logical not check in parenthesis, to avoid error from -Wlogical-not-parentheses

* Added empty functions to avoid unused errors on macOS

* Adding extra empty line at the end of assembly files to avoid newline-eof errors

* Fixing missing newlines at the end of the .S files

* Initialized some sike values

* Initialized a sike value

* Small edits

* Initialized some more SIKE variables

* sike cmake update

* include for windows

Co-authored-by: Basil Hess <bhe@zurich.ibm.com>
2022-07-30 08:40:05 -04:00
Douglas Stebila
478ccba970
Remove Rainbow level 1 (#1263)
Fixes #1260
2022-07-27 15:12:16 -04:00
Vitalio
2c687b1220
pqclean_hqc: Fix build on GCC-12 (#1254)
Make index variable `i` immediate by unrolling the loop.

Link: https://github.com/open-quantum-safe/liboqs/issues/1244
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-07-25 16:22:02 -04:00
HY Chang(splasky)
664c6f331d
Fix memory leak detected by valgrind (#1250) 2022-07-17 15:35:35 -04:00
Basil Hess
e88cc366b5
Sync Kyber with upstream, enable Scan-Build with Kyber (#1252) 2022-07-11 11:53:20 +02:00
yin19941005
8ec55171b0
docs: Add valgrind as test dependencies in README.md (#1251)
* docs: add valgrind as dependencies in readme

Co-authored-by: Michael Leung <michael.leung@bloombase.com>
2022-07-08 08:50:41 +02:00