761 Commits

Author SHA1 Message Date
Alex Parent
35e53b038f Fixes for scan-build and make. (#69) 2016-12-13 11:19:28 -05:00
Douglas Stebila
adcfddd423 Prettyprint. 2016-12-12 14:43:49 -05:00
Douglas Stebila
28b5b3be39 Change benchmarks to output Markdown-formatted tables. 2016-12-12 14:41:03 -05:00
Alex Parent
c5382941ae Clean up and optimize Frodo implementation (#60) 2016-12-07 19:32:25 -05:00
Christian Paquin
36ae6bf418 Fixes Visual Studio projects after crypto re-factoring (#68) 2016-12-05 21:00:58 -05:00
Alex Parent
dc69b4426f Reorganize common crypto code. 2016-11-28 16:23:00 -05:00
Alex Parent
4764de9963 Factor out SHA3 from msrln16. 2016-11-28 11:18:59 -05:00
Alex Parent
8f706feb47 Factor out SHA3 from newhope. 2016-11-28 11:18:59 -05:00
Alex Parent
d23f8d3edd Fix possible memory leaks. 2016-11-25 17:43:55 -05:00
Douglas Stebila
fcbc380970 Rename file. 2016-11-24 16:16:04 -05:00
Douglas Stebila
d94b54e99f Rename file. 2016-11-24 16:15:46 -05:00
Christian Paquin
7babc31f8b Integrates MSR's SIDH library into OQS (#59) 2016-11-24 16:13:50 -05:00
Christian Paquin
7fcf29d37f Integrates MSR's RLWE Latticecrypto library into OQS. (#58) 2016-11-23 11:06:54 -05:00
Alex Parent
04b841ca2c Remove statements which have no affect. (#51) 2016-11-21 20:37:35 -05:00
Alex Parent
5921e74587 Fix double memset_s. 2016-11-20 15:14:06 -05:00
Alex Parent
8901962d40 Add function for zeroing memory. 2016-11-20 15:14:06 -05:00
Alex Parent
e5a2360ef0 Add AES documentation. 2016-11-17 16:06:16 -05:00
Christian Paquin
afc321d352 Fix aesctr on windows (#49)
* Added AES-CTR files to Visual Studio project and fixed compilation errors on Windows.
2016-11-10 14:47:14 -05:00
Douglas Stebila
88e5316005 Frodo optimizations using macros (#45)
* Use macros to create versions of Frodo functions with hard-coded parameters to enable compiler optimization

* Undefine macros to avoid any confusion later.
2016-11-03 22:31:06 -04:00
Douglas Stebila
4753c4b2db Missing include for compiler warning. 2016-11-02 14:46:34 -04:00
Douglas Stebila
3b5903467c Update ds_benchmark to latest public version. 2016-10-31 21:12:16 -04:00
Christian Paquin
c949205f5d Enabled building Frodo on Windows (#39)
* Enables Windows build.

* Modified CAPI call to avoid error when no key container is present for the user.

* Removed spurious white spaces.

* Enabled building Frodo on Windows using the Visual Studio solution.

* Replaced non-portable packed bit fields with bit masks.

* Removed commented-out code and defined macro that has been moved to preprocessor defs.

* Disabled AES NI when using x86 Visual Studio projects.

* Prettyprint.
2016-10-31 21:09:22 -04:00
Alex Parent
20ecde9692 Add option to only run tests/benchmarks for specified algorithms. (#44)
* Add option to only run tests/benchmarks for a single algorithm.

* Allow multiple algorithms to be specified on command-line.
2016-10-31 21:02:02 -04:00
mofojed
14d6246c96 Fix memory leak (#42)
* Fix memory leaks with named_parameters.

They were not being freed in the Frodo and NewHope implementions. The bcns15 implementation never allocates them.

* Fix memory leaks in speed tests.

Many of the tests were running through many iterations of the same command, but were not cleaning up the memory used after each iteration.
As a result, running the tests would leak tons of memory onto the heap.
To help, created the TIME_OPERATION_SECONDS_CLEANUP function, that allows timing of a function with a cleanup function run after each iteration.

Verified no memory was leaked by running valgrind through each of the test cases:
valgrind --leak-check=full ./test_kex
valgrind --leak-check=full ./test_aes
valgrind --leak-check=full ./test_rand

Each case verified that heap use was cleaned up after running the tests:
All heap blocks were freed -- no leaks are possible

* Fix inlen passed into oqs_kex_lwe_frodo_pack function.

Was passing the number of bits allocated for the array, rather than the length of the array. This caused an invalid read of size 2 when running the test cases.
Verified with valgrind there is no more invalid read.

* Run 'make prettyprint' to fix up the formatting. Should pass the Travis CI build now.

* Change TIME_OPERATION_SECONDS macro so it can handle multiple operations.
2016-10-31 20:40:32 -04:00
Douglas Stebila
1698c32989 Smaller OQS_AES128 public API and support use of OpenSSL AES for faster operations. (#40)
* Make OQS_AES128 use a void schedule pointer.

* Fewer functions in AES public API.

* Reorganize RAND_urandom_aesctr to not use cache for n.

* Focus AES API on ECB mode rather than raw operations.

* Optionally use OpenSSL for AES.
2016-10-28 00:22:34 -04:00
Alex Parent
2777bfd449 Add PRNG based on AES-CTR (#37) 2016-10-26 21:46:19 -04:00
Alex Parent
42cad43e15 Fixes (#35)
* Fixes some potential memory leaks

* Fix possible freeing of uninitialized values.
2016-10-23 13:55:11 -04:00
Douglas Stebila
fc493561a2 Fix compiler error with gcc; common benchmarking code; fix cycle counts. 2016-10-22 18:28:36 -04:00
Douglas Stebila
b0d771b0bc Switch Frodo encryption to use AES-ECB with precomputed key schedule. 2016-10-22 11:23:10 -04:00
Douglas Stebila
5e5c4e6915 Prettyprint. 2016-10-22 01:21:25 -04:00
Douglas Stebila
087dc7215a Add LWE-Frodo to liboqs. (#33) 2016-10-22 01:04:32 -04:00
Douglas Stebila
a9b34cc5af Prettyprint. 2016-10-22 00:23:42 -04:00
Douglas Stebila
0e5c0ff908 Fix AES ECB mode. 2016-10-22 00:23:15 -04: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
e2b7725768 Modified VS projects and some newhope files to enable Windows compilation (#31) 2016-10-21 22:03:23 -04:00
Douglas Stebila
32220e7cbf Clean up test_kex output. 2016-10-17 22:01:06 -04:00
Douglas Stebila
ff907b7ed1 LICENSE and README updates for NewHope. 2016-10-17 21:43:06 -04:00
Douglas Stebila
62f630ff15 Code review of NewHope wrapper. 2016-10-17 21:07:39 -04:00
Sebastian
c6a9fae2ac Comment updates (#25) 2016-10-17 09:51:52 -04:00
Tancrède Lepoint
14b5f66420 Adding prettyprint check to Travis (#27)
* Add prettyprint in Travis

* running make prettyprint to pass Travis
2016-10-17 09:46:23 -04:00
Alex Parent
181e602943 Cleanup global namespace. 2016-10-14 10:50:31 -04:00
Alex Parent
fd12d8ba10 Add NewHope. 2016-10-13 11:35:01 -04:00
Douglas Stebila
7d2d3924e1 Fix interface for OQS_RAND_new. 2016-10-05 16:51:23 -04:00
Douglas Stebila
2c370dcac6 Add default named algorithm. 2016-10-05 16:44:40 -04:00
Douglas Stebila
e6688f0df0 Create data structure for test cases. 2016-10-04 21:18:21 -04:00
smashra
be98d4b9de Make random number generation and key exchange generation algorithms choosable at runtime (#16) 2016-10-04 21:08:55 -04:00
Christian Paquin
096b476e4f Modified OQS Windows projects to make it compatible with OpenSSL on Windows (#17)
* Removed warning Windows when using strdup, and removed the corresponding _strdup definition.

* Modified OQS projects to link statically with the system runtime, like the OpenSSL project does.
Otherwise we get link errors when including OQS in OpenSSL on Windows.
2016-10-01 16:13:28 -04:00
Tancrède Lepoint
1d3e06d04b Travis CI (#11)
* Add Travis for gcc 4.8/4.9/5/6 on Ubuntu and clang on macOS

* Add make check in README

* Using EXIT_SUCCESS and EXIT_FAILURE
2016-10-01 16:10:13 -04:00
Christian Paquin
8b7139a20b Fixed Windows Crypto API rand call on uninitialized machines. (#10)
* Modified CAPI call to avoid error when no key container is present for the user.
2016-09-29 10:51:59 -04:00
Tancrède Lepoint
5521fe8c8d 🔫 some typos (#9) 2016-09-29 10:51:16 -04:00