aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2019-03-27 19:13:35 +0100
committerJérôme Forissier <jerome.forissier@linaro.org>2019-04-01 09:34:25 +0200
commita4ae1ebe608edaf9f21e782eebbf93a9908640ce (patch)
treeb80081d36d54b017731b8c3b3a975430a8d1ae59
parenta2aa5803d4e4980ebd426c19889f9e5a2b573832 (diff)
libmbedtls: Support cipher XTS algorithm
Cipher XTS is not supported in MbedTLS, use libtomcrypt instead. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r--core/crypto.mk2
-rw-r--r--lib/libmbedtls/core/stubbed.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/core/crypto.mk b/core/crypto.mk
index 8e7f5b30..10ee2f4b 100644
--- a/core/crypto.mk
+++ b/core/crypto.mk
@@ -170,6 +170,8 @@ _CFG_CORE_LTC_MPI := $(CFG_CRYPTO_DSA)
_CFG_CORE_LTC_SHA256_DESC := $(CFG_CRYPTO_DSA)
_CFG_CORE_LTC_SHA384_DESC := $(CFG_CRYPTO_DSA)
_CFG_CORE_LTC_SHA512_DESC := $(CFG_CRYPTO_DSA)
+_CFG_CORE_LTC_XTS := $(CFG_CRYPTO_XTS)
+_CFG_CORE_LTC_AES_DESC := $(call cfg-one-enabled, CFG_CRYPTO_XTS)
endif
###############################################################
diff --git a/lib/libmbedtls/core/stubbed.c b/lib/libmbedtls/core/stubbed.c
index 5f1dec1e..30ff8f2f 100644
--- a/lib/libmbedtls/core/stubbed.c
+++ b/lib/libmbedtls/core/stubbed.c
@@ -26,10 +26,6 @@
crypto_##name##_alloc_ctx(struct crypto_##type##_ctx **ctx __unused) \
{ return TEE_ERROR_NOT_IMPLEMENTED; }
-#if defined(CFG_CRYPTO_AES) && defined(CFG_CRYPTO_XTS)
-CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(aes_xts, cipher)
-#endif
-
#if defined(CFG_CRYPTO_CCM)
CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(aes_ccm, authenc)
#endif