Commit Graph

61 Commits

Author SHA1 Message Date
Thom Wiggers
365319041a
Merge pull request #324 from jschanck/hqc
New HQC and HQC-RMRS from upstream
2020-09-17 10:29:06 +02:00
John M. Schanck
0dee1d6aa6 readability changes 2020-09-15 11:54:11 -04:00
John M. Schanck
d4008c7f1e uint8_t api for encode/decode in optimized rmrs 2020-09-13 14:44:34 -04:00
John M. Schanck
4da9f0b087 more endianness fixes 2020-09-13 12:23:25 -04:00
John M. Schanck
d9e093c1ad satisfy MS compiler 2020-09-12 20:15:07 -04:00
John M. Schanck
0ff7886b08 narrowing warnings 2020-09-11 17:02:19 -04:00
John M. Schanck
4aab2dcb23 Rename log and exp to gf_log and gf_exp 2020-09-11 12:38:08 -04:00
John M. Schanck
04f7375c32 Some MS compiler fixes 2020-09-10 19:30:03 -04:00
John M. Schanck
cc7eae7ce7 typo and more endianness fixes 2020-09-10 17:15:55 -04:00
John M. Schanck
2a261a3f36 Fix endianness issues 2020-09-10 16:27:12 -04:00
John M. Schanck
23238dbed5 Initialize arrays in fft.c and fix a few compiler warnings 2020-09-10 10:26:30 -04:00
John M. Schanck
834f546349 Avoid ==, !=, etc in arithmetic expressions. Some compilers will produce non-constant time code. 2020-09-09 16:07:20 -04:00
John M. Schanck
9113313eab Replace avx2 'reduce' in gf2x 2020-09-07 17:39:21 -04:00
John M. Schanck
c2083e13d7 New HQC and HQC-RMRS from upstream 2020-09-07 16:10:13 -04:00
John M. Schanck
4f6e00ed69 NTRU Prime: jump directly to crypto_sort_smallindices 2020-09-02 13:37:23 -04:00
John M. Schanck
55c6d04df6 NTRU Prime: Simplified patch set 2020-09-02 12:48:28 -04:00
John M. Schanck
70543bba37 Add sntrup{653,761,857} and ntrulpr{653,761,857}
Exported from SUPERCOP-20200826 using the scripts at:
https://github.com/jschanck/pqclean-package-ntruprime
2020-08-28 20:22:56 -04:00
John M. Schanck
f1287684e3 NTRU: duplicate consistency 2020-08-24 09:47:34 -04:00
Matthias J. Kannwischer
9fbfb230a9 remove threebears, ledakem, newhope, mqdss, qtesla
NIST announced the Round 3 finalists and alternate candidates today:
https://groups.google.com/a/list.nist.gov/d/msg/pqc-forum/0ieuPB-b8eg/Cl7Ji8TpCwAJ

