1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Add Acorn128 to the host mode test suite

This commit is contained in:
Rhys Weatherley 2018-04-26 07:06:14 +10:00
parent 706cf6b448
commit 60ac9c4d6b
2 changed files with 6 additions and 2 deletions

View File

@ -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 \

View File

@ -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;