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:
parent
706cf6b448
commit
60ac9c4d6b
@ -4,13 +4,16 @@
|
|||||||
TOPDIR = ../..
|
TOPDIR = ../..
|
||||||
SRCDIR = $(TOPDIR)/libraries/Crypto
|
SRCDIR = $(TOPDIR)/libraries/Crypto
|
||||||
SRCDIR2 = $(TOPDIR)/libraries/NewHope
|
SRCDIR2 = $(TOPDIR)/libraries/NewHope
|
||||||
|
SRCDIR3 = $(TOPDIR)/libraries/CryptoLW
|
||||||
|
|
||||||
#VPATH = $(SRCDIR)
|
#VPATH = $(SRCDIR)
|
||||||
vpath %.cpp $(SRCDIR)
|
vpath %.cpp $(SRCDIR)
|
||||||
vpath %.cpp $(SRCDIR2)
|
vpath %.cpp $(SRCDIR2)
|
||||||
|
vpath %.cpp $(SRCDIR3)/src
|
||||||
vpath %.o .
|
vpath %.o .
|
||||||
vpath %.ino $(SRCDIR)/examples
|
vpath %.ino $(SRCDIR)/examples
|
||||||
vpath %.ino $(SRCDIR2)/examples
|
vpath %.ino $(SRCDIR2)/examples
|
||||||
|
vpath %.ino $(SRCDIR3)/examples
|
||||||
vpath %.sketch .
|
vpath %.sketch .
|
||||||
|
|
||||||
LIBRARY = libCrypto.a
|
LIBRARY = libCrypto.a
|
||||||
@ -18,12 +21,14 @@ LIBRARY = libCrypto.a
|
|||||||
CPPFLAGS = \
|
CPPFLAGS = \
|
||||||
-I$(TOPDIR)/host/emulation \
|
-I$(TOPDIR)/host/emulation \
|
||||||
-I$(TOPDIR)/libraries/Crypto \
|
-I$(TOPDIR)/libraries/Crypto \
|
||||||
|
-I$(TOPDIR)/libraries/CryptoLW/src \
|
||||||
-I$(TOPDIR)/libraries/NewHope \
|
-I$(TOPDIR)/libraries/NewHope \
|
||||||
-DHOST_BUILD
|
-DHOST_BUILD
|
||||||
|
|
||||||
CXXFLAGS = -g -Wall $(CPPFLAGS)
|
CXXFLAGS = -g -Wall $(CPPFLAGS)
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
|
Acorn128.cpp \
|
||||||
AES128.cpp \
|
AES128.cpp \
|
||||||
AES192.cpp \
|
AES192.cpp \
|
||||||
AES256.cpp \
|
AES256.cpp \
|
||||||
@ -66,6 +71,7 @@ SOURCES = \
|
|||||||
XTS.cpp
|
XTS.cpp
|
||||||
|
|
||||||
SKETCHES = \
|
SKETCHES = \
|
||||||
|
TestAcorn/TestAcorn.ino \
|
||||||
TestAES/TestAES.ino \
|
TestAES/TestAES.ino \
|
||||||
TestAESTiny/TestAESTiny.ino \
|
TestAESTiny/TestAESTiny.ino \
|
||||||
TestAESSmall/TestAESSmall.ino \
|
TestAESSmall/TestAESSmall.ino \
|
||||||
|
@ -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)
|
void Acorn128::encrypt(uint8_t *output, const uint8_t *input, size_t len)
|
||||||
{
|
{
|
||||||
uint32_t temp;
|
|
||||||
if (!state.authDone) {
|
if (!state.authDone) {
|
||||||
acornPad(&state, CB_1);
|
acornPad(&state, CB_1);
|
||||||
state.authDone = 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)
|
void Acorn128::decrypt(uint8_t *output, const uint8_t *input, size_t len)
|
||||||
{
|
{
|
||||||
uint32_t temp;
|
|
||||||
if (!state.authDone) {
|
if (!state.authDone) {
|
||||||
acornPad(&state, CB_1);
|
acornPad(&state, CB_1);
|
||||||
state.authDone = 1;
|
state.authDone = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user