Merge commit 'HEAD@{1}' (modified PR 17)

This commit is contained in:
Peter Schwabe 2019-02-11 08:57:05 +01:00
commit 06b4279e0a
6 changed files with 39 additions and 8 deletions

View File

@ -4,9 +4,9 @@
[![Build status](https://ci.appveyor.com/api/projects/status/186ky7yb9mlqj3io?svg=true)](https://ci.appveyor.com/project/PQClean/pqclean)
**PQClean**, in short, is an effort to collect **clean** implementations of the post-quantum
schemes that are in the
schemes that are in the
[NIST post-quantum project](https://csrc.nist.gov/projects/post-quantum-cryptography).
The goal of PQClean is to provide *standalone implementations* that
The goal of PQClean is to provide *standalone implementations* that
* can easily be integrated into libraries such as [liboqs](https://openquantumsafe.org/#liboqs) or [libpqcrypto](https://libpqcrypto.org/);
* can efficiently upstream into higher-level protocol integration efforts such as [Open Quantum Safe](https://openquantumsafe.org/#integrations);
@ -23,7 +23,7 @@ What PQClean is **not** aiming for is
* including integration into higher-level applications or protocols.
As a first main target, we are collecting C implementations that fulfill the requirements
listed below.
listed below.
## Requirements on C implementations that are automatically checked
@ -77,7 +77,7 @@ _The checking of items on this list is still being developed. Checked items shou
## Clean C implementations currently in PQClean
Currently, the continuous-integration and testing environment of PQClean is still work in progress
Currently, the continuous-integration and testing environment of PQClean is still work in progress
and as a consequence PQClean does not yet have many implementations.
<!--
@ -94,7 +94,7 @@ and as a consequence PQClean does not yet have many implementations.
## API used by PQClean
PQClean is essentially using the same API as required for the NIST reference implementations,
PQClean is essentially using the same API as required for the NIST reference implementations,
which is also used by SUPERCOP and by libpqcrypto. The only two differences to that API are
the following:
* All lengths are passed as type `size_t` instead of `unsigned long long`; and

View File

@ -1,4 +1,4 @@
# This Makefile has been tested with GNU Make and BSD Make
# This Makefile can be used with GNU Make or BSD Make
LIB=libkyber768_clean.a
OBJECTS=cbd.o indcpa.o kem.o kex.o ntt.o poly.o polyvec.o precomp.o reduce.o verify.o

View File

@ -0,0 +1,15 @@
# This Makefile can be used with GNU Make or BSD Make
LIB=libdilithium-iii_clean.a
OBJECTS=ntt.o packing.o poly.o polyvec.o reduce.o rounding.o sign.o
CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99 -I../../../common $(EXTRAFLAGS)
all: $(LIB)
$(LIB): $(OBJECTS)
$(AR) -r $@ $(OBJECTS)
clean:
$(RM) $(OBJECTS)
$(RM) $(LIB)

View File

@ -0,0 +1,16 @@
# This Makefile can be used with Microsoft Visual Studio's nmake using the command:
# nmake /f Makefile.Microsoft_nmake
LIB=libdilithium-iii_clean.lib
OBJECTS=ntt.obj packing.obj poly.obj polyvec.obj reduce.obj rounding.obj sign.obj
CFLAGS=/I ..\..\..\common /W1 /WX # FIXME: ideally would use /W4 instead of /W1, but too many failures in Dilithium right now
all: $(LIB)
$(LIB): $(OBJECTS)
LIB.EXE /OUT:$@ $**
clean:
DEL $(OBJECTS)
DEL $(LIB)

View File

@ -7,7 +7,7 @@
typedef struct {
uint32_t coeffs[N];
} poly __attribute__((aligned(32)));
} poly;
void PQCLEAN_DILITHIUMIII_poly_reduce(poly *a);
void PQCLEAN_DILITHIUMIII_poly_csubq(poly *a);

View File

@ -5,7 +5,7 @@ SET EL=0
REM CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
REM IF ERRORLEVEL 1 SET EL=1
FOR /D %%K IN (crypto_kem\*) DO (
FOR /D %%K IN (crypto_kem\* crypto_sign\*) DO (
FOR /D %%L IN (%%K\*) DO (
cd %%L
nmake /f Makefile.Microsoft_nmake clean