diff options
author | Jorge Ramirez-Ortiz <jorge@foundries.io> | 2021-02-25 20:12:29 +0100 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2021-03-26 16:46:27 +0800 |
commit | 76888a99ca61e9aba859da6139ff2b1bf7f88929 (patch) | |
tree | 8bdf0c01afbcc569bc29fb0fa4048ce1cdf8e01e | |
parent | 6574895308f1aa8629fb2af90e5e31be084670c7 (diff) |
[FIO internal] libnxpse050: route aes_cbc cipher to tomcrypt
This symmetrict cipher performance was degrading RPMB access times.
With this change, 1 byte RPMB reads went down from 3 seconds to .07
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
-rw-r--r-- | core/lib/libtomcrypt/cbc.c | 2 | ||||
-rw-r--r-- | lib/libnxpse050/core/sub.mk | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/lib/libtomcrypt/cbc.c b/core/lib/libtomcrypt/cbc.c index 5fe2000df..9fc4a9615 100644 --- a/core/lib/libtomcrypt/cbc.c +++ b/core/lib/libtomcrypt/cbc.c @@ -120,7 +120,7 @@ static TEE_Result ltc_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx_ret, return TEE_SUCCESS; } -#if defined(_CFG_CORE_LTC_AES) && !defined(CFG_CORE_SE05X) +#if defined(_CFG_CORE_LTC_AES) TEE_Result crypto_aes_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx) { return ltc_cbc_alloc_ctx(ctx, find_cipher("aes"), false); diff --git a/lib/libnxpse050/core/sub.mk b/lib/libnxpse050/core/sub.mk index 235e53cf7..b4e58eee9 100644 --- a/lib/libnxpse050/core/sub.mk +++ b/lib/libnxpse050/core/sub.mk @@ -32,7 +32,8 @@ srcs-$(CFG_NXP_SE05X_RNG_DRV) += rng.c ifeq ($(CFG_CRYPTO_AES),y) # srcs-y += aes.c # srcs-$(CFG_CRYPTO_ECB) += aes_ecb.c -srcs-$(CFG_CRYPTO_CBC) += aes_cbc.c +# aes cbc cypher slows down RPMB operations, disable +# srcs-$(CFG_CRYPTO_CBC) += aes_cbc.c srcs-$(CFG_CRYPTO_CTR) += aes_ctr.c endif ifeq ($(CFG_CRYPTO_DES),y) |