Some of the schemes in PQClean did not make it to Round 3 and this commit
removes them.
2020-07-23 14:08:09 +08:00
Thom Wiggers
90630db2eb
Add MQDSS AVX2 implementations (#288)
* Add AVX2 version of mqdss

* Fix duplicate consistency
2020-06-26 14:01:23 +08:00
Sebastian
33232a0343
HQC submission (#202)
* Sebastian's HQC merge request

* Clean up changes to common infrastructure

* Fix Bitmask macro

It assumed that ``unsigned long`` was 64 bit

* Remove maxlen from nistseedexpander

It's a complicated thing to handle because the value is larger than size_t supports on 32-bit platforms

* Initialize buffers to help linter

* Add Nistseedexpander test

* Resolve UB in gf2x.c

Some of the shifts could be larger than WORD_SIZE_BITS, ie. larger than
the width of uint64_t. This apparently on Intel gets interpreted as the
shift mod 64, but on ARM something else happened.

* Fix Windows complaints

* rename log, exp which appear to be existing functions on MS

* Solve endianness problems

* remove all spaces before ';'

* Fix duplicate consistency

* Fix duplicate consistency

* Fix complaints by MSVC about narrowing int

* Add nistseedexpander.obj to COMMON_OBJECTS_NOPATH

* astyle format util.[ch]

* add util.h to makefile

* Sort includes in util.h

* Fix more Windows MSVC complaints

Co-authored-by: Sebastian Verschoor <sebastian@zeroknowledge.me>
Co-authored-by: Thom Wiggers <thom@thomwiggers.nl>
2020-04-01 13:57:21 +08: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
mergify[bot]
7483647ddf
Merge branch 'master' into redo-dilithium 2019-12-13 09:35:58 +00:00
Thom Wiggers
a655ec8a9d SPHINCS+ optimized implementations (#253)
* Add state destroy to SHA2 API

* Include optimized SPHINCS+ implementations

I've generated new implementations from the sphincsplus repository.

* Don't destroy sha256ctx after finalize

* Attempt to shut up MSVC

* Make sure to drop errors in rmtree
2019-12-12 14:29:29 +01:00
Thom Wiggers
7357da6995
Fix duplicate consistency files
Every .s file is now handled through CC
2019-12-11 15:23:40 +01:00
Thom Wiggers
faf1a80f1e
fixup! Add Dilithium's AVX2 implementations 2019-12-09 09:59:28 +01:00
Thom Wiggers
b4e4964315
Add Dilithium's AVX2 implementations 2019-12-06 16:16:41 +01:00
Leon Botros
bc2fdb6921 remove empty lines at end of file 2019-10-24 19:35:55 +02:00
Leon Botros
a7850eab51 add duplicate consistency checks 2019-10-24 19:35:55 +02:00
Sebastian
56a0fcb135 qTESLA (#239)
* Copied qTESLA-p-I round2 (2019-08-19) code

* Code compiles, NIST-KAT works

* Included detached signature API

* Generated testvectors

* Fixed name in api.h

* code style

* Fixed error in Makefile

* Passing pytest

* Fixing types (uint8_t bytes and size_t indices)

* Replaced SHAKE with SHAKE128 where necessary

* Fixed bug: (signed) integer overflow

* Added qTESLA-p-III

* Code is now independent of machine endianness

* repaired Microsoft makefile
2019-10-21 14:26:27 +02:00
Matthias J. Kannwischer
1e04996465 re-add duplicate consistency checks 2019-09-24 14:43:23 +02:00
Thom Wiggers
7931383443
fixup! Add Kyber90s
Add duplicate consistency files
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
aa46b5239d Enable valgrind exit errorcode and remove Rainbow (#223)
* Enable valgrind exit errorcode

It seems we were not doing anything with the valgrind results... D:

* Use --exit-on-first-error if available

* Revert "Merge pull request #182 from PQClean/rainbow"

This reverts commit 8a008417fe, reversing
changes made to d4b612fe9a.
2019-09-05 10:08:42 +02:00
Leon Botros
42256ec189 forgot to add updated dupicate consistency checks 2019-08-24 16:55:15 +02:00
Leon Botros
9dd4a4b5da fix requested changes 2019-08-24 15:48:38 +02:00
Leon Botros
b084f55ff6 update duplicate consistency checks 2019-08-21 21:29:08 +02:00
Leon Botros
e4a5cc3cf2 add karatsuba + toom-cook-3 without VLAs 2019-08-21 17:31:57 +02:00
Matthias J. Kannwischer
fcbf6d98f2 add duplicate consistency checks 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
e543aea8ea add duplicate consistency checks for saber 2019-06-24 09:14:24 +02:00
Thom Wiggers
e7d936e24a
Merge pull request #186 from leonbotros/leda
LEDAcrypt KEM-LT
2019-06-17 18:33:02 +02:00
Leon
3c733b6691 resolve todo, remove asserts, add duplicate checks and make sure they pass 2019-06-17 14:03:59 +02:00
Matthias J. Kannwischer
e56b2e5556
Add Dilithium (#172)
* fixes dynamic memory allocation test. previously a function called freeze() would trigger it

* this adds DilithiumII. Preprocessor conditionals still need to be removed

* fix ms Makefile

* fix MS compiler warnings

* clean-up

* remove preprocessor conditionals

* add dilithium3

* add dilithium4

* add duplicate consistency checks

* SHA2 state constants in common

* clean up symmetric.h

* Port SPHINCS+-SHA256 to sha256ctx struct

* Implement ctx struct for fips202

* Port Kyber{512,768,1024} to fips202 ctx struct

* Port NewHope to fips202 structs

* Port SPHINCS+-SHAKE256 to fips202 ctx structs

* Use opaque fips202 structs in MQDSS

* port dilithium to use fips202 ctx structs

* include -Wredundant-decls

* remove comment; format NTT constants

* reduce casts in power2round
2019-06-11 04:18:05 -05:00
Matthias J. Kannwischer
c7c080568e add opt versions of frodokem976aes, frodokem976shake, frodokem1344aes, frodokem1344shake and the corresponding duplicate checks 2019-05-22 07:42:43 +02:00
Matthias J. Kannwischer
df4319c47f add duplicate consistency check 2019-05-21 15:58:20 +02:00
Matthias J. Kannwischer
3d67b4c1c2 add duplicate consistency checks and remove some comments 2019-05-17 16:10:07 +02:00
Douglas Stebila
4270a54161
Merge pull request #162 from PQClean/mqdss
MQDSS
2019-05-10 10:43:59 -04:00
Douglas Stebila
3d7cbefd3b
Merge pull request #118 from PQClean/all-the-sphincs
Add ALL the SPHINCS
2019-05-10 10:43:09 -04:00
Joost Rijneveld
d219bd7a16
Remove api.h from duplicate files 2019-04-30 11:23:40 +02:00