lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220209070608.985213-1-clabbe@baylibre.com>
Date:   Wed,  9 Feb 2022 07:06:08 +0000
From:   Corentin Labbe <clabbe@...libre.com>
To:     davem@...emloft.net, gilad@...yossef.com,
        herbert@...dor.apana.org.au
Cc:     linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        Corentin Labbe <clabbe@...libre.com>
Subject: [PATCH] crypto: ccree: fix xts-aes-ccree blocksize

loading ccree on next-20220207 with CRYPTO_MANAGER_EXTRA_TESTS show a warning:
alg: skcipher: blocksize for xts-aes-ccree (1) doesn't match generic impl (16)
alg: self-tests for xts-aes-ccree (xts(aes)) failed (rc=-22)

After setting the correct blocksize, selftests pass.

Fixes: 67caef08a71f ("crypto: ccree - enable CTS support in AES-XTS")
Signed-off-by: Corentin Labbe <clabbe@...libre.com>
---
 drivers/crypto/ccree/cc_cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c
index 78833491f534..d955fe15cf40 100644
--- a/drivers/crypto/ccree/cc_cipher.c
+++ b/drivers/crypto/ccree/cc_cipher.c
@@ -1010,7 +1010,7 @@ static const struct cc_alg_template skcipher_algs[] = {
 	{
 		.name = "xts(paes)",
 		.driver_name = "xts-paes-ccree",
-		.blocksize = 1,
+		.blocksize = XTS_BLOCK_SIZE,
 		.template_skcipher = {
 			.setkey = cc_cipher_sethkey,
 			.encrypt = cc_cipher_encrypt,
@@ -1140,7 +1140,7 @@ static const struct cc_alg_template skcipher_algs[] = {
 		 */
 		.name = "xts(aes)",
 		.driver_name = "xts-aes-ccree",
-		.blocksize = 1,
+		.blocksize = XTS_BLOCK_SIZE,
 		.template_skcipher = {
 			.setkey = cc_cipher_setkey,
 			.encrypt = cc_cipher_encrypt,
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