Commit Graph

239 Commits

Author SHA1 Message Date
Matthias J. Kannwischer
85c6605bbf
fix MSVS warning 2020-03-09 15:45:20 -04:00
Matthias J. Kannwischer
de5cda4d7b
Fix NewHope verify
https://github.com/mupq/pqm4/issues/132 repoorted that the NewHope verify function does not actually return 0 or 1, but 0 or -1, which consequenctly breaks the cmov in the FO transform.
This bug was introduced when I integrated this into PQClean.
2020-03-09 15:45:19 -04:00
Thom Wiggers
8c2f5994b9
Fix duplicate consistency 2020-03-03 10:15:57 -05:00
Thom Wiggers
fe4e12308b
Fix memory leaks in LEDAkem 2020-03-03 10:15:56 -05:00
Thom Wiggers
81caa58b57
Fix memory leaks in NewHope 2020-03-03 10:15:56 -05: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
7862f7faae
Fix McEliece8192128f makefile 2020-02-11 09:17:55 +01:00
Thom Wiggers
53d50fd751
Fix alignment problems with vectors in McEliece AVX2 and fix McEliece 8192128f (#267)
* Fix alignment problems with vectors

* Fix required CPU flags for McEliece

* Fix McElice8192128f that was missed in #259

* fixup! Fix McElice8192128f that was missed in #259

* Fix initialization
2020-02-07 11:13:59 +01:00
Thom Wiggers
b3f9d4f8d6
Classic McEliece (#259)
* Add McEliece reference implementations

* Add Vec implementations of McEliece

* Add sse implementations

* Add AVX2 implementations

* Get rid of stuff not supported by Mac ABI

* restrict to two cores

* Ditch .data files

* Remove .hidden from all .S files

* speed up duplicate consistency tests by batching

* make cpuinfo more robust

* Hope to stabilize macos cpuinfo without ccache

* Revert "Hope to stabilize macos cpuinfo without ccache"

This reverts commit 6129c3cabe1abbc8b956bc87e902a698e32bf322.

* Just hardcode what's available at travis

* Fixed-size types in api.h

* namespace all header files in mceliece

* Ditch operations.h

* Get rid of static inline functions

* fixup! Ditch operations.h
2020-02-05 13:09:56 +01:00
Leon Botros
f9d192036e
Add ephemeral versions of ThreeBears 2020-01-15 10:43:50 +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
Thom Wiggers
bb8ed7af9b
Merge pull request #248 from leonbotros/threebears
Add {Baby,Mama,Papa}Bear reference implementations
2019-11-04 11:45:49 +01:00
Leon Botros
f1511f35b9 use the same compiler flags as other implementations 2019-10-25 19:09:12 +02:00
Leon Botros
5720e25c54 add -Werror 2019-10-25 13:35:23 +02:00
Leon Botros
6a7506f520 move modulus function to source, namespace it 2019-10-25 13:14:25 +02:00
Leon Botros
cbbc9cd18f fix namespacing for mamabear, papabear 2019-10-24 19:35:55 +02:00
Leon Botros
03b4153941 remove empty line, add version 2019-10-24 19:35:55 +02:00
Leon Botros
c53d332090 add ThreeBears 2019-10-24 19:35:55 +02: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
Matthias J. Kannwischer
df8cc49670 fix kyber-90s warning if size_t is not 32 bits 2019-10-15 15:20:57 +02:00
Matthias J. Kannwischer
39246b808d fix for big-endian 2019-10-04 13:10:29 +02:00
Matthias J. Kannwischer
9571a3b017 use common aes256_ecb instead of providing local AES implementation 2019-10-04 09:31:16 +02:00
Thom Wiggers
ac1f8cc74d
fixup! Add Kyber90s
Fix CRYPTO_ALGNAME
2019-09-24 08:01:54 +02:00
Thom Wiggers
526a841886
Add Kyber90s 2019-09-24 08:01:54 +02:00
Matthias J. Kannwischer
7d10484030 fix algo names for schemes that are inconsistent with the api.h 2019-09-19 12:44:26 +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
Leon Botros
9190172f1a fix a bug where error array is allocated way too big 2019-08-27 15:38:34 +02:00
Leon Botros
7dd7223587 more fixed sizes, hopefully fix mscv warnings 2019-08-24 16:40:47 +02:00
Leon Botros
9dd4a4b5da fix requested changes 2019-08-24 15:48:38 +02:00
Leon Botros
823ba3f13b fix msvc complaints #2 2019-08-23 14:21:09 +02:00
Leon Botros
50665606f0 serialize error before hashing 2019-08-23 12:57:17 +02:00
Leon Botros
46145a3183 hopefully fix msvc complaints 2019-08-23 12:41:58 +02:00
Leon Botros
537d2a1ac0 serialize pk/ct 2019-08-23 11:30:02 +02:00
Leon Botros
1fc2f51f82 fix clang-tidy warnings, replace variable-time schoolbook multiplications 2019-08-22 12:59:04 +02:00
Leon Botros
901d53ebe4 constant-time decapsulation/decryption failure 2019-08-21 21:27:53 +02:00
Leon Botros
d3d72f64cc constant-time inverses 2019-08-21 18:54:04 +02:00
Leon Botros
e4a5cc3cf2 add karatsuba + toom-cook-3 without VLAs 2019-08-21 17:31:57 +02:00
Leon Botros
ca898f01bc update implementations to leda v2.1 2019-08-21 14:28:31 +02:00
Thom Wiggers
2108bdcdb5
Make a static global explicitly const 2019-07-18 13:42:37 +02:00
Thom Wiggers
0ed5ba4a30
Merge pull request #192 from PQClean/saber
Add Saber
2019-07-04 15:53:57 +02:00
Matthias J. Kannwischer
756b550ceb add Saber LICENSE 2019-07-01 07:48:17 +02:00
Douglas Stebila
4157e0fbad Add release function for AES key schedule 2019-06-25 09:37:23 -04:00
Matthias J. Kannwischer
acde8afff2 Convert into a list for the Saber parameter sets 2019-06-24 09:18:58 +02:00
Matthias J. Kannwischer
515b04d87b fix warnings 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
931f466937 switch to the polymul from the submission 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
8378132c5e clean up of comments and packing 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
61b36e933b remove wrong cast 2019-06-24 09:14:24 +02:00
Matthias J. Kannwischer
cc94db88fa fix vs warning 2019-06-24 09:14:24 +02:00