[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240730115838.3507302-6-quic_mdalam@quicinc.com>
Date: Tue, 30 Jul 2024 17:28:37 +0530
From: Md Sadre Alam <quic_mdalam@...cinc.com>
To: axboe@...nel.dk, agk@...hat.com, snitzer@...nel.org, mpatocka@...hat.com,
adrian.hunter@...el.com, quic_asutoshd@...cinc.com,
ritesh.list@...il.com, ulf.hansson@...aro.org, andersson@...nel.org,
konrad.dybcio@...aro.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, dm-devel@...ts.linux.dev,
linux-mmc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
quic_viswanat@...cinc.com, quic_srichara@...cinc.com,
quic_varada@...cinc.com
Cc: quic_mdalam@...cinc.com
Subject: [PATCH 5/6] mmc: cqhci: Add additional algo mode for inline encryption
Add support for AES-XTS-256, AES-CBC-128 and AES-CBC-256 in
cqhci_crypto_algs for inline encryption.
Signed-off-by: Md Sadre Alam <quic_mdalam@...cinc.com>
---
drivers/mmc/host/cqhci-crypto.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/mmc/host/cqhci-crypto.c b/drivers/mmc/host/cqhci-crypto.c
index d5f4b6972f63..85ab7bb87886 100644
--- a/drivers/mmc/host/cqhci-crypto.c
+++ b/drivers/mmc/host/cqhci-crypto.c
@@ -16,10 +16,22 @@ static const struct cqhci_crypto_alg_entry {
enum cqhci_crypto_alg alg;
enum cqhci_crypto_key_size key_size;
} cqhci_crypto_algs[BLK_ENCRYPTION_MODE_MAX] = {
+ [BLK_ENCRYPTION_MODE_AES_128_XTS] = {
+ .alg = CQHCI_CRYPTO_ALG_AES_XTS,
+ .key_size = CQHCI_CRYPTO_KEY_SIZE_128,
+ },
[BLK_ENCRYPTION_MODE_AES_256_XTS] = {
.alg = CQHCI_CRYPTO_ALG_AES_XTS,
.key_size = CQHCI_CRYPTO_KEY_SIZE_256,
},
+ [BLK_ENCRYPTION_MODE_AES_128_CBC] = {
+ .alg = CQHCI_CRYPTO_ALG_BITLOCKER_AES_CBC,
+ .key_size = CQHCI_CRYPTO_KEY_SIZE_128,
+ },
+ [BLK_ENCRYPTION_MODE_AES_256_CBC] = {
+ .alg = CQHCI_CRYPTO_ALG_BITLOCKER_AES_CBC,
+ .key_size = CQHCI_CRYPTO_KEY_SIZE_256,
+ },
};
static inline struct cqhci_host *
--
2.34.1
Powered by blists - more mailing lists