65 Commits

Author SHA1 Message Date
Douglas Stebila
ab2c96a65e
Replace the Kyber768 implementation in liboqs master with PQClean's implementation (#466)
* Initial import of PQClean's Kyber768 clean implementation

* Integrate PQClean's Kyber768 into liboqs master

* Exempt PQClean code from namespacing and prettyprint

* Build PQClean's Kyber768 on Windows

* Add PQClean shim headers to Windows build

* Include PQClean's shim headers on Windows

* Update Kyber768 implementation from PQClean 

Commit 
0fa56021d1

* Update algorithm datasheet for Kyber768 PQClean
2019-03-20 12:50:22 -04:00
Christian Paquin
a7da6ec8ea Updated Picnic to v1.3.1 (#457)
* Added example_kem/sig and speed_kem/sig to Visual Studio.

* Updated picnic to v1.3.1

* Renamed exposed picnic functions to satisfy OQS naming conventions.

* Replaced free functions with OQS's versions.

* Removed picnic's config.h do avoid conflict with OQS's.

* Updated Visual Studio project with latest Picnic files, and removed unused commented-out code.

* Removed some hardcoded picnic defines.

* Added oqs's common.h to aligned_alloc's includes.
2019-01-31 19:49:54 -05:00
Christian Paquin
01be6694ed Added Kyber to Windows build. (#453)
* Added Kyber to the liboqs Master branch

* Added OQS_MEM_cleanse calls to Kyber

* Updated file formatting with make prettyprint

* Added algorithm datasheet for Kyber

* Added Kyber KAT files

* Copied kyber header file to Visual Studio dir.

* Added kyber to Visual Studio
2018-12-21 13:07:51 -05:00
cryptojedi
1e36f1f000 Add Kyber to master branch (#448)
* Added Kyber to the liboqs Master branch

* Added OQS_MEM_cleanse calls to Kyber

* Updated file formatting with make prettyprint

* Added algorithm datasheet for Kyber

* Added Kyber KAT files

* Copied kyber header file to Visual Studio dir.
2018-12-20 17:00:03 -05:00
Christian Paquin
0f8b8d1fbb Adds functions to count the number of supported KEMs/sigs (#449)
* Added example_kem/sig and speed_kem/sig to Visual Studio.

* Added a function to get the number of supported KEM/sig mechanisms

Useful non-C wrappers who don't have access to the OQS_KEM/SIG_algs_length macro value in the kem/sig.h.
2018-12-17 09:55:24 -05:00
Douglas Stebila
d3a8f62045 Fix function names in SIKE 2018-10-19 16:13:16 -04:00
Douglas Stebila
c409ce6e78 Mark relevant functions with OQS_API 2018-10-19 15:54:28 -04:00
Christian Paquin
8e060a720a Fix Visual Studio DLL projects (#419)
* Added example_kem/sig and speed_kem/sig to Visual Studio.

* Updated the dll def file after OQS's refactoring, fixed test_kem's DLL projects config, and added ReleaseDLL config to appveyor.
2018-10-19 15:25:44 -04:00
Douglas Stebila
2f05262bf4 Rename NewHope to NewHopeNIST to be consistent with nist-branch 2018-10-09 21:49:11 -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
Christian Paquin
4f32761b5c Check KEM KAT files in appveyor (#406)
* Added example_kem/sig and speed_kem/sig to Visual Studio.

* Check generated KAT files in appveyor.
2018-10-09 19:49:30 -04:00
Shravan Mishra
95cdb90059 Master add kem newhopenist (#382)
* Add newhope kem

* kem newhope

* Fix code for KAT

* Fix KAT target

* Add datasheet

* Fix parameter set

* Fix parameter set

* Formatting changes

* Add newhope to window's build

* Further windows changes and pretty-print

* ifdef gcc attribute syntax for windows

* Pretty print

* Fixed newhope's Visual Studion inclusion.

* Added missing files.

* Remove rng.h

* Added kem_newhope.h to the installed headers.
2018-10-09 19:47:30 -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
76538fde13 Update to Visual Studio (Sept 2018) (#395)
* Added example_kem/sig and speed_kem/sig to Visual Studio.

* Added kat_kem to VS

* Re-added SIDH/SIKE to Visual Studio
2018-10-01 16:22:23 -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
493e5ece37 Remove kex_code_mcbits (issue 371). (#384) 2018-09-21 15:48:17 +02:00
Christian Paquin
9b27edb54e Remove KEX-related items from Visual Studio (#383)
* Removed KEX from Visual Studio.

* Removed further refs to KEX items in Visual Studio.
2018-09-21 12:54:11 +02:00
Shravan Mishra
4b3052b624 KAT check should run without OpenSSL (#386)
* Kat check should run without openssl

* Add rand_nist.c back

* Add MacOS build without OpenSSL to check KAT
2018-09-21 12:52:56 +02:00
Christian Paquin
b4766939a9 Migrated SIDH to KEM API (issue 350) (#368)
* Exposed SIDH through KEM API.

* Removed old kex_sidh_msr refs

* Removed kex_sidh_msr refs from Visual Studio project

* Removed kex_sidh_msr from test_kex.

* Added sidh alg sheet

* Skip sidh in kat check (no kat files for sidh, unlike the related sike alg)

* Added return values to sidh KEM methods (to fix wrong default return values on mac).

* Addressed review comments on PR368.

* Removed text_kex from Visual Studio; no more KEX built by default on Windows.

* Removed test_kex from appveyor test.

* Removed minimal_kex from appveyor
2018-09-17 05:00:52 -04:00
Shravan Mishra
a23741082b
Merge pull request #358 from open-quantum-safe/master-remove-kex-newhope
Remove kex_rlwe_newhope
2018-09-14 11:34:47 -04: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
78a231247e Remove kex_rlwe_newhope 2018-09-04 16:09:29 -04:00
Christian Paquin
9e6786dd13 Adds KEM API and frodokem to Visual Studio (#354)
* Added KEM API to Visual Studio build, and added frodokem.

* Fixed call to Windows' system randomness, and released crypto context at exit (issue 349).

* Added missing test_kem files.
2018-08-30 16:54:07 -04:00
Christian Paquin
6287e58ed6 Fixed Visual Studio build after master's API refactoring. (#352)
* Fixed Visual Studio build after master's API refactoring.

* Replaced deleted kex_frodo with kex_newhope in minimal_kex_oqs.
2018-08-30 11:10:42 -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
08330aee8b Remove KEX_RLWE_BCNS15 2018-07-08 16:10:56 -04:00
Douglas Stebila
aed3059e31
Remove kex_rlwe_msrln16 (#286) 2018-05-16 13:58:23 -04:00
Douglas Stebila
e278842b49
Add new randomness API and various other build changes (#284)
* Move rand.h and rand.c to common directory and add most of RNG API from nist-branch

* Try to fix continuous integration errors

* Try fixing compilation bug on Windows

* Copy common.h and common.c from nist-branch

* Add OpenSSL PRNG if OpenSSL enabled

* Move common files around to match locations in nist-branch

* Add OpenSSL include to common build

* Only do prettyprint check on some Travis builds to shorten runtime

* Reorganize some files

* Missing variable in Travis config
2018-05-16 12:57:42 -04:00
Christian Paquin
068c48ae37 Replaced SIKE's sha3 implementation with OQS'. (#256) 2018-04-03 11:08:16 -04:00
Christian Paquin
019d3feaa6 Enabled picnic for Win32 VS projects. 2018-02-16 14:00:17 -05:00
Christian Paquin
e9ebb97247 Removed old picnic dependencies from VS sig projects. 2018-02-15 21:10:16 -05:00
Christian Paquin
baabaf7772 Included picnic directly (vs. as cmake-built 3rd party lib).
Now uses OQS's rand; modified to avoid pedantic warnning; modified build and CI scripts.
2018-02-15 20:07:23 -05:00
Christian Paquin
95e5bdb093 Added post-build step to merge the oqs and picnic library, to simplify downstream integration.
Also removed forced rebuild of picnic.
2018-02-07 11:44:51 -05:00
Christian Paquin
d409a5c3df Moved winconfig to oqs include dir, so it can be used by downstream projects. 2018-02-05 11:59:49 -05:00
Christian Paquin
2a1e1ed138 Tweaked picnic-related build steps on windows. 2018-02-02 16:40:56 -05:00
Christian Paquin
10881f4b3e Removed picnic lib dependency from 32-bit projects, and specified platform in picnic build instructions. 2018-02-02 16:03:27 -05:00
Christian Paquin
eb46360fae Added 32-bit projects to Visual Studio, and moved scheme defines to winconfig.h file. 2018-02-01 17:05:52 -05:00
Christian Paquin
31581805de Added minimal kex and sig projects to visual studio and appveyor, and updated DLL exports with new OQS functions. 2018-01-31 19:42:06 -05:00
Vlad Gheorghiu
f4a37ea754 commit 2018-01-31 04:54:29 -05:00
Christian Paquin
f893a96f41 Added OQS print functions to DLL exports. 2018-01-30 15:31:51 -05:00
Christian Paquin
cebaa10083 Added defines to enable all supported KEX schemes. 2018-01-30 15:15:51 -05:00
Christian Paquin
590f4a4914 Added closing tag for oqs.h filter item, fixing the filter file. 2018-01-30 15:14:36 -05:00
Vlad Gheorghiu
35688bf463
Merge branch 'master' into cp-update-picnic 2018-01-30 12:47:31 -05:00
Vlad Gheorghiu
20348ca55d Vsoftco refactor oqs success (#219)
* refactoring

- Introduced typedef int OQS_status; in src/common/common.h and
refactored the
  code accordingly. Now it's easy to figure out whether the function
returns
  an error status or an int.

- Refactored hard-coded returns so now we return the OQS_status as
either
  OQS_SUCCESS or OQS_ERROR. OQS_RAND_get_system_entropy() and all other
  KEX/SIG API functions now return OQS_STATUS instead of int.

- Introduced src/common/oqs.h, which include all other necessary liboqs
  headers. All standalone programs now only #include <oqs/oqs.h>

- src/kex.c:23, the UNUSED macro was re-defined differently from
  oqs/common.h:25, so re-defined kex.c's UNUSED to UNUSED_KEX

- Got rid of PRINT_(PART)_HEX macros and introduced stand-alone
functions in
  src/common.h (with definitions in src/common.c)

    void OQS_print_hex_string(const char *label, uint8_t *str, size_t
len);
    void OQS_print_part_hex_string(const char *label, uint8_t *str,
size_t len, size_t sub_len);

* commit

fixed stdint.h missing #include

* commit

* commit

* commit

* These files are part of the patch

* Modified patch

* added oqs.h in the Windows build

* VS build

* Fixed VS build

* fixed VS build

* Fixed test_rand VS project

added WINDOWS macro in the VS configuration for test_rand
2018-01-30 10:30:26 -05:00
Christian Paquin
07c4635fc9 Added OQS sig functions to DLL exports and fixed DLL projects to include picnic. 2018-01-29 10:45:12 -05:00
Christian Paquin
db6639687d Added Picnic sig to Visual Studio. 2018-01-25 10:23:53 -05:00
Christian Paquin
46a8976399 (Re)Added SIDHv3/SIKE to Visual Studio. (#213) 2018-01-21 20:30:45 -05:00
Christian Paquin
3fe6afaa2a (Re)Added SIDHv3/SIKE to Visual Studio. 2018-01-12 23:08:29 -05:00
Douglas Stebila
ae488e69bf Merge branch 'paquin_add_sike' of https://github.com/christianpaquin/liboqs into christianpaquin-paquin_add_sike 2018-01-11 22:40:51 -05:00
Tancrède Lepoint
5fd3475ed4 Remove old version of Kyber (#211) 2018-01-10 15:08:34 -05:00