17 Commits

Author SHA1 Message Date
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
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
fc493561a2 Fix compiler error with gcc; common benchmarking code; fix cycle counts. 2016-10-22 18:28:36 -04:00
Douglas Stebila
087dc7215a Add LWE-Frodo to liboqs. (#33) 2016-10-22 01:04:32 -04:00
Douglas Stebila
32220e7cbf Clean up test_kex output. 2016-10-17 22:01:06 -04:00
Alex Parent
fd12d8ba10 Add NewHope. 2016-10-13 11:35:01 -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
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
Douglas Stebila
c4aa3af1f4 Add named parameters to OQS_KEX constructor. (#6) 2016-09-15 17:19:50 -04:00
Alex Parent
b7cfda3e1b Fixes memory leak and moves allocation into stuct. (#5)
* Pretty-print.

* Fixes memory leak and moves allocation into stuct.

Memory leak was caused by a possible partial allocation of the arrays in
oqs_kex_rlwe_bcns15_fft_ctx.

Allocate fixed size arrays in the oqs_kex_rlwe_bcns15_fft_ctx struct
rather then calling an initialization function afterwords. Also specify
fixed array sizes in functions where possible.
2016-08-25 23:13:27 -04:00
Alex Parent
c999815b7c Simplify Makefile and allow for better incremental builds. (#3)
* Simplify Makefile and allow for better incremental builds.

Also add -std=gnu11 option since some older compilers default
to c99 which causes compilation to fail.

* Enable more warnings and fix some minor issues.

* Fixes a memory leak

Caused by method_name not being freed if
OQS_RAND_urandom_chacha20_ctx_new() fails. Also accounts for the fact
that strdup can fail and return NULL.
2016-08-25 13:22:11 -04:00
Douglas Stebila
d85fc67900 Add tests for measuring distance from random for key exchange output and PRNG (#2)
* Add tests for measuring distance from random for key exchange output and PRNG

* Use new_method in key exchange correctness tests.
2016-08-19 09:43:02 -07:00
Douglas Stebila
35ada5af71 Pretty-print. 2016-08-12 00:29:34 -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