diff --git a/.travis.yml b/.travis.yml index 01884e66..db8f4cac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,47 +4,58 @@ dist: xenial matrix: include: - - os: linux + - name: "Linux + GCC + Linting + Metadata" + os: linux compiler: gcc env: - MAKETARGET="test-all tidy-all check-format check-metadata check-license-files" addons: apt: packages: - - valgrind - python3 - - python3-setuptools - - python3-pip - - os: linux + - python3-yaml + - valgrind + - name: "Linux + Clang" + os: linux compiler: clang env: - MAKETARGET=test-all addons: apt: packages: - - valgrind - python3 - - python3-setuptools - - python3-pip - - os: osx + - python3-yaml + - valgrind + - name: "Run tests on qemu-ppc" + os: linux + services: docker + env: + - MAKETARGET="run-functest-all run-testvectors-all run-sanitizer-all run-symbol-namespace-all" + script: # TODO: should we do this in a Dockerfile instead? + - docker run --rm --privileged multiarch/qemu-user-static:register --reset + - docker run --rm -v `pwd`:`pwd` -w `pwd` "twiggers/debian-sid-powerpc" /bin/bash -c "uname -a && + make ${MAKETARGET}" + - name: "MacOS + Clang" + os: osx osx_image: xcode10.1 compiler: clang + before_install: + - pip3 install -r requirements.txt env: - MAKETARGET=test-all - - os: osx + - name: "MacOS + GCC8" + os: osx osx_image: xcode10.1 compiler: gcc addons: homebrew: packages: - gcc@8 + before_install: + - pip3 install -r requirements.txt env: - MAKETARGET=test-all -before_install: - - python3 --version - - pip3 install -r requirements.txt - script: - make ${MAKETARGET} diff --git a/Makefile b/Makefile index df4c1ca6..a99e7a90 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99 -g $(EXTRAFLAGS) ALL_SCHEMES=$(filter-out crypto_%.c, $(wildcard crypto_*/*)) +COMMON_FILES = common/fips202.c common/sha2.c +RANDOM_IMPL = common/randombytes.c default: help @@ -19,8 +21,9 @@ bin/functest_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))functest.c $(wildcard -iquote "./common/" \ -iquote "$(SCHEME)/clean/" \ -o bin/functest_$(subst /,_,$(SCHEME)) \ - common/*.c \ $(SCHEME)/clean/*.c \ + $(COMMON_FILES) \ + $(RANDOM_IMPL) \ $< .PHONY: functest @@ -45,7 +48,8 @@ bin/sanitizer_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))functest.c $(wildcard -iquote "./common/" \ -iquote "$(SCHEME)/clean/" \ -o bin/sanitizer_$(subst /,_,$(SCHEME)) \ - common/*.c \ + $(COMMON_FILES) \ + $(RANDOM_IMPL) \ $(SCHEME)/clean/*.c \ $< @@ -59,7 +63,8 @@ bin/testvectors_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))testvectors.c $(wil -iquote "./common/" \ -iquote "$(SCHEME)/clean/" \ -o bin/testvectors_$(subst /,_,$(SCHEME)) \ - common/*.c \ + $(COMMON_FILES) \ + common/notrandombytes.c \ $(SCHEME)/clean/*.c \ $< diff --git a/README.md b/README.md index 2abd1e0c..3e28d509 100644 --- a/README.md +++ b/README.md @@ -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.