[Cryptech-Commits] [sw/libhal] branch pymux updated: Compile-time configuration of software-only hash cores.
git at cryptech.is
git at cryptech.is
Mon Feb 27 21:14:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
sra at hactrn.net pushed a commit to branch pymux
in repository sw/libhal.
The following commit(s) were added to refs/heads/pymux by this push:
new a94d48d Compile-time configuration of software-only hash cores.
a94d48d is described below
commit a94d48d04137eed569c804cd0f18f5895cc79dbf
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Mon Feb 27 16:12:10 2017 -0500
Compile-time configuration of software-only hash cores.
---
Makefile | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 6c01ab4..08215a8 100644
--- a/Makefile
+++ b/Makefile
@@ -48,17 +48,19 @@ KS ?= flash
RPC_MODE ?= none
RPC_TRANSPORT ?= none
MODEXP_CORE ?= no
+HASH_CORES ?= no
ifeq (,$(and \
$(filter none eim i2c fmc ,${IO_BUS}),\
$(filter none server client-simple client-mixed ,${RPC_MODE}),\
$(filter mmap flash ,${KS}),\
$(filter none loopback serial daemon ,${RPC_TRANSPORT}),\
- $(filter no yes ,${MODEXP_CORE})))
+ $(filter no yes ,${MODEXP_CORE}),\
+ $(filter no yes ,${HASH_CORES})))
$(error ${USAGE})
endif
-$(info Building libhal with configuration IO_BUS=${IO_BUS} RPC_MODE=${RPC_MODE} KS=${KS} RPC_TRANSPORT=${RPC_TRANSPORT} MODEXP_CORE=${MODEXP_CORE})
+$(info Building libhal with configuration IO_BUS=${IO_BUS} RPC_MODE=${RPC_MODE} KS=${KS} RPC_TRANSPORT=${RPC_TRANSPORT} MODEXP_CORE=${MODEXP_CORE} HASH_CORES=${HASH_CORES})
# Whether the RSA code should use the ModExp | ModExpS6 | ModExpA7 core.
@@ -68,6 +70,14 @@ else
RSA_USE_MODEXP_CORE := 0
endif
+# Whether the hash code should use the SHA-1 / SHA-256 / SHA-512 cores.
+
+ifeq "${HASH_CORES}" "yes"
+ HASH_ONLY_USE_SOFT_CORES := 0
+else
+ HASH_ONLY_USE_SOFT_CORES := 1
+endif
+
# Object files to build, initialized with ones we always want.
# There's a balance here between skipping files we don't strictly
# need and reducing the number of unnecessary conditionals in this
@@ -167,7 +177,7 @@ ifeq "${RPC_MODE}" "none"
CFLAGS += -DHAL_RSA_USE_MODEXP=${RSA_USE_MODEXP_CORE}
else ifeq "${RPC_MODE}" "server"
OBJ += ${CORE_OBJ} ${RPC_SERVER_OBJ}
- CFLAGS += -DRPC_CLIENT=RPC_CLIENT_LOCAL -DHAL_RSA_USE_MODEXP=${RSA_USE_MODEXP_CORE}
+ CFLAGS += -DRPC_CLIENT=RPC_CLIENT_LOCAL -DHAL_RSA_USE_MODEXP=${RSA_USE_MODEXP_CORE} -DHAL_ONLY_USE_SOFTWARE_HASH_CORES=${HASH_ONLY_USE_SOFT_CORES}
else ifeq "${RPC_MODE}" "client-simple"
OBJ += ${RPC_CLIENT_OBJ}
CFLAGS += -DRPC_CLIENT=RPC_CLIENT_REMOTE -DHAL_RSA_USE_MODEXP=0 -DHAL_ONLY_USE_SOFTWARE_HASH_CORES=1
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list