Skip to contentSkip to conversation

crypto: testmgr: add blowfish test-vectors

PATCH New Jussi Kivilinna 1 participant 1 message Oct 10, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: testmgr: add blowfish test-vectors

Add tests for parallel blowfish-x86_64 code paths.

---
 crypto/tcrypt.c  |    1 
 crypto/testmgr.c |   15 +++++
 crypto/testmgr.h |  172 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 184 insertions(+), 4 deletions(-)
crypto/tcrypt.c +1 -0
index fc35650..91f3ab4 100644
@@ -782,6 +782,7 @@ static int do_test(int m)
 	case 7:
 		ret += tcrypt_test("ecb(blowfish)");
 		ret += tcrypt_test("cbc(blowfish)");
+		ret += tcrypt_test("ctr(blowfish)");
 		break;
 
 	case 8:
crypto/testmgr.c +15 -0
index b6b93d4..466f9c0 100644
@@ -1756,6 +1756,21 @@ static const struct alg_test_desc alg_test_descs[] = {
 			}
 		}
 	}, {
+		.alg = "ctr(blowfish)",
+		.test = alg_test_skcipher,
+		.suite = {
+			.cipher = {
+				.enc = {
+					.vecs = bf_ctr_enc_tv_template,
+					.count = BF_CTR_ENC_TEST_VECTORS
+				},
+				.dec = {
+					.vecs = bf_ctr_dec_tv_template,
+					.count = BF_CTR_DEC_TEST_VECTORS
+				}
+			}
+		}
+	}, {
 		.alg = "cts(cbc(aes))",
 		.test = alg_test_skcipher,
 		.suite = {
crypto/testmgr.h +168 -4

202 lines not on this page · raw message