54 Commits

Author SHA1 Message Date
h2parson
9e964cad5b
Integrate SLH-DSA-C Library (#2175)
* copy from slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* integrate with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly list slhdsa files to include and push generated code

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format code script

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add to requirements.in

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix code conventions

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from upstream changes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add chdir to copy from slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify template

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* generate requirements.txt

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify requirments in workflows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* a

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* sort filenames in cmake file generation for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add newline at end of header file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace and fix alg info tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* update docs with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace to src files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* initialize ctx in slh

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly set little endian for windows x86

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily disable ctx signing for slh tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable kats until hashes available for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix issues in test sig mem

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily add namespaces so that slh dsa will not break test namespace

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* updates

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* formatted file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* align jinja template to astyle

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* change addrnd size

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* integrate with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly list slhdsa files to include and push generated code

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format code script

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add to requirements.in

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix code conventions

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* copy from upstream changes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add chdir to copy from slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify template

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* generate requirements.txt

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify requirments in workflows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* a

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* sort filenames in cmake file generation for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add newline at end of header file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace and fix alg info tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* update docs with copy from upstream

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* add whitespace to src files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* initialize ctx in slh

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* explicitly set little endian for windows x86

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily disable ctx signing for slh tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable kats until hashes available for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix issues in test sig mem

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* temporarily add namespaces so that slh dsa will not break test namespace

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* updates

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* formatted file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* align jinja template to astyle

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* change addrnd size

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix std algs filtering issue

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modifying windows amd toolchain file to fix endianness issue

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable leak testing on slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* disable slh dsa for arm emulated linux and zephyr tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix zephyr test skip logic

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix upstream issue with prehash naming and add variant specific nist levels

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* automatically update slh dsa yml file

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* get slh dsa md file generation working

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix naming in slh wrapper files

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* minor changes from review

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate slh dsa jobs from stfl sigs

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate slhdsa from sig stfl tests on mac and windows

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* fix macos yml format

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* modify zephyr timeout

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* re-enable some tests for slh dsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* separate leak tests

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* allow algorithm family level enablement and reconfigure slhdsa CI jobs

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* move slh dsa address sanitizer to extended tests and extend time limit to 90 minutes

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

* remove package deb from CI job, remove auto gen kat sig for slhdsa, add prime ctx step for sig testing slhdsa

Signed-off-by: h2parson <h2parson@uwaterloo.ca>

---------

Signed-off-by: h2parson <h2parson@uwaterloo.ca>
2025-08-13 15:41:47 -04:00
Aiden Fox Ivey
d4eb7a6d61
Add Nix flake, instructions, and Nix CI (#1970)
Signed-off-by: Aiden Fox Ivey <aiden@aidenfoxivey.com>
2025-03-05 14:41:38 -05:00
carson radtke
7b6d9f3326 add compile_commands.json to .gitignore
We set CMAKE_EXPORT_COMPILE_COMMANDS=ON so the compilation database is
automatically exported to the build directory. However, many language
servers expect this file to be in the project root directory, so a common
post-build step is to:

```shell
$ ln -s <build-directory>/compile_commands.json
```

This PR enables developers to do this without having to worry about
accidentally commiting a symlink file.

Signed-off-by: carson radtke <nosrac925@gmail.com>
2024-04-15 17:07:47 -07:00
Spencer Wilson
f761b06c3d
Pull Neon implementation of Falcon from PQClean (#1547)
Pull aarch64 implementation of Falcon from PQClean

---------

Co-authored-by: Duc Nguyen <ductri.nguyen@sandboxquantum.com>
2023-09-13 08:59:11 -04:00
Nigel Jones
93e784725e
README correction to docs path & additional gitignore to macos + vscode (#1503)
* Add .DS_Store (macOS) to .gitignore

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>

* Correct path to built docs in README

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>

* Add Visual Studio Code .vscode & Jetbrains .idea to .gitignore

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>

---------

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
2023-07-02 17:02:22 -04:00
Michael Baentsch
2757d16854
Enabling out-of-source build-and-test (#1091)
* removes further fixed build directory dependencies

* formatting corrected

* remove cleanup code unsuitable for win

* remove include unknown in windows

* adapt mkdir to win API
2021-09-18 16:06:07 -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
Vlad Gheorghiu
dca4706dc4
Update .gitignore (#688) 2020-03-30 10:11:57 -04:00
Vlad Gheorghiu
306d5f9747 put no-thread kems/sigs in array 2020-03-26 10:21:37 -04:00
Douglas Stebila
5653455ff1 Don't skip build if running in CircleCI local 2020-03-11 09:28:26 -04:00
xvzcf
56eece81d1
Improved CPU extension handling and updated README. (#622) 2020-02-20 11:17:25 -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
Vlad Gheorghiu
f3a1a8bc52
Update .gitignore
So we don't get bothered by cmake builds (assuming we build in 'build' as it is customarily for CMake)
2019-10-23 13:33:55 -04:00
Christian Paquin
20b9d6b841 Added .cache (created by python test framework) to .gitignore. 2019-09-25 15:08:55 -04:00
Vlad Gheorghiu
d87b820c76 Update .gitignore 2019-08-12 09:32:05 -04:00
Douglas Stebila
abea47380d Add kat_sig 2019-08-02 09:40:01 -04:00
Douglas Stebila
0bbafd9a6d Improve test output display on CircleCI 2019-08-01 16:55:22 -04:00
Douglas Stebila
ab970ae2c0 Switch KEM KAT checks to Python test suite 2019-08-01 11:53:15 -04:00
Douglas Stebila
f660424dea Add unit tests for SHA-2 API 2019-07-30 20:54:47 -04:00
Douglas Stebila
826ab71597 Ignore ctags files
[skip ci]
2019-07-17 22:47:40 -04:00
Douglas Stebila
b64de5662c More consistent naming 2019-07-01 15:20:57 -04:00
Douglas Stebila
eccb05cef4 Wording change 2019-06-28 14:48:57 -04:00
Douglas Stebila
e365ea4f14
Rename OQS' config.h to oqsconfig.h and separate autoconf variables (#437)
* Create separate public oqsconfig.h

* Fix compiler flags for BIKE additional implementation

* No BIKE reference implementation macro
2018-11-01 11:11:31 -07:00
Douglas Stebila
c409ce6e78 Mark relevant functions with OQS_API 2018-10-19 15:54:28 -04:00
Douglas Stebila
84e8dcb119
Remove old OQS_RAND object and API (#403)
* Remove old RAND API, AES-CTR and ChaCha20-based RNGs, and test_rand.

* Fix build and API for shared libraries

* Fix problems from merge with master
2018-10-09 20:36:57 -04:00
Shravan Mishra
3dbd609e92 Master rm kex (#402)
* Remove kex_ntru from master (issue #370).

* Remove KEX components (issue #372).

* Remove anything kex

* Tweaks to READMEs re: removal of KEX.
2018-10-03 21:16:49 -04:00
Christian Paquin
dc9617f81f Refactored sig api following nist-branch (issue380) (#391)
* Fixed a typo in a comment

* Refactored sig API following nist-branch (also fixes issue 380)

* Fixed Windows compilation error in sig.c.

* Added Picnic to Windows' config, and changed defaul alg to Picnic (since qTesla is not yet supported on Windows)

* Moved sig_picnic and sig_qtesla under sig directory, to harmonize with kem api

* Use different default sig alg on Windows to fix Travis back-compat tests and platform gap.

* Further changes required for OQS to be properly used by applications

* Compare OQS functions's return values to OQS error codes in sig.c.

* Fixed typos in comments.

* Replaced minimal_oqs_sig with example_sig.

* Ensure travis tests fail on error

* Add try-catch block in all-tests.sh

* Ignore example_sig

* Point global-namespace-check to .libs/liboqs.a

* More precise error handling in global-namespace-check

* Warning colours in travis tests and error handling in free-check

* Error handling in style-check

* Clean up style-check

* Removed leftover minimal_sig_oqs ref and VS projects.

* Prettyprint

* Revert clang-format version check

* Re-revert clang-format style check

* Prettyprint

* Added speed_sig to master.

* Removed superfluous extern from sig schemes .h
2018-09-26 10:01:53 -04:00
Ben Davies
ad361d95e8 Remove residual KEX sidh_msr (#369). (#385) 2018-09-21 12:58:37 +02:00
Ben Davies
3a674765e7 Fix some typos. (#378) 2018-09-18 18:04:05 +02:00
Shravan Mishra
18365bf828 Add KAT checks (#348)
* Enable KAT-check

* Add check_kats script

* Add kat kem checks

* Make pretty print happy

* Update travis

* Update .gitignore

* Add kat-check to travis

* Fix path in  kat-check

* Add -lm for kat

* Update travis.yml

* If algorithm is not enabled then kat check should not throw errors

* Prevent code duplication

* Add new kat files and modified script from nist-branch for bike

* Don't fail if algorithm not enabled

* Add rand_nist.c to VisualStudio build (manually edited VS files)

* Remove rand_nist.c from windows build

* Disable rand nist for windowa

* Fix
2018-09-04 21:36:07 -04:00
Douglas Stebila
453516248b
Move tests to a common directory (#335) 2018-08-14 17:00:29 -04:00
Nir Drucker
d3ff24cd31 Add BIKE to master and some autotools/Makefiles changes (#333)
* Supporting BIKE KEM reference code

* Hiding print global symbol when VERBOSE!=2

* Supporting USE_OPENSSL + OPENSSL_DIR

* - The file config/.gitkeep is no longer needed its purpose was to allow git having an empty folder (config).
- Moved the file acinclude.m4 to the config directory (where all the *.m4 files are).
- Added .travis/defs.sh - this file holds common definitions used by travis scripts.
- Changed style-check to first check for clang-format only then handle modified files.
- Sodium support is no longer required.
- Breaked configure.ac into sub m4 files
- Sorted the flags list.
- Changed FrodoKEM to Frodo for consistency with SIKE and BIKE. Note that it is already under the KEM directory.
- Chaned USE_* protocl flags to ENABLE_* for consistency
- Adjaust most of the makefile to have a consistent compilation flags
- Added some more compilation warnings.

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

* prettyprint

* 1) Some more Makefiles cleanup 2)Adding OQS_API defnition - hidding other symbols

* Reverting frodo renaming

* Reverting the checks order.

* Removing NEW_API.md

* pretty print

* 1)Disable bad warnings on gcc4.8/4.9 2) Disable all warnings on SIKE

* Disable the cast-align warning for now

* Documentation

* 1) Reenable BIKE error messages
2) Auto detection of AVX/AVX2/BMI features.

* Enable AVX features only on X86_64 Linux platforms

* Adding BIKE additional implementation for Linux(x86_64) and GCC

* Fixing configure.ac when OpenSSL is disabled

* Enabling BIKE's AVX512 implementation

* Wrap AVX512 code with ifdef

* Changes from code review

* Prettyprint

* Fix typo

* Rename symbol
2018-08-14 13:07:16 -04:00
Douglas Stebila
12f194cfcf Merge branch 'master-new-api' 2018-07-26 21:42:27 -04:00
Douglas Stebila
f5df1c159f
Remove kex_lwe_frodo and add kem_frodokem to master-new-api (#302)
* Remove kex_lwe_frodo

* Add FrodoKEM

* Prettyprint

* Missing liboqs.a

* Fix errors because of disabling frodokem

* Fix sike OQS_KEM_ prefix related inconsistencies

* Fix naming inconsistensies
2018-07-24 22:42:49 -04:00
Douglas Stebila
38757741fc
Add new KEM API and SIKE (#295)
* Initial attempt at adding new KEM API and first KEM (SIKE)

* Fix name spacing in kem_sike

* Prettyprint kem_sike

* Use OQS_STATUS return codes

* Get speed_kem working

* Add missing config.h file for SIKE
2018-06-18 09:22:56 -04:00
Vlad Gheorghiu
89d290a75f Fix alice_priv_free in implementations (#293)
* fix

replaced free by OQS_MEM_secure_free where necessary

* commit

* commit

* removed //free(alice_priv)
2018-06-01 10:26:46 -04:00
Douglas Stebila
9c01154cae Add revised SHA-3 implementation. 2018-03-06 11:01:38 -05:00
Christian Paquin
f9d8d95979 Added picnic cmake's msbuild to gitignore. 2018-01-25 12:01:27 -05:00
Vlad Gheorghiu
65a8db3ea8 Issue 187 and 207 (#214)
* Add minimal kex and sig example file showing the api usage

* Fix regular expression

* update

* Update global namespace regex

* Further updates to gloabalnamespace script

* added minimal_sig/kex_oqs as test cases

* commit

* commit

* commit

updated tabs to spaces

* commit

make prettyprint

* commit

replaced macros with functions

* commit

changed print_hex_string to disp_hex_string to comply to the coding
standards

* updated regex

* Remove spurious regex updates

* commit

* Added back _ntt_double and _rec in regex

Otherwise gcc fails on travis

* commit
2018-01-24 20:56:48 -05:00
Christian Paquin
872c68a796 Picnic update and direct code commit (vs. being a submodule) (#212)
* Updated the picnic library, and removed it as a patched submodule and instead committed the code direclty.

* Added previously ignored config file, and added exception to gitignore.

* Removed the mention about recursive cloning in the readme.
2018-01-21 20:30:04 -05:00
Christian Paquin
d8e03d020c Added missing SIDH's config.h, and modified gitignore that ignored it in the first place. 2018-01-08 16:09:40 -05:00
Christian Paquin
6fee71699a Added optimized version of Picnic (#190)
* Replaced the implementation of Picnic with the optimized version of https://github.com/IAIK/Picnic.git.

Some notes:
 - Picnic is now a git submodule, built separately (build_picnic.sh) and linked into OQS.
 - The params are part of the Picnic library, no need to generate them separately.
 - The Picnic params have been renamed
 - Picnic has been disabled in the Visual Studio build (until the library supports VS)

* Deleted script to download old picnic implementation.

* Added picnic build commands to the configure script.

* Updated travis to build new picnic lib.

* Added note that clone must be recursive (to get picnic submodule).

* Removed dependency on m4ri and added picnic build instruction in travis (since apparently the configure scrip is not run as usual).

* Changed build_picnic.sh script invocation.

* install cmake3.8

Fix for PR 190

* commit

* commit

* Pulled down update to picnic submodule.

* pulled picnic update fixing compat macros failure

* Added openssl lib to test_sig linker if openssl is enabled.

* Disable Picnic on gcc < 5.

* Fixed travis.yml syntax error.

* Pulled updates to Picnic submodule (fixing build error on MacOS).

* Removed banned-functions test that only checks for bzero. For some strange reason, it doesn't work on travis while building picnic, even if bzero is not in the code.

* prettyprint

* Changed prettyprint's picnic exclusion dir.

* external lib changes

* Disable LTO in Picnic that prevents lib merging.

* Changed mode on build_picnic.sh.

* Added newline at the end of the file.

* Updated version of Picnic.

* Added patch to picnic to satisfy the global functions namespace convention.

* Added force option to patch to avoid error when rebuilding.

* Updated picnic-related entries, and added cmake files (obtained by travis).

* Updated ignore patch for picnic.

* Ignore mods (patched files) in 3rd party picnic library.

* Changed return code if no sig algs are configured, from error to success.
It's not really an error, and this makes the Travis build fail otherwise.

* Updated external picnic, and modified how it is patched and built (to avoid multiple patching).

* disabled Picnic on gcc 4

* Silenced picnic's dry-run patching (to avoid error messages if lib has already been patched).

* added comments to script

* Ignore (patched) submodule when checking for modified files.
Also delete a "grep -v" for picnic that meant to do the same thing, but
was in the wrong place after refactoring.

* Added --ignore-submodules to second call to git status

* Add temp/ to gitignore, to prevent Travis style-check failure on mac.
2017-12-20 09:54:45 -05:00
Christian Paquin
498756396e Add sig api with picnic (#120)
* Added sig API and Picnic signature algs.

* Removed ifdef around Picnic defines, to avoid modifying calling apps.

* Some clean-ups: updated Picnic reference in Readme, made download script executable, added TODO in test_sig.

* Removed const-removing cast since Picnic API now uses const.

* Revamped test_sig, cleaned-up sig and sig_picnic.

* Enables setting location of picnic params through an env variable (vs. hardcoded).

* Minor change.

* Enable travis test for picnic

* Fix yml error

* Fix yml error

* Fix apt package error

* Fix include for picnic

* Exit on first error

* Setup picnic external

* Fix a typo

* c99 mode for picnic matrices file in picnic

* update .gitignore

* Remove warnings from picnic

* Typo

* Another typo

* add picnic build for mac

* formatting

* Updated README after Picnic refactoring.

* Update and uniformization of README.md

* Minor typos in README.md

* Fix merge mistake.

* Fix M4RI_DIR path

* Undo README changes.

* Removing merge artifacts

* File not being used anywhere
2017-07-31 21:32:00 -04:00
smashra
a020ad117a ignore files 2017-06-17 17:18:38 -04:00
Douglas Stebila
f215add476 Ignore generated files. 2017-02-19 16:46:35 -05:00
Douglas Stebila
09cff0d2fd Autotools (#99)
* Autotools infrastructure

* update for autotools

* Readme update

* More gitignore updates

* Make prettyprint.

* Formatting in README.

* Makefile cleanups
2017-02-08 12:16:28 -05:00
Alex Parent
94a49529a6 Add option to build with NTRU (#85)
* Enable NTRU

* Add NTRU to Travis build.

* prettyprint

* Rename build script

* Try to avoid Travis failure

* Add NTRU to build on macOS and change linking.

* Fix Travis build for NTRU.

* Add NTRU to README.md (and update some other aspects too).
2017-01-12 13:49:07 -05:00
Alex Parent
6098c7f32b Add wrapper around mcbits. (#67) 2016-12-20 21:38:45 -05:00
Douglas Stebila
55f0be9a61 Add algorithm data sheets in new docs folder. 2016-12-12 14:49:28 -05:00
Douglas Stebila
28b9e2a75a Add AES using AES-NI. (#32)
* Add AES using AES-NI.
* Add doumentation and testing to AES.
* Add C equivalent to AES NI code, wrapper functions, and test harness.
2016-10-21 23:55:31 -04:00