Matthias J. Kannwischer
cb0e8367c6
initial rainbow version. still with preprocessor conditionals
2019-07-16 15:56:01 -04:00
Thom Wiggers
aa4611a4d1
Eliminate the global state
...
This PR sacrifices passing some extra arguments to get rid of the global
state.
* Haraka needs state in all hash calls, this results in changes to the
hash functions specified in `hash.h`. The extra pointers passed would
not be necessary for SHA256 or SHAKE256.
* SHAKE256 did not have global state, but uniformity in the implementations
requires us to pass around the new state context anyway. Otherwise,
@joostrijneveld's SPHINCS+ generator doesn't really work anymore).
We introduce a new header file called `primitive.h` which defines the
required state type for the generic functions. I did not go into
replacing _all_ occurrences of state variables by the new `hash_state`
macro.
2019-07-16 15:46:27 -04: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
Matthias J. Kannwischer
2d2211791f
polish dilithium
2019-06-11 17:04:36 +02:00
Matthias J. Kannwischer
d5818a40b0
change include order; add missing includes ( #185 )
2019-06-11 15:09:07 +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
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
0e73f2dda2
Use opaque fips202 structs in MQDSS
2019-05-20 10:52:28 +02:00
Thom Wiggers
692fba119c
Port SPHINCS+-SHAKE256 to fips202 ctx structs
2019-05-20 10:38:31 +02:00
Thom Wiggers
6953a0b32e
Port SPHINCS+-SHA256 to sha256ctx struct
2019-05-20 10:21:52 +02:00
Joost Rijneveld
cae06d3e19
Merge pull request #170 from PQClean/nistkat_signature
...
Check NIST KAT test vectors for signatures as well
2019-05-16 13:29:54 +02:00
Matthias J. Kannwischer
951f7a0824
check nist kats for signatures. resolves #169
2019-05-16 11:20:18 +02:00
Joost Rijneveld
299ffc951d
Mark variable as extern in .h; declare in .c
2019-05-15 11:09:25 +02:00
Joost Rijneveld
f846727acb
Revert "Remove redundant array decl SPHINCS+"
...
This reverts commit 00639575b0
.
2019-05-15 10:44:38 +02:00
Joost Rijneveld
00639575b0
Remove redundant array decl SPHINCS+
2019-05-15 10:23:33 +02:00
Douglas Stebila
4270a54161
Merge pull request #162 from PQClean/mqdss
...
MQDSS
2019-05-10 10:43:59 -04:00
Joost Rijneveld
2502ed604b
Add windows Makefiles
2019-04-30 11:35:51 +02:00
Joost Rijneveld
a91df71776
Add MQDSS-64
2019-04-30 11:16:50 +02:00
Joost Rijneveld
bd2dd0b126
Add MQDSS-48 license
2019-04-30 11:12:31 +02:00
Joost Rijneveld
46698bf4c8
Prevent unnecessary type coercion
2019-04-30 11:04:37 +02:00
Joost Rijneveld
8357fb1c80
Format mqdss-48
2019-04-30 10:54:16 +02:00
Joost Rijneveld
2e304246c4
Implement detached MQDSS signatures
2019-04-30 10:53:58 +02:00
Joost Rijneveld
db6f71086f
MQDSS-48 before detached signatures
2019-04-30 10:29:48 +02:00
Joost Rijneveld
f3980cf033
Fix input/output overwrite for MGF1
2019-04-24 14:04:33 +02:00
Joost Rijneveld
08e6c6c052
Use more standard -Wvla
2019-04-24 13:57:19 +02:00
Joost Rijneveld
68b12866ce
Use more standard Wvla
2019-04-24 13:52:02 +02:00
Joost Rijneveld
713f6788b9
Fix VLAs in SHA256
2019-04-24 12:57:51 +02:00
Joost Rijneveld
821916bc98
Prevent VLA in Haraka
2019-04-24 12:52:02 +02:00
Joost Rijneveld
908329e0e8
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:42:59 +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
7ee9b2cabb
Update testvector hashes after 8c007bf
2019-04-23 13:09:16 +02:00
Joost Rijneveld
5783c2d74f
Move SPHINCS secret key length to scheme META
2019-04-23 13:09:16 +02:00
Joost Rijneveld
87cb0befee
Update Haraka to constant-time implementation
...
Thanks to Stefan Kölbl
2019-04-23 13:09:16 +02:00
Thom Wiggers
1017c10d0a
Add -O3 to CFLAGS
2019-04-23 13:09:16 +02:00
Joost Rijneveld
c6af1c768e
Fix SPHINCS api.h constants
2019-04-23 13:09:16 +02:00
Joost Rijneveld
fae8313664
Add the other 35 SPHINCS+ variants
2019-04-23 13:09:16 +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
Joost Rijneveld
db7843c5eb
SPHINCS: make integer promotion explicit
2019-04-16 10:35:08 +02: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
Douglas Stebila
0bc19b3633
Fix a few nits ( #107 )
...
* Minor changes
* Gracefully degrade if clang-tidy segfaults
* Typo on returncode
2019-04-11 13:47:53 -04:00
Joost Rijneveld
26ffedc86b
SPHINCS: strictly check integer conversions
2019-04-11 11:14:49 +02:00
Joost Rijneveld
af508a9c1f
SPHINCS: remove stray Makefile variables
2019-04-10 10:07:44 +02:00
Joost Rijneveld
ba70da9189
Fix variable-length arrays using wrappers
2019-04-09 18:21:03 +02:00
Joost Rijneveld
e580dcb487
Remove stray include in api.h
2019-04-09 18:21:03 +02:00
Joost Rijneveld
6cb332cae5
Remove conditional preprocessor statements
2019-04-09 18:21:03 +02:00
Joost Rijneveld
80af118676
Prevent uninitialized variable warning
2019-04-09 18:21:03 +02:00
Joost Rijneveld
a300190d5b
Resolve type coercions
2019-04-09 18:21:00 +02:00
Joost Rijneveld
a14dcefb32
Add SPHINCS-SHAKE256-128f-simple
2019-04-09 17:26:34 +02:00
Joost Rijneveld
e7602479f1
Remove round 1 Dilithium
...
This does not implement the detached signature API, and will
change significantly for NIST's 2nd round anyway.
2019-04-08 10:23:29 +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
Joost Rijneveld
f355e77407
Clarify and reduce iterations for sig testvectors
...
This is actually different from signature functests,
which only tests mlen=32. Can be fixed later as that does
not impact the testvectors.
2019-04-05 16:32:39 +02:00
Thom Wiggers
8eacafb3c9
Fix dilithium header guard
2019-03-19 15:12:23 +00: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
7ad19a30a4
First start of windows test support
2019-03-06 17:14:31 +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
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
Peter Schwabe
bf17b28d9d
Fixed tabs in Makefile, removed gcc-specific alignment of poly
2019-02-11 08:26:26 +01:00
Douglas Stebila
3203f115e5
Remove GNUmakefile for Dilithium
2019-02-08 10:07:05 -05:00
Douglas Stebila
157977258c
Make makefiles for Dilithium consistent with merged Kyber makefiles
2019-02-08 10:06:07 -05:00
Douglas Stebila
5eb7485a01
Fix Windows build for dilithium-iii
2019-02-06 21:14:10 -05:00
Douglas Stebila
7ea8e508a3
Add Makefiles for dilithium-iii
2019-02-06 21:02:34 -05:00
Matthias J. Kannwischer
3b47fb2db7
check for license files
2019-01-29 17:45:37 +01:00
Thom Wiggers
66d5284e43
Fix specification of current implementations
...
See #2
2019-01-29 17:25:55 +01:00
Thom Wiggers
0c65364f34
Remove obsolete SHA3 hash from META.yml files.
...
We moved to SHA256 for compatibility with older versions of Python 3, and this hash is thus unchecked. It will only get out of date, so it seems better to remove it.
2019-01-29 16:39:27 +01:00
Joost Rijneveld
5d5b6f26a3
Ensure Python3.5 compatibility
...
This means we must downgrade to SHA256, as SHA3 is not in hashlib.
2019-01-23 11:27:43 +01:00
Joost Rijneveld
4cac434f47
Namespace Kyber768 and Dilithium-III
2019-01-22 17:40:27 +01:00
Matthias J. Kannwischer
f7fb850ecf
check testvectors
2019-01-18 14:43:05 +01:00
Joost Rijneveld
e61a320aed
Move tests to separate directory
2019-01-17 17:44:55 +01:00
Joost Rijneveld
9760f45a46
Move scheme-specific META to scheme directory
2019-01-16 18:09:21 +01:00
Thom Wiggers
4d0082fa43
Add travis config
...
Also fixes some tidy issues
Not sure why my local clang-tidy doesn't complain
2019-01-16 14:54:24 +01:00
Matthias J. Kannwischer
e32b091ead
add testvector generation
2019-01-16 14:21:52 +01:00
Thom Wiggers
c0deaa4952
Add automatic testing
2019-01-16 13:52:53 +01:00
Thom Wiggers
6a8a9a0bf3
Fix tidy for signing
2019-01-16 13:02:35 +01:00
Joost Rijneveld
7028025eb9
Normalize whitespace
2019-01-16 11:02:32 +01:00
Joost Rijneveld
20fb166d01
Add META.yml for Dilithium-III
2019-01-16 10:25:34 +01:00
Joost Rijneveld
2a5a628e48
Add Dilithium-III
2019-01-16 10:21:05 +01:00