aboutsummaryrefslogtreecommitdiff
path: root/drivers/auth/mbedtls/mbedtls_common.mk
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@linaro.org>2019-11-15 10:43:00 +0530
committerSumit Garg <sumit.garg@linaro.org>2020-03-06 16:40:37 +0530
commit7cda17bb0f92db39d123a4f2a1732c9978556453 (patch)
tree341aa1c3de6d7db4ca669c6901340905be92bb00 /drivers/auth/mbedtls/mbedtls_common.mk
parentd95f7a7287b21422f6a32fde8a4d735ec78e2659 (diff)
downloadtrusted-firmware-a-7cda17bb0f92db39d123a4f2a1732c9978556453.tar.gz
drivers: crypto: Add authenticated decryption framework
Add framework for autheticated decryption of data. Currently this patch optionally imports mbedtls library as a backend if build option "DECRYPTION_SUPPORT = aes_gcm" is set to perform authenticated decryption using AES-GCM algorithm. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Change-Id: I2966f0e79033151012bf4ffc66f484cd949e7271
Diffstat (limited to 'drivers/auth/mbedtls/mbedtls_common.mk')
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_common.mk b/drivers/auth/mbedtls/mbedtls_common.mk
index 4b83015417..044b368bc0 100644
--- a/drivers/auth/mbedtls/mbedtls_common.mk
+++ b/drivers/auth/mbedtls/mbedtls_common.mk
@@ -23,13 +23,17 @@ MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c
LIBMBEDTLS_SRCS := $(addprefix ${MBEDTLS_DIR}/library/, \
+ aes.c \
asn1parse.c \
asn1write.c \
+ cipher.c \
+ cipher_wrap.c \
memory_buffer_alloc.c \
oid.c \
platform.c \
platform_util.c \
bignum.c \
+ gcm.c \
md.c \
md_wrap.c \
pk.c \
@@ -87,11 +91,17 @@ else
$(error "TF_MBEDTLS_KEY_ALG=${TF_MBEDTLS_KEY_ALG} not supported on mbed TLS")
endif
+ifeq (${DECRYPTION_SUPPORT}, aes_gcm)
+ TF_MBEDTLS_USE_AES_GCM := 1
+else
+ TF_MBEDTLS_USE_AES_GCM := 0
+endif
+
# Needs to be set to drive mbed TLS configuration correctly
$(eval $(call add_define,TF_MBEDTLS_KEY_ALG_ID))
$(eval $(call add_define,TF_MBEDTLS_KEY_SIZE))
$(eval $(call add_define,TF_MBEDTLS_HASH_ALG_ID))
-
+$(eval $(call add_define,TF_MBEDTLS_USE_AES_GCM))
$(eval $(call MAKE_LIB,mbedtls))