Commit Graph

115 Commits

Author SHA1 Message Date
Thom Wiggers
e00c556699
Merge pull request #213 from kste/fix_haraka_msghash
Only absorb root part of pk in haraka message hashing.
2019-07-25 09:04:28 +02:00
Thom Wiggers
575d2d688b
Update hashes in META files 2019-07-24 16:35:10 +02:00
Thom Wiggers
8a008417fe
Merge pull request #182 from PQClean/rainbow
Add Rainbow
2019-07-24 15:56:14 +02:00
Matthias J. Kannwischer
1fca5ec068 unsigned -> unsigned int 2019-07-24 10:42:15 +02:00
Matthias J. Kannwischer
2bf9d8b3e9 ran clang-format 2019-07-24 10:42:15 +02:00
kste
1a27f40937 Only absorb root part of pk in haraka message hashing. 2019-07-24 08:24:33 +02:00
Thomas Pornin
65e6514be0 Set the version for "round two". 2019-07-22 08:59:08 -04:00
Thomas Pornin
7175413a5c Renamed local variable to avoid a warning about a redefinition; also disabled the MSVC warning C4146 (it is raised whenever negation is applied on an unsigned type, but this has a portable and standard behaviour, and there are good reasons to do that). 2019-07-20 22:21:11 -04:00
Thomas Pornin
dba40c7d43 Removed 'restrict' keyword (it's C99, but MSVC 2017 does not support it...). This does not seem to impact performance. 2019-07-20 21:27:27 -04:00
Thomas Pornin
87bc13c761 Some cosmetic changes to appease clang-tidy. 2019-07-20 20:35:30 -04:00
Thomas Pornin
192e72144b Falcon implementations (integer-only code, constant-time). 2019-07-20 19:44:25 -04:00
Thom Wiggers
debc9f8fd8
Document what exactly hash_state.h defines 2019-07-18 09:16:50 +02:00
Thom Wiggers
12c8a642ce
Fix Makefile (primitive.h->hash_state.h) 2019-07-17 15:53:33 +02:00
Thom Wiggers
74efb10807
Incorporate feedback
* Names passed around (mostly constant) value more clearly
* Put ``const`` where applicable (almost everywhere)
* Renamed ``primitive.h``
* Fixed some nits
2019-07-17 08:37:38 +02:00
Douglas Stebila
33ce5e14ce Remove const
This was causing compilation failures with clang, that there were 
duplicate const keywords once the macro was expanded in hash.h
2019-07-16 20:22:45 -04:00
Matthias J. Kannwischer
5788e00a1c resolve remaining todos 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
c90f95cf66 Turn 'principal-submitters' into a list in rainbow 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
143c34d930 remove unused function 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
127cc83162 add all the rainbows 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
cb878e90a8 remove preprocessor conditionals 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
fd4800fda2 proper license 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
a94d7dc76e remove another unused function 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
9d8d7d9bee remove some unused functions 2019-07-16 15:56:02 -04:00
Matthias J. Kannwischer
bf9af978d9 add rainbowIa-cyclic 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
d42e96368a cyclic and compressedcycles parameter sets 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
64413d2bab move code out of headers 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
24014ae255 more Windows errors 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
a7253a3530 make Windows and 32-bit systems (slightly more?) happy 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
cf181decc7 refactor hash to use size_t 2019-07-16 15:56:01 -04:00
Matthias J. Kannwischer
b87bca514e remove preprocessor conditionals 2019-07-16 15:56:01 -04:00
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