Blame SOURCES/cryptsetup-2.6.1-Run-PBKDF-benchmark-with-8-bytes-long-well-known-pas.patch

38c00b
From a33f7bf5ca33587ddb05f2acac42f93068022458 Mon Sep 17 00:00:00 2001
38c00b
From: Ondrej Kozina <okozina@redhat.com>
38c00b
Date: Fri, 2 Dec 2022 11:39:59 +0100
38c00b
Subject: [PATCH 1/3] Run PBKDF benchmark with 8 bytes long well-known
38c00b
 passphrase.
38c00b
38c00b
---
38c00b
 lib/utils_benchmark.c | 4 ++--
38c00b
 src/cryptsetup.c      | 4 ++--
38c00b
 2 files changed, 4 insertions(+), 4 deletions(-)
38c00b
38c00b
diff --git a/lib/utils_benchmark.c b/lib/utils_benchmark.c
38c00b
index 0a0c438e..d8976fb2 100644
38c00b
--- a/lib/utils_benchmark.c
38c00b
+++ b/lib/utils_benchmark.c
38c00b
@@ -187,7 +187,7 @@ int crypt_benchmark_pbkdf_internal(struct crypt_device *cd,
38c00b
 		pbkdf->parallel_threads = 0; /* N/A in PBKDF2 */
38c00b
 		pbkdf->max_memory_kb = 0; /* N/A in PBKDF2 */
38c00b
 
38c00b
-		r = crypt_benchmark_pbkdf(cd, pbkdf, "foo", 3, "01234567890abcdef", 16,
38c00b
+		r = crypt_benchmark_pbkdf(cd, pbkdf, "foobarfo", 8, "01234567890abcdef", 16,
38c00b
 					volume_key_size, &benchmark_callback, &u);
38c00b
 		pbkdf->time_ms = ms_tmp;
38c00b
 		if (r < 0) {
38c00b
@@ -207,7 +207,7 @@ int crypt_benchmark_pbkdf_internal(struct crypt_device *cd,
38c00b
 			return 0;
38c00b
 		}
38c00b
 
38c00b
-		r = crypt_benchmark_pbkdf(cd, pbkdf, "foo", 3,
38c00b
+		r = crypt_benchmark_pbkdf(cd, pbkdf, "foobarfo", 8,
38c00b
 			"0123456789abcdef0123456789abcdef", 32,
38c00b
 			volume_key_size, &benchmark_callback, &u);
38c00b
 		if (r < 0)
38c00b
diff --git a/src/cryptsetup.c b/src/cryptsetup.c
38c00b
index c2e23c6e..dfaf7682 100644
38c00b
--- a/src/cryptsetup.c
38c00b
+++ b/src/cryptsetup.c
38c00b
@@ -997,7 +997,7 @@ static int action_benchmark_kdf(const char *kdf, const char *hash, size_t key_si
38c00b
 			.time_ms = 1000,
38c00b
 		};
38c00b
 
38c00b
-		r = crypt_benchmark_pbkdf(NULL, &pbkdf, "foo", 3, "0123456789abcdef", 16, key_size,
38c00b
+		r = crypt_benchmark_pbkdf(NULL, &pbkdf, "foobarfo", 8, "0123456789abcdef", 16, key_size,
38c00b
 					&benchmark_callback, &pbkdf);
38c00b
 		if (r < 0)
38c00b
 			log_std(_("PBKDF2-%-9s     N/A\n"), hash);
38c00b
@@ -1012,7 +1012,7 @@ static int action_benchmark_kdf(const char *kdf, const char *hash, size_t key_si
38c00b
 			.parallel_threads = ARG_UINT32(OPT_PBKDF_PARALLEL_ID)
38c00b
 		};
38c00b
 
38c00b
-		r = crypt_benchmark_pbkdf(NULL, &pbkdf, "foo", 3,
38c00b
+		r = crypt_benchmark_pbkdf(NULL, &pbkdf, "foobarfo", 8,
38c00b
 			"0123456789abcdef0123456789abcdef", 32,
38c00b
 			key_size, &benchmark_callback, &pbkdf);
38c00b
 		if (r < 0)
38c00b
-- 
38c00b
2.38.1
38c00b