From 60ac9c4d6bb1938d3e2295d07529717118e7696b Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 26 Apr 2018 07:06:14 +1000 Subject: [PATCH] Add Acorn128 to the host mode test suite --- host/Crypto/Makefile | 6 ++++++ libraries/CryptoLW/src/Acorn128.cpp | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/host/Crypto/Makefile b/host/Crypto/Makefile index 55953ce8..e2ebb306 100644 --- a/host/Crypto/Makefile +++ b/host/Crypto/Makefile @@ -4,13 +4,16 @@ TOPDIR = ../.. SRCDIR = $(TOPDIR)/libraries/Crypto SRCDIR2 = $(TOPDIR)/libraries/NewHope +SRCDIR3 = $(TOPDIR)/libraries/CryptoLW #VPATH = $(SRCDIR) vpath %.cpp $(SRCDIR) vpath %.cpp $(SRCDIR2) +vpath %.cpp $(SRCDIR3)/src vpath %.o . vpath %.ino $(SRCDIR)/examples vpath %.ino $(SRCDIR2)/examples +vpath %.ino $(SRCDIR3)/examples vpath %.sketch . LIBRARY = libCrypto.a @@ -18,12 +21,14 @@ LIBRARY = libCrypto.a CPPFLAGS = \ -I$(TOPDIR)/host/emulation \ -I$(TOPDIR)/libraries/Crypto \ + -I$(TOPDIR)/libraries/CryptoLW/src \ -I$(TOPDIR)/libraries/NewHope \ -DHOST_BUILD CXXFLAGS = -g -Wall $(CPPFLAGS) SOURCES = \ + Acorn128.cpp \ AES128.cpp \ AES192.cpp \ AES256.cpp \ @@ -66,6 +71,7 @@ SOURCES = \ XTS.cpp SKETCHES = \ + TestAcorn/TestAcorn.ino \ TestAES/TestAES.ino \ TestAESTiny/TestAESTiny.ino \ TestAESSmall/TestAESSmall.ino \ diff --git a/libraries/CryptoLW/src/Acorn128.cpp b/libraries/CryptoLW/src/Acorn128.cpp index f4be4af8..e8f2c8ae 100644 --- a/libraries/CryptoLW/src/Acorn128.cpp +++ b/libraries/CryptoLW/src/Acorn128.cpp @@ -553,7 +553,6 @@ bool Acorn128::setIV(const uint8_t *iv, size_t len) void Acorn128::encrypt(uint8_t *output, const uint8_t *input, size_t len) { - uint32_t temp; if (!state.authDone) { acornPad(&state, CB_1); state.authDone = 1; @@ -580,7 +579,6 @@ void Acorn128::encrypt(uint8_t *output, const uint8_t *input, size_t len) void Acorn128::decrypt(uint8_t *output, const uint8_t *input, size_t len) { - uint32_t temp; if (!state.authDone) { acornPad(&state, CB_1); state.authDone = 1;