ext: Pull in tinycrypt v0.2.6
Zephyr 1.9 moves to tinycrypt v0.2.7. This introduces a breaking API
change. This makes things challenging for mcuboot, which would like to
be able to work across multiple platforms.
To help with this, bring in the last working version of Tinycrypt v0.2.6
from https://github.com/01org/tinycrypt. Tinycrypt is released under a
3-clause BSD-style license, with parts under the micro-ecc license,
which is a 2-clause license. Please see ext/tinycrypt/LICENSE for
details.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/ext/tinycrypt/lib/Makefile b/ext/tinycrypt/lib/Makefile
new file mode 100644
index 0000000..ee831e8
--- /dev/null
+++ b/ext/tinycrypt/lib/Makefile
@@ -0,0 +1,39 @@
+################################################################################
+#
+# Copyright (C) 2015 by Intel Corporation, All Rights Reserved.
+#
+# Cryptographic Primitives Makefile.
+#
+################################################################################
+
+include ../config.mk
+
+# Edit the OBJS content to add/remove primitives needed from TinyCrypt library:
+OBJS:=aes_decrypt.o \
+ aes_encrypt.o \
+ cbc_mode.o \
+ ctr_mode.o \
+ ctr_prng.o \
+ hmac.o \
+ hmac_prng.o \
+ sha256.o \
+ ecc.o \
+ ecc_dh.o \
+ ecc_dsa.o \
+ ccm_mode.o \
+ cmac_mode.o \
+ utils.o
+
+DEPS:=$(OBJS:.o=.d)
+
+all: libtinycrypt.a
+
+libtinycrypt.a: $(OBJS)
+ $(AR) $(ARFLAGS) $@ $^
+
+.PHONY: clean
+
+clean:
+ -$(RM) *.exe $(OBJS) $(DEPS) *~ libtinycrypt.a
+
+-include $(DEPS)