28 Commits

Author SHA1 Message Date
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
Christian Paquin
16e35cd19c Enables Windows build. (#7) 2016-09-22 16:38:26 -04:00
Douglas Stebila
b9abaf9fdb Ignore linked header files. 2016-08-11 23:20:44 -02:30
Douglas Stebila
8d6f5aab05 Initial commit of liboqs containing rand, rand_urandom_chacha20, kex, and kex_rlwe_bcns15. 2016-08-11 23:19:01 -02:30
Douglas Stebila
24b6edfbcb Initial commit 2016-08-11 23:16:13 -02:30