Commit Graph

79 Commits

Author SHA1 Message Date
Thom Wiggers
c99c406551 Update Kyber from upstream
Makes Kyber-AVX run on MacOS (#251)
2020-11-26 13:10:21 -05:00
Thom Wiggers
75416c93f0
Kyber768 and Kyber1024 don't need -maes (see #296) 2020-05-29 10:01:44 +02:00
Thom Wiggers
39fa1ccfc7
Fix reduce.c's overflowing multiplication 2020-03-09 17:57:43 -04:00
Douglas Stebila
b4de294f68 Fix memory leak in Kyber 2020-02-16 14:55:19 -05:00
Thom Wiggers
65a6a63e08
Put all common primitives on the heap (#266)
* Put AES ctx on the heap

This forces people to use the ``ctx_release`` functions, because otherwise there will be leaks

* Put fips202 on the heap

* Add much more docs for fips202.h

* fixup! Put fips202 on the heap

* Put SHA2 on the heap-supporting API

* Fix clang-tidy warnings

* Fix unreachable free() in falcon

* Fix McEliece8192128f-sse GNU Makefile
2020-02-11 11:15:14 +01:00
Thom Wiggers
e762163478
Don't advertise MacOS support for Kyber-AVX2
In light of #251
2019-11-13 13:27:26 +01:00
Matthias J. Kannwischer
762706f5fe remove unnecessary if in kyber768
clang-tidy9.0.0 added a new check: bugprone-branch-clone
(https://releases.llvm.org/9.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html)
This doesn't like both branches of an if are the same.
In this case I don't think there is any reason to do this, so I've removed it.
2019-10-23 08:00:26 +02:00
Thom Wiggers
f792b925b4 Enable optimizers on Windows (#244) 2019-10-21 14:23:59 +02:00
Thom Wiggers
526a841886
Add Kyber90s 2019-09-24 08:01:54 +02:00
Thom Wiggers
f4bd312180 Adds AVX2 variants of Kyber512, Kyber768, Kyber1024 (#225)
* Integrate Kyber-AVX2 into PQClean

* Fix types and formatting in Kyber

* Workaround a valgrind crash

* Remove comment in shuffle.s

* Remove some extraneous truncations

* fixup! Fix types and formatting in Kyber
2019-09-10 11:45:01 +02:00
Thom Wiggers
4cea81d15f
Convert principal-submitter into a list
There are schemes, like SABER (#192) that have more than one principal
submitter. Consistency warrants that we turn it into a list for all
schemes and don't do something with allowing either a str or a list:
that would just be very annoying to parse.

Closes #194
2019-06-21 09:30:55 +02:00
Joost Rijneveld
2244735a87
Merge pull request #175 from PQClean/hash_state_struct
Use opaque structs for the hashing API
2019-05-21 17:03:50 +02:00
Thom Wiggers
199adb8072
Add -Wredundant-decls 2019-05-20 16:12:01 +02:00
Thom Wiggers
23e118207d
Port Kyber{512,768,1024} to fips202 ctx struct 2019-05-20 10:23:22 +02:00
Matthias J. Kannwischer
0127ba93f5 Add IND-CPA/IND-CCA2 security field to METADATA. add test for it as well (#165) 2019-05-13 11:20:32 -04:00
cryptojedi
56a3715ddc Kyberv2 (#150)
* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* More fixes for MS compiler

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* More fixes for MS compiler

* Started more cleanup work on Kyber768

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Replaced round-1 Kyber code with round-2 Kyber code (not yet cleaned/namespaced)

* Namespacing for Kyber

* Some more work on round-2 Kyber (more namespacing)

* Added missing files

* Round-2 Kyber768 now passing all tests under Linux

* Various small tweaks to make MS compiler happy

* Two more tweaks for MS compiler

* Added Kyber512 and Kyber1024 (round-2 versions)

* Making MS compiler happy

* Making MS compiler happy

* More fixes for MS compiler

* More fixes for MS compiler

* Started more cleanup work on Kyber768

* Kyber768 passing all tests locally

* Kyber512 passes all tests locally

* Kyber1024 now also passing all tests locally

* Now passing all tests with -Wmissing-prototypes

* Local tests (on Linux) passing again
2019-05-06 14:50:27 +02:00
Douglas Stebila
6e1f66d047
Don't run testvectors checks on KEMs (#161) 2019-04-30 11:15:57 -04:00
Joost Rijneveld
68b12866ce
Use more standard Wvla 2019-04-24 13:52:02 +02:00
Joost Rijneveld
e32666a0ab
Throw errors when using variable-length arrays
Windows already complains about this in CI, but this will
let us catch these issues on Linux as well.
2019-04-24 12:35:17 +02:00
Joost Rijneveld
baf93e2826
Merge pull request #146 from PQClean/move-secret-key-to-scheme-meta
Move secret key length back to scheme-level META
2019-04-18 17:14:08 +02:00
Thom Wiggers
b5d4e93478
Add -O3 to CFLAGS 2019-04-17 11:56:16 +02:00
Joost Rijneveld
972315dec5
Move secret key length back to scheme-level META 2019-04-17 11:08:45 +02:00
Douglas Stebila
a815543f32 Add NIST KAT check for KEMs 2019-04-14 17:17:11 -04:00
Matthias J. Kannwischer
5587cdb4a8 Add -Wmissing-prototypes (#109)
* fix prototypes for sphincs and static functions in aes.c

* fix missing prototypes in all frodo variants

* fix missing prototypes in kyber

* remove const from non-pointer arguments in Frodo

* add missing prototypes to requirements in README
2019-04-13 11:47:29 -04:00
Joost Rijneveld
dfe9508551
Remove preprocessor ignored codepath for Kyber 2019-04-09 17:23:31 +02:00
Joost Rijneveld
8d1ed9afc0
Remove include from Kyber's api.h 2019-04-09 17:19:23 +02:00
Joost Rijneveld
fe010541ec
Move secret key length to implementation meta 2019-04-08 11:39:17 +02:00
Joost Rijneveld
e2fcad2823
Merge branch 'master' into reduce-iterations 2019-04-06 13:10:21 +02:00
Thom Wiggers
d39d7c66db
Add missing metadata to META 2019-04-05 16:38:26 +02:00
Douglas Stebila
19d177efb3 Use 5 iteractions for functional tests and test vectors 2019-04-05 10:22:52 -04:00
Thom Wiggers
6558773b21
Check if header guard is defined properly
Does this slightly uglily, but it should work.
2019-03-19 15:02:09 +00:00
Thom Wiggers
05b0f6d9cc
Namespace the #define constants. 2019-03-19 13:28:15 +00:00
Thom Wiggers
45e645c3a7
Fix Makefile.Microsoft_nmake header dependencies 2019-03-06 17:15:23 +01:00
Thom Wiggers
d503a712ba
Fix nmakefiles
LIB is already an environment variable on Windows
2019-03-06 17:14:35 +01:00
Thom Wiggers
07b8c2ebe9
Make all apis use the uint8_t and size_t types 2019-03-05 14:14:47 +01:00
Joost Rijneveld
879574b695
Include name of implementation in namespace 2019-02-27 09:18:38 +01:00
Douglas Stebila
5297954630 Add dependency to header files in Makefile 2019-02-18 10:19:07 -05:00
Peter Schwabe
a96abac2de Removed FIXME comment 2019-02-14 19:16:52 +01:00
Peter Schwabe
bab1d185cd Made one more cast explicit 2019-02-14 16:18:17 +01:00
Peter Schwabe
393c7a3cde Fixed one cast (added appropriate parantheses) 2019-02-14 16:16:50 +01:00
Peter Schwabe
8b8f27b003 Make various casts in kyber explicit to make MS compiler happy with /W4 2019-02-14 16:14:47 +01:00
Peter Schwabe
81797c2c13 Increased warning level for compilation under Windows to /W4 2019-02-14 16:02:57 +01:00
Peter Schwabe
55b63353a8 Fixed Makefile 2019-02-14 16:00:52 +01:00
Peter Schwabe
9b29d34bf9 Merge branch 'reformat-kyber'
Fixed (hopefully) both formatting and astyle config to not break
formatting again
2019-02-14 15:32:12 +01:00
Peter Schwabe
8e594f3c23 Some cleanup, expanded dependencies, removed two unnecessary files in kyber768 2019-02-14 15:30:55 +01:00
Thom Wiggers
3b73ea134d
Formatted everything with astyle
clang-format was not flexible enough to allow lining out things on
columns with spaces.
2019-02-14 14:08:16 +01:00
Douglas Stebila
f64a7e0dd4 Reimplement Python tests using nose framework 2019-02-13 22:25:34 -05:00
Douglas Stebila
157977258c Make makefiles for Dilithium consistent with merged Kyber makefiles 2019-02-08 10:06:07 -05:00
Douglas Stebila
f1f0c1d332 Merge branch 'master' into make-dilithium 2019-02-08 10:02:24 -05:00
Douglas Stebila
24e28e3402 Use a single Makefile for BSD and GNU Make and add comments 2019-02-08 09:42:53 -05:00