summaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r--crypto/testmgr.c1055
1 files changed, 216 insertions, 839 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 44e888b0b041..f9c378af3907 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -265,6 +265,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
265 const int align_offset) 265 const int align_offset)
266{ 266{
267 const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm)); 267 const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm));
268 size_t digest_size = crypto_ahash_digestsize(tfm);
268 unsigned int i, j, k, temp; 269 unsigned int i, j, k, temp;
269 struct scatterlist sg[8]; 270 struct scatterlist sg[8];
270 char *result; 271 char *result;
@@ -275,7 +276,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
275 char *xbuf[XBUFSIZE]; 276 char *xbuf[XBUFSIZE];
276 int ret = -ENOMEM; 277 int ret = -ENOMEM;
277 278
278 result = kmalloc(MAX_DIGEST_SIZE, GFP_KERNEL); 279 result = kmalloc(digest_size, GFP_KERNEL);
279 if (!result) 280 if (!result)
280 return ret; 281 return ret;
281 key = kmalloc(MAX_KEYLEN, GFP_KERNEL); 282 key = kmalloc(MAX_KEYLEN, GFP_KERNEL);
@@ -305,7 +306,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
305 goto out; 306 goto out;
306 307
307 j++; 308 j++;
308 memset(result, 0, MAX_DIGEST_SIZE); 309 memset(result, 0, digest_size);
309 310
310 hash_buff = xbuf[0]; 311 hash_buff = xbuf[0];
311 hash_buff += align_offset; 312 hash_buff += align_offset;
@@ -380,7 +381,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
380 continue; 381 continue;
381 382
382 j++; 383 j++;
383 memset(result, 0, MAX_DIGEST_SIZE); 384 memset(result, 0, digest_size);
384 385
385 temp = 0; 386 temp = 0;
386 sg_init_table(sg, template[i].np); 387 sg_init_table(sg, template[i].np);
@@ -458,7 +459,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
458 continue; 459 continue;
459 460
460 j++; 461 j++;
461 memset(result, 0, MAX_DIGEST_SIZE); 462 memset(result, 0, digest_size);
462 463
463 ret = -EINVAL; 464 ret = -EINVAL;
464 hash_buff = xbuf[0]; 465 hash_buff = xbuf[0];
@@ -1463,13 +1464,12 @@ static int test_acomp(struct crypto_acomp *tfm, struct comp_testvec *ctemplate,
1463 int ilen = ctemplate[i].inlen; 1464 int ilen = ctemplate[i].inlen;
1464 void *input_vec; 1465 void *input_vec;
1465 1466
1466 input_vec = kmalloc(ilen, GFP_KERNEL); 1467 input_vec = kmemdup(ctemplate[i].input, ilen, GFP_KERNEL);
1467 if (!input_vec) { 1468 if (!input_vec) {
1468 ret = -ENOMEM; 1469 ret = -ENOMEM;
1469 goto out; 1470 goto out;
1470 } 1471 }
1471 1472
1472 memcpy(input_vec, ctemplate[i].input, ilen);
1473 memset(output, 0, dlen); 1473 memset(output, 0, dlen);
1474 init_completion(&result.completion); 1474 init_completion(&result.completion);
1475 sg_init_one(&src, input_vec, ilen); 1475 sg_init_one(&src, input_vec, ilen);
@@ -1525,13 +1525,12 @@ static int test_acomp(struct crypto_acomp *tfm, struct comp_testvec *ctemplate,
1525 int ilen = dtemplate[i].inlen; 1525 int ilen = dtemplate[i].inlen;
1526 void *input_vec; 1526 void *input_vec;
1527 1527
1528 input_vec = kmalloc(ilen, GFP_KERNEL); 1528 input_vec = kmemdup(dtemplate[i].input, ilen, GFP_KERNEL);
1529 if (!input_vec) { 1529 if (!input_vec) {
1530 ret = -ENOMEM; 1530 ret = -ENOMEM;
1531 goto out; 1531 goto out;
1532 } 1532 }
1533 1533
1534 memcpy(input_vec, dtemplate[i].input, ilen);
1535 memset(output, 0, dlen); 1534 memset(output, 0, dlen);
1536 init_completion(&result.completion); 1535 init_completion(&result.completion);
1537 sg_init_one(&src, input_vec, ilen); 1536 sg_init_one(&src, input_vec, ilen);
@@ -2251,30 +2250,23 @@ static int alg_test_null(const struct alg_test_desc *desc,
2251 return 0; 2250 return 0;
2252} 2251}
2253 2252
2253#define __VECS(tv) { .vecs = tv, .count = ARRAY_SIZE(tv) }
2254
2254/* Please keep this list sorted by algorithm name. */ 2255/* Please keep this list sorted by algorithm name. */
2255static const struct alg_test_desc alg_test_descs[] = { 2256static const struct alg_test_desc alg_test_descs[] = {
2256 { 2257 {
2257 .alg = "ansi_cprng", 2258 .alg = "ansi_cprng",
2258 .test = alg_test_cprng, 2259 .test = alg_test_cprng,
2259 .suite = { 2260 .suite = {
2260 .cprng = { 2261 .cprng = __VECS(ansi_cprng_aes_tv_template)
2261 .vecs = ansi_cprng_aes_tv_template,
2262 .count = ANSI_CPRNG_AES_TEST_VECTORS
2263 }
2264 } 2262 }
2265 }, { 2263 }, {
2266 .alg = "authenc(hmac(md5),ecb(cipher_null))", 2264 .alg = "authenc(hmac(md5),ecb(cipher_null))",
2267 .test = alg_test_aead, 2265 .test = alg_test_aead,
2268 .suite = { 2266 .suite = {
2269 .aead = { 2267 .aead = {
2270 .enc = { 2268 .enc = __VECS(hmac_md5_ecb_cipher_null_enc_tv_template),
2271 .vecs = hmac_md5_ecb_cipher_null_enc_tv_template, 2269 .dec = __VECS(hmac_md5_ecb_cipher_null_dec_tv_template)
2272 .count = HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS
2273 },
2274 .dec = {
2275 .vecs = hmac_md5_ecb_cipher_null_dec_tv_template,
2276 .count = HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS
2277 }
2278 } 2270 }
2279 } 2271 }
2280 }, { 2272 }, {
@@ -2282,12 +2274,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2282 .test = alg_test_aead, 2274 .test = alg_test_aead,
2283 .suite = { 2275 .suite = {
2284 .aead = { 2276 .aead = {
2285 .enc = { 2277 .enc = __VECS(hmac_sha1_aes_cbc_enc_tv_temp)
2286 .vecs =
2287 hmac_sha1_aes_cbc_enc_tv_temp,
2288 .count =
2289 HMAC_SHA1_AES_CBC_ENC_TEST_VEC
2290 }
2291 } 2278 }
2292 } 2279 }
2293 }, { 2280 }, {
@@ -2295,12 +2282,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2295 .test = alg_test_aead, 2282 .test = alg_test_aead,
2296 .suite = { 2283 .suite = {
2297 .aead = { 2284 .aead = {
2298 .enc = { 2285 .enc = __VECS(hmac_sha1_des_cbc_enc_tv_temp)
2299 .vecs =
2300 hmac_sha1_des_cbc_enc_tv_temp,
2301 .count =
2302 HMAC_SHA1_DES_CBC_ENC_TEST_VEC
2303 }
2304 } 2286 }
2305 } 2287 }
2306 }, { 2288 }, {
@@ -2309,12 +2291,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2309 .fips_allowed = 1, 2291 .fips_allowed = 1,
2310 .suite = { 2292 .suite = {
2311 .aead = { 2293 .aead = {
2312 .enc = { 2294 .enc = __VECS(hmac_sha1_des3_ede_cbc_enc_tv_temp)
2313 .vecs =
2314 hmac_sha1_des3_ede_cbc_enc_tv_temp,
2315 .count =
2316 HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC
2317 }
2318 } 2295 }
2319 } 2296 }
2320 }, { 2297 }, {
@@ -2326,18 +2303,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2326 .test = alg_test_aead, 2303 .test = alg_test_aead,
2327 .suite = { 2304 .suite = {
2328 .aead = { 2305 .aead = {
2329 .enc = { 2306 .enc = __VECS(hmac_sha1_ecb_cipher_null_enc_tv_temp),
2330 .vecs = 2307 .dec = __VECS(hmac_sha1_ecb_cipher_null_dec_tv_temp)
2331 hmac_sha1_ecb_cipher_null_enc_tv_temp,
2332 .count =
2333 HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC
2334 },
2335 .dec = {
2336 .vecs =
2337 hmac_sha1_ecb_cipher_null_dec_tv_temp,
2338 .count =
2339 HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC
2340 }
2341 } 2308 }
2342 } 2309 }
2343 }, { 2310 }, {
@@ -2349,12 +2316,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2349 .test = alg_test_aead, 2316 .test = alg_test_aead,
2350 .suite = { 2317 .suite = {
2351 .aead = { 2318 .aead = {
2352 .enc = { 2319 .enc = __VECS(hmac_sha224_des_cbc_enc_tv_temp)
2353 .vecs =
2354 hmac_sha224_des_cbc_enc_tv_temp,
2355 .count =
2356 HMAC_SHA224_DES_CBC_ENC_TEST_VEC
2357 }
2358 } 2320 }
2359 } 2321 }
2360 }, { 2322 }, {
@@ -2363,12 +2325,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2363 .fips_allowed = 1, 2325 .fips_allowed = 1,
2364 .suite = { 2326 .suite = {
2365 .aead = { 2327 .aead = {
2366 .enc = { 2328 .enc = __VECS(hmac_sha224_des3_ede_cbc_enc_tv_temp)
2367 .vecs =
2368 hmac_sha224_des3_ede_cbc_enc_tv_temp,
2369 .count =
2370 HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC
2371 }
2372 } 2329 }
2373 } 2330 }
2374 }, { 2331 }, {
@@ -2377,12 +2334,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2377 .fips_allowed = 1, 2334 .fips_allowed = 1,
2378 .suite = { 2335 .suite = {
2379 .aead = { 2336 .aead = {
2380 .enc = { 2337 .enc = __VECS(hmac_sha256_aes_cbc_enc_tv_temp)
2381 .vecs =
2382 hmac_sha256_aes_cbc_enc_tv_temp,
2383 .count =
2384 HMAC_SHA256_AES_CBC_ENC_TEST_VEC
2385 }
2386 } 2338 }
2387 } 2339 }
2388 }, { 2340 }, {
@@ -2390,12 +2342,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2390 .test = alg_test_aead, 2342 .test = alg_test_aead,
2391 .suite = { 2343 .suite = {
2392 .aead = { 2344 .aead = {
2393 .enc = { 2345 .enc = __VECS(hmac_sha256_des_cbc_enc_tv_temp)
2394 .vecs =
2395 hmac_sha256_des_cbc_enc_tv_temp,
2396 .count =
2397 HMAC_SHA256_DES_CBC_ENC_TEST_VEC
2398 }
2399 } 2346 }
2400 } 2347 }
2401 }, { 2348 }, {
@@ -2404,12 +2351,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2404 .fips_allowed = 1, 2351 .fips_allowed = 1,
2405 .suite = { 2352 .suite = {
2406 .aead = { 2353 .aead = {
2407 .enc = { 2354 .enc = __VECS(hmac_sha256_des3_ede_cbc_enc_tv_temp)
2408 .vecs =
2409 hmac_sha256_des3_ede_cbc_enc_tv_temp,
2410 .count =
2411 HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC
2412 }
2413 } 2355 }
2414 } 2356 }
2415 }, { 2357 }, {
@@ -2425,12 +2367,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2425 .test = alg_test_aead, 2367 .test = alg_test_aead,
2426 .suite = { 2368 .suite = {
2427 .aead = { 2369 .aead = {
2428 .enc = { 2370 .enc = __VECS(hmac_sha384_des_cbc_enc_tv_temp)
2429 .vecs =
2430 hmac_sha384_des_cbc_enc_tv_temp,
2431 .count =
2432 HMAC_SHA384_DES_CBC_ENC_TEST_VEC
2433 }
2434 } 2371 }
2435 } 2372 }
2436 }, { 2373 }, {
@@ -2439,12 +2376,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2439 .fips_allowed = 1, 2376 .fips_allowed = 1,
2440 .suite = { 2377 .suite = {
2441 .aead = { 2378 .aead = {
2442 .enc = { 2379 .enc = __VECS(hmac_sha384_des3_ede_cbc_enc_tv_temp)
2443 .vecs =
2444 hmac_sha384_des3_ede_cbc_enc_tv_temp,
2445 .count =
2446 HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC
2447 }
2448 } 2380 }
2449 } 2381 }
2450 }, { 2382 }, {
@@ -2461,12 +2393,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2461 .test = alg_test_aead, 2393 .test = alg_test_aead,
2462 .suite = { 2394 .suite = {
2463 .aead = { 2395 .aead = {
2464 .enc = { 2396 .enc = __VECS(hmac_sha512_aes_cbc_enc_tv_temp)
2465 .vecs =
2466 hmac_sha512_aes_cbc_enc_tv_temp,
2467 .count =
2468 HMAC_SHA512_AES_CBC_ENC_TEST_VEC
2469 }
2470 } 2397 }
2471 } 2398 }
2472 }, { 2399 }, {
@@ -2474,12 +2401,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2474 .test = alg_test_aead, 2401 .test = alg_test_aead,
2475 .suite = { 2402 .suite = {
2476 .aead = { 2403 .aead = {
2477 .enc = { 2404 .enc = __VECS(hmac_sha512_des_cbc_enc_tv_temp)
2478 .vecs =
2479 hmac_sha512_des_cbc_enc_tv_temp,
2480 .count =
2481 HMAC_SHA512_DES_CBC_ENC_TEST_VEC
2482 }
2483 } 2405 }
2484 } 2406 }
2485 }, { 2407 }, {
@@ -2488,12 +2410,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2488 .fips_allowed = 1, 2410 .fips_allowed = 1,
2489 .suite = { 2411 .suite = {
2490 .aead = { 2412 .aead = {
2491 .enc = { 2413 .enc = __VECS(hmac_sha512_des3_ede_cbc_enc_tv_temp)
2492 .vecs =
2493 hmac_sha512_des3_ede_cbc_enc_tv_temp,
2494 .count =
2495 HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC
2496 }
2497 } 2414 }
2498 } 2415 }
2499 }, { 2416 }, {
@@ -2510,14 +2427,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2510 .fips_allowed = 1, 2427 .fips_allowed = 1,
2511 .suite = { 2428 .suite = {
2512 .cipher = { 2429 .cipher = {
2513 .enc = { 2430 .enc = __VECS(aes_cbc_enc_tv_template),
2514 .vecs = aes_cbc_enc_tv_template, 2431 .dec = __VECS(aes_cbc_dec_tv_template)
2515 .count = AES_CBC_ENC_TEST_VECTORS
2516 },
2517 .dec = {
2518 .vecs = aes_cbc_dec_tv_template,
2519 .count = AES_CBC_DEC_TEST_VECTORS
2520 }
2521 } 2432 }
2522 } 2433 }
2523 }, { 2434 }, {
@@ -2525,14 +2436,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2525 .test = alg_test_skcipher, 2436 .test = alg_test_skcipher,
2526 .suite = { 2437 .suite = {
2527 .cipher = { 2438 .cipher = {
2528 .enc = { 2439 .enc = __VECS(anubis_cbc_enc_tv_template),
2529 .vecs = anubis_cbc_enc_tv_template, 2440 .dec = __VECS(anubis_cbc_dec_tv_template)
2530 .count = ANUBIS_CBC_ENC_TEST_VECTORS
2531 },
2532 .dec = {
2533 .vecs = anubis_cbc_dec_tv_template,
2534 .count = ANUBIS_CBC_DEC_TEST_VECTORS
2535 }
2536 } 2441 }
2537 } 2442 }
2538 }, { 2443 }, {
@@ -2540,14 +2445,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2540 .test = alg_test_skcipher, 2445 .test = alg_test_skcipher,
2541 .suite = { 2446 .suite = {
2542 .cipher = { 2447 .cipher = {
2543 .enc = { 2448 .enc = __VECS(bf_cbc_enc_tv_template),
2544 .vecs = bf_cbc_enc_tv_template, 2449 .dec = __VECS(bf_cbc_dec_tv_template)
2545 .count = BF_CBC_ENC_TEST_VECTORS
2546 },
2547 .dec = {
2548 .vecs = bf_cbc_dec_tv_template,
2549 .count = BF_CBC_DEC_TEST_VECTORS
2550 }
2551 } 2450 }
2552 } 2451 }
2553 }, { 2452 }, {
@@ -2555,14 +2454,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2555 .test = alg_test_skcipher, 2454 .test = alg_test_skcipher,
2556 .suite = { 2455 .suite = {
2557 .cipher = { 2456 .cipher = {
2558 .enc = { 2457 .enc = __VECS(camellia_cbc_enc_tv_template),
2559 .vecs = camellia_cbc_enc_tv_template, 2458 .dec = __VECS(camellia_cbc_dec_tv_template)
2560 .count = CAMELLIA_CBC_ENC_TEST_VECTORS
2561 },
2562 .dec = {
2563 .vecs = camellia_cbc_dec_tv_template,
2564 .count = CAMELLIA_CBC_DEC_TEST_VECTORS
2565 }
2566 } 2459 }
2567 } 2460 }
2568 }, { 2461 }, {
@@ -2570,14 +2463,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2570 .test = alg_test_skcipher, 2463 .test = alg_test_skcipher,
2571 .suite = { 2464 .suite = {
2572 .cipher = { 2465 .cipher = {
2573 .enc = { 2466 .enc = __VECS(cast5_cbc_enc_tv_template),
2574 .vecs = cast5_cbc_enc_tv_template, 2467 .dec = __VECS(cast5_cbc_dec_tv_template)
2575 .count = CAST5_CBC_ENC_TEST_VECTORS
2576 },
2577 .dec = {
2578 .vecs = cast5_cbc_dec_tv_template,
2579 .count = CAST5_CBC_DEC_TEST_VECTORS
2580 }
2581 } 2468 }
2582 } 2469 }
2583 }, { 2470 }, {
@@ -2585,14 +2472,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2585 .test = alg_test_skcipher, 2472 .test = alg_test_skcipher,
2586 .suite = { 2473 .suite = {
2587 .cipher = { 2474 .cipher = {
2588 .enc = { 2475 .enc = __VECS(cast6_cbc_enc_tv_template),
2589 .vecs = cast6_cbc_enc_tv_template, 2476 .dec = __VECS(cast6_cbc_dec_tv_template)
2590 .count = CAST6_CBC_ENC_TEST_VECTORS
2591 },
2592 .dec = {
2593 .vecs = cast6_cbc_dec_tv_template,
2594 .count = CAST6_CBC_DEC_TEST_VECTORS
2595 }
2596 } 2477 }
2597 } 2478 }
2598 }, { 2479 }, {
@@ -2600,14 +2481,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2600 .test = alg_test_skcipher, 2481 .test = alg_test_skcipher,
2601 .suite = { 2482 .suite = {
2602 .cipher = { 2483 .cipher = {
2603 .enc = { 2484 .enc = __VECS(des_cbc_enc_tv_template),
2604 .vecs = des_cbc_enc_tv_template, 2485 .dec = __VECS(des_cbc_dec_tv_template)
2605 .count = DES_CBC_ENC_TEST_VECTORS
2606 },
2607 .dec = {
2608 .vecs = des_cbc_dec_tv_template,
2609 .count = DES_CBC_DEC_TEST_VECTORS
2610 }
2611 } 2486 }
2612 } 2487 }
2613 }, { 2488 }, {
@@ -2616,14 +2491,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2616 .fips_allowed = 1, 2491 .fips_allowed = 1,
2617 .suite = { 2492 .suite = {
2618 .cipher = { 2493 .cipher = {
2619 .enc = { 2494 .enc = __VECS(des3_ede_cbc_enc_tv_template),
2620 .vecs = des3_ede_cbc_enc_tv_template, 2495 .dec = __VECS(des3_ede_cbc_dec_tv_template)
2621 .count = DES3_EDE_CBC_ENC_TEST_VECTORS
2622 },
2623 .dec = {
2624 .vecs = des3_ede_cbc_dec_tv_template,
2625 .count = DES3_EDE_CBC_DEC_TEST_VECTORS
2626 }
2627 } 2496 }
2628 } 2497 }
2629 }, { 2498 }, {
@@ -2631,14 +2500,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2631 .test = alg_test_skcipher, 2500 .test = alg_test_skcipher,
2632 .suite = { 2501 .suite = {
2633 .cipher = { 2502 .cipher = {
2634 .enc = { 2503 .enc = __VECS(serpent_cbc_enc_tv_template),
2635 .vecs = serpent_cbc_enc_tv_template, 2504 .dec = __VECS(serpent_cbc_dec_tv_template)
2636 .count = SERPENT_CBC_ENC_TEST_VECTORS
2637 },
2638 .dec = {
2639 .vecs = serpent_cbc_dec_tv_template,
2640 .count = SERPENT_CBC_DEC_TEST_VECTORS
2641 }
2642 } 2505 }
2643 } 2506 }
2644 }, { 2507 }, {
@@ -2646,30 +2509,25 @@ static const struct alg_test_desc alg_test_descs[] = {
2646 .test = alg_test_skcipher, 2509 .test = alg_test_skcipher,
2647 .suite = { 2510 .suite = {
2648 .cipher = { 2511 .cipher = {
2649 .enc = { 2512 .enc = __VECS(tf_cbc_enc_tv_template),
2650 .vecs = tf_cbc_enc_tv_template, 2513 .dec = __VECS(tf_cbc_dec_tv_template)
2651 .count = TF_CBC_ENC_TEST_VECTORS
2652 },
2653 .dec = {
2654 .vecs = tf_cbc_dec_tv_template,
2655 .count = TF_CBC_DEC_TEST_VECTORS
2656 }
2657 } 2514 }
2658 } 2515 }
2659 }, { 2516 }, {
2517 .alg = "cbcmac(aes)",
2518 .fips_allowed = 1,
2519 .test = alg_test_hash,
2520 .suite = {
2521 .hash = __VECS(aes_cbcmac_tv_template)
2522 }
2523 }, {
2660 .alg = "ccm(aes)", 2524 .alg = "ccm(aes)",
2661 .test = alg_test_aead, 2525 .test = alg_test_aead,
2662 .fips_allowed = 1, 2526 .fips_allowed = 1,
2663 .suite = { 2527 .suite = {
2664 .aead = { 2528 .aead = {
2665 .enc = { 2529 .enc = __VECS(aes_ccm_enc_tv_template),
2666 .vecs = aes_ccm_enc_tv_template, 2530 .dec = __VECS(aes_ccm_dec_tv_template)
2667 .count = AES_CCM_ENC_TEST_VECTORS
2668 },
2669 .dec = {
2670 .vecs = aes_ccm_dec_tv_template,
2671 .count = AES_CCM_DEC_TEST_VECTORS
2672 }
2673 } 2531 }
2674 } 2532 }
2675 }, { 2533 }, {
@@ -2677,14 +2535,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2677 .test = alg_test_skcipher, 2535 .test = alg_test_skcipher,
2678 .suite = { 2536 .suite = {
2679 .cipher = { 2537 .cipher = {
2680 .enc = { 2538 .enc = __VECS(chacha20_enc_tv_template),
2681 .vecs = chacha20_enc_tv_template, 2539 .dec = __VECS(chacha20_enc_tv_template),
2682 .count = CHACHA20_ENC_TEST_VECTORS
2683 },
2684 .dec = {
2685 .vecs = chacha20_enc_tv_template,
2686 .count = CHACHA20_ENC_TEST_VECTORS
2687 },
2688 } 2540 }
2689 } 2541 }
2690 }, { 2542 }, {
@@ -2692,20 +2544,14 @@ static const struct alg_test_desc alg_test_descs[] = {
2692 .fips_allowed = 1, 2544 .fips_allowed = 1,
2693 .test = alg_test_hash, 2545 .test = alg_test_hash,
2694 .suite = { 2546 .suite = {
2695 .hash = { 2547 .hash = __VECS(aes_cmac128_tv_template)
2696 .vecs = aes_cmac128_tv_template,
2697 .count = CMAC_AES_TEST_VECTORS
2698 }
2699 } 2548 }
2700 }, { 2549 }, {
2701 .alg = "cmac(des3_ede)", 2550 .alg = "cmac(des3_ede)",
2702 .fips_allowed = 1, 2551 .fips_allowed = 1,
2703 .test = alg_test_hash, 2552 .test = alg_test_hash,
2704 .suite = { 2553 .suite = {
2705 .hash = { 2554 .hash = __VECS(des3_ede_cmac64_tv_template)
2706 .vecs = des3_ede_cmac64_tv_template,
2707 .count = CMAC_DES3_EDE_TEST_VECTORS
2708 }
2709 } 2555 }
2710 }, { 2556 }, {
2711 .alg = "compress_null", 2557 .alg = "compress_null",
@@ -2714,30 +2560,21 @@ static const struct alg_test_desc alg_test_descs[] = {
2714 .alg = "crc32", 2560 .alg = "crc32",
2715 .test = alg_test_hash, 2561 .test = alg_test_hash,
2716 .suite = { 2562 .suite = {
2717 .hash = { 2563 .hash = __VECS(crc32_tv_template)
2718 .vecs = crc32_tv_template,
2719 .count = CRC32_TEST_VECTORS
2720 }
2721 } 2564 }
2722 }, { 2565 }, {
2723 .alg = "crc32c", 2566 .alg = "crc32c",
2724 .test = alg_test_crc32c, 2567 .test = alg_test_crc32c,
2725 .fips_allowed = 1, 2568 .fips_allowed = 1,
2726 .suite = { 2569 .suite = {
2727 .hash = { 2570 .hash = __VECS(crc32c_tv_template)
2728 .vecs = crc32c_tv_template,
2729 .count = CRC32C_TEST_VECTORS
2730 }
2731 } 2571 }
2732 }, { 2572 }, {
2733 .alg = "crct10dif", 2573 .alg = "crct10dif",
2734 .test = alg_test_hash, 2574 .test = alg_test_hash,
2735 .fips_allowed = 1, 2575 .fips_allowed = 1,
2736 .suite = { 2576 .suite = {
2737 .hash = { 2577 .hash = __VECS(crct10dif_tv_template)
2738 .vecs = crct10dif_tv_template,
2739 .count = CRCT10DIF_TEST_VECTORS
2740 }
2741 } 2578 }
2742 }, { 2579 }, {
2743 .alg = "ctr(aes)", 2580 .alg = "ctr(aes)",
@@ -2745,14 +2582,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2745 .fips_allowed = 1, 2582 .fips_allowed = 1,
2746 .suite = { 2583 .suite = {
2747 .cipher = { 2584 .cipher = {
2748 .enc = { 2585 .enc = __VECS(aes_ctr_enc_tv_template),
2749 .vecs = aes_ctr_enc_tv_template, 2586 .dec = __VECS(aes_ctr_dec_tv_template)
2750 .count = AES_CTR_ENC_TEST_VECTORS
2751 },
2752 .dec = {
2753 .vecs = aes_ctr_dec_tv_template,
2754 .count = AES_CTR_DEC_TEST_VECTORS
2755 }
2756 } 2587 }
2757 } 2588 }
2758 }, { 2589 }, {
@@ -2760,14 +2591,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2760 .test = alg_test_skcipher, 2591 .test = alg_test_skcipher,
2761 .suite = { 2592 .suite = {
2762 .cipher = { 2593 .cipher = {
2763 .enc = { 2594 .enc = __VECS(bf_ctr_enc_tv_template),
2764 .vecs = bf_ctr_enc_tv_template, 2595 .dec = __VECS(bf_ctr_dec_tv_template)
2765 .count = BF_CTR_ENC_TEST_VECTORS
2766 },
2767 .dec = {
2768 .vecs = bf_ctr_dec_tv_template,
2769 .count = BF_CTR_DEC_TEST_VECTORS
2770 }
2771 } 2596 }
2772 } 2597 }
2773 }, { 2598 }, {
@@ -2775,14 +2600,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2775 .test = alg_test_skcipher, 2600 .test = alg_test_skcipher,
2776 .suite = { 2601 .suite = {
2777 .cipher = { 2602 .cipher = {
2778 .enc = { 2603 .enc = __VECS(camellia_ctr_enc_tv_template),
2779 .vecs = camellia_ctr_enc_tv_template, 2604 .dec = __VECS(camellia_ctr_dec_tv_template)
2780 .count = CAMELLIA_CTR_ENC_TEST_VECTORS
2781 },
2782 .dec = {
2783 .vecs = camellia_ctr_dec_tv_template,
2784 .count = CAMELLIA_CTR_DEC_TEST_VECTORS
2785 }
2786 } 2605 }
2787 } 2606 }
2788 }, { 2607 }, {
@@ -2790,14 +2609,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2790 .test = alg_test_skcipher, 2609 .test = alg_test_skcipher,
2791 .suite = { 2610 .suite = {
2792 .cipher = { 2611 .cipher = {
2793 .enc = { 2612 .enc = __VECS(cast5_ctr_enc_tv_template),
2794 .vecs = cast5_ctr_enc_tv_template, 2613 .dec = __VECS(cast5_ctr_dec_tv_template)
2795 .count = CAST5_CTR_ENC_TEST_VECTORS
2796 },
2797 .dec = {
2798 .vecs = cast5_ctr_dec_tv_template,
2799 .count = CAST5_CTR_DEC_TEST_VECTORS
2800 }
2801 } 2614 }
2802 } 2615 }
2803 }, { 2616 }, {
@@ -2805,14 +2618,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2805 .test = alg_test_skcipher, 2618 .test = alg_test_skcipher,
2806 .suite = { 2619 .suite = {
2807 .cipher = { 2620 .cipher = {
2808 .enc = { 2621 .enc = __VECS(cast6_ctr_enc_tv_template),
2809 .vecs = cast6_ctr_enc_tv_template, 2622 .dec = __VECS(cast6_ctr_dec_tv_template)
2810 .count = CAST6_CTR_ENC_TEST_VECTORS
2811 },
2812 .dec = {
2813 .vecs = cast6_ctr_dec_tv_template,
2814 .count = CAST6_CTR_DEC_TEST_VECTORS
2815 }
2816 } 2623 }
2817 } 2624 }
2818 }, { 2625 }, {
@@ -2820,14 +2627,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2820 .test = alg_test_skcipher, 2627 .test = alg_test_skcipher,
2821 .suite = { 2628 .suite = {
2822 .cipher = { 2629 .cipher = {
2823 .enc = { 2630 .enc = __VECS(des_ctr_enc_tv_template),
2824 .vecs = des_ctr_enc_tv_template, 2631 .dec = __VECS(des_ctr_dec_tv_template)
2825 .count = DES_CTR_ENC_TEST_VECTORS
2826 },
2827 .dec = {
2828 .vecs = des_ctr_dec_tv_template,
2829 .count = DES_CTR_DEC_TEST_VECTORS
2830 }
2831 } 2632 }
2832 } 2633 }
2833 }, { 2634 }, {
@@ -2835,14 +2636,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2835 .test = alg_test_skcipher, 2636 .test = alg_test_skcipher,
2836 .suite = { 2637 .suite = {
2837 .cipher = { 2638 .cipher = {
2838 .enc = { 2639 .enc = __VECS(des3_ede_ctr_enc_tv_template),
2839 .vecs = des3_ede_ctr_enc_tv_template, 2640 .dec = __VECS(des3_ede_ctr_dec_tv_template)
2840 .count = DES3_EDE_CTR_ENC_TEST_VECTORS
2841 },
2842 .dec = {
2843 .vecs = des3_ede_ctr_dec_tv_template,
2844 .count = DES3_EDE_CTR_DEC_TEST_VECTORS
2845 }
2846 } 2641 }
2847 } 2642 }
2848 }, { 2643 }, {
@@ -2850,14 +2645,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2850 .test = alg_test_skcipher, 2645 .test = alg_test_skcipher,
2851 .suite = { 2646 .suite = {
2852 .cipher = { 2647 .cipher = {
2853 .enc = { 2648 .enc = __VECS(serpent_ctr_enc_tv_template),
2854 .vecs = serpent_ctr_enc_tv_template, 2649 .dec = __VECS(serpent_ctr_dec_tv_template)
2855 .count = SERPENT_CTR_ENC_TEST_VECTORS
2856 },
2857 .dec = {
2858 .vecs = serpent_ctr_dec_tv_template,
2859 .count = SERPENT_CTR_DEC_TEST_VECTORS
2860 }
2861 } 2650 }
2862 } 2651 }
2863 }, { 2652 }, {
@@ -2865,14 +2654,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2865 .test = alg_test_skcipher, 2654 .test = alg_test_skcipher,
2866 .suite = { 2655 .suite = {
2867 .cipher = { 2656 .cipher = {
2868 .enc = { 2657 .enc = __VECS(tf_ctr_enc_tv_template),
2869 .vecs = tf_ctr_enc_tv_template, 2658 .dec = __VECS(tf_ctr_dec_tv_template)
2870 .count = TF_CTR_ENC_TEST_VECTORS
2871 },
2872 .dec = {
2873 .vecs = tf_ctr_dec_tv_template,
2874 .count = TF_CTR_DEC_TEST_VECTORS
2875 }
2876 } 2659 }
2877 } 2660 }
2878 }, { 2661 }, {
@@ -2880,14 +2663,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2880 .test = alg_test_skcipher, 2663 .test = alg_test_skcipher,
2881 .suite = { 2664 .suite = {
2882 .cipher = { 2665 .cipher = {
2883 .enc = { 2666 .enc = __VECS(cts_mode_enc_tv_template),
2884 .vecs = cts_mode_enc_tv_template, 2667 .dec = __VECS(cts_mode_dec_tv_template)
2885 .count = CTS_MODE_ENC_TEST_VECTORS
2886 },
2887 .dec = {
2888 .vecs = cts_mode_dec_tv_template,
2889 .count = CTS_MODE_DEC_TEST_VECTORS
2890 }
2891 } 2668 }
2892 } 2669 }
2893 }, { 2670 }, {
@@ -2896,14 +2673,8 @@ static const struct alg_test_desc alg_test_descs[] = {
2896 .fips_allowed = 1, 2673 .fips_allowed = 1,
2897 .suite = { 2674 .suite = {
2898 .comp = { 2675 .comp = {
2899 .comp = { 2676 .comp = __VECS(deflate_comp_tv_template),
2900 .vecs = deflate_comp_tv_template, 2677 .decomp = __VECS(deflate_decomp_tv_template)
2901 .count = DEFLATE_COMP_TEST_VECTORS
2902 },
2903 .decomp = {
2904 .vecs = deflate_decomp_tv_template,
2905 .count = DEFLATE_DECOMP_TEST_VECTORS
2906 }
2907 } 2678 }
2908 } 2679 }
2909 }, { 2680 }, {
@@ -2911,10 +2682,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2911 .test = alg_test_kpp, 2682 .test = alg_test_kpp,
2912 .fips_allowed = 1, 2683 .fips_allowed = 1,
2913 .suite = { 2684 .suite = {
2914 .kpp = { 2685 .kpp = __VECS(dh_tv_template)
2915 .vecs = dh_tv_template,
2916 .count = DH_TEST_VECTORS
2917 }
2918 } 2686 }
2919 }, { 2687 }, {
2920 .alg = "digest_null", 2688 .alg = "digest_null",
@@ -2924,30 +2692,21 @@ static const struct alg_test_desc alg_test_descs[] = {
2924 .test = alg_test_drbg, 2692 .test = alg_test_drbg,
2925 .fips_allowed = 1, 2693 .fips_allowed = 1,
2926 .suite = { 2694 .suite = {
2927 .drbg = { 2695 .drbg = __VECS(drbg_nopr_ctr_aes128_tv_template)
2928 .vecs = drbg_nopr_ctr_aes128_tv_template,
2929 .count = ARRAY_SIZE(drbg_nopr_ctr_aes128_tv_template)
2930 }
2931 } 2696 }
2932 }, { 2697 }, {
2933 .alg = "drbg_nopr_ctr_aes192", 2698 .alg = "drbg_nopr_ctr_aes192",
2934 .test = alg_test_drbg, 2699 .test = alg_test_drbg,
2935 .fips_allowed = 1, 2700 .fips_allowed = 1,
2936 .suite = { 2701 .suite = {
2937 .drbg = { 2702 .drbg = __VECS(drbg_nopr_ctr_aes192_tv_template)
2938 .vecs = drbg_nopr_ctr_aes192_tv_template,
2939 .count = ARRAY_SIZE(drbg_nopr_ctr_aes192_tv_template)
2940 }
2941 } 2703 }
2942 }, { 2704 }, {
2943 .alg = "drbg_nopr_ctr_aes256", 2705 .alg = "drbg_nopr_ctr_aes256",
2944 .test = alg_test_drbg, 2706 .test = alg_test_drbg,
2945 .fips_allowed = 1, 2707 .fips_allowed = 1,
2946 .suite = { 2708 .suite = {
2947 .drbg = { 2709 .drbg = __VECS(drbg_nopr_ctr_aes256_tv_template)
2948 .vecs = drbg_nopr_ctr_aes256_tv_template,
2949 .count = ARRAY_SIZE(drbg_nopr_ctr_aes256_tv_template)
2950 }
2951 } 2710 }
2952 }, { 2711 }, {
2953 /* 2712 /*
@@ -2962,11 +2721,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2962 .test = alg_test_drbg, 2721 .test = alg_test_drbg,
2963 .fips_allowed = 1, 2722 .fips_allowed = 1,
2964 .suite = { 2723 .suite = {
2965 .drbg = { 2724 .drbg = __VECS(drbg_nopr_hmac_sha256_tv_template)
2966 .vecs = drbg_nopr_hmac_sha256_tv_template,
2967 .count =
2968 ARRAY_SIZE(drbg_nopr_hmac_sha256_tv_template)
2969 }
2970 } 2725 }
2971 }, { 2726 }, {
2972 /* covered by drbg_nopr_hmac_sha256 test */ 2727 /* covered by drbg_nopr_hmac_sha256 test */
@@ -2986,10 +2741,7 @@ static const struct alg_test_desc alg_test_descs[] = {
2986 .test = alg_test_drbg, 2741 .test = alg_test_drbg,
2987 .fips_allowed = 1, 2742 .fips_allowed = 1,
2988 .suite = { 2743 .suite = {
2989 .drbg = { 2744 .drbg = __VECS(drbg_nopr_sha256_tv_template)
2990 .vecs = drbg_nopr_sha256_tv_template,
2991 .count = ARRAY_SIZE(drbg_nopr_sha256_tv_template)
2992 }
2993 } 2745 }
2994 }, { 2746 }, {
2995 /* covered by drbg_nopr_sha256 test */ 2747 /* covered by drbg_nopr_sha256 test */
@@ -3005,10 +2757,7 @@ static const struct alg_test_desc alg_test_descs[] = {
3005 .test = alg_test_drbg, 2757 .test = alg_test_drbg,
3006 .fips_allowed = 1, 2758 .fips_allowed = 1,
3007 .suite = { 2759 .suite = {
3008 .drbg = { 2760 .drbg = __VECS(drbg_pr_ctr_aes128_tv_template)
3009 .vecs = drbg_pr_ctr_aes128_tv_template,
3010 .count = ARRAY_SIZE(drbg_pr_ctr_aes128_tv_template)
3011 }
3012 } 2761 }
3013 }, { 2762 }, {
3014 /* covered by drbg_pr_ctr_aes128 test */ 2763 /* covered by drbg_pr_ctr_aes128 test */
@@ -3028,10 +2777,7 @@ static const struct alg_test_desc alg_test_descs[] = {
3028 .test = alg_test_drbg, 2777 .test = alg_test_drbg,
3029 .fips_allowed = 1, 2778 .fips_allowed = 1,
3030 .suite = { 2779 .suite = {
3031 .drbg = { 2780 .drbg = __VECS(drbg_pr_hmac_sha256_tv_template)
3032 .vecs = drbg_pr_hmac_sha256_tv_template,
3033 .count = ARRAY_SIZE(drbg_pr_hmac_sha256_tv_template)
3034 }
3035 } 2781 }
3036 }, { 2782 }, {
3037 /* covered by drbg_pr_hmac_sha256 test */ 2783 /* covered by drbg_pr_hmac_sha256 test */
@@ -3051,10 +2797,7 @@ static const struct alg_test_desc alg_test_descs[] = {
3051 .test = alg_test_drbg, 2797 .test = alg_test_drbg,
3052 .fips_allowed = 1, 2798 .fips_allowed = 1,
3053 .suite = { 2799 .suite = {
3054 .drbg = { 2800 .drbg = __VECS(drbg_pr_sha256_tv_template)
3055 .vecs = drbg_pr_sha256_tv_template,
3056 .count = ARRAY_SIZE(drbg_pr_sha256_tv_template)
3057 }
3058 } 2801 }
3059 }, { 2802 }, {
3060 /* covered by drbg_pr_sha256 test */ 2803 /* covered by drbg_pr_sha256 test */
@@ -3071,14 +2814,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3071 .fips_allowed = 1, 2814 .fips_allowed = 1,
3072 .suite = { 2815 .suite = {
3073 .cipher = { 2816 .cipher = {
3074 .enc = { 2817 .enc = __VECS(aes_enc_tv_template),
3075 .vecs = aes_enc_tv_template, 2818 .dec = __VECS(aes_dec_tv_template)
3076 .count = AES_ENC_TEST_VECTORS
3077 },
3078 .dec = {
3079 .vecs = aes_dec_tv_template,
3080 .count = AES_DEC_TEST_VECTORS
3081 }
3082 } 2819 }
3083 } 2820 }
3084 }, { 2821 }, {
@@ -3086,14 +2823,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3086 .test = alg_test_skcipher, 2823 .test = alg_test_skcipher,
3087 .suite = { 2824 .suite = {
3088 .cipher = { 2825 .cipher = {
3089 .enc = { 2826 .enc = __VECS(anubis_enc_tv_template),
3090 .vecs = anubis_enc_tv_template, 2827 .dec = __VECS(anubis_dec_tv_template)
3091 .count = ANUBIS_ENC_TEST_VECTORS
3092 },
3093 .dec = {
3094 .vecs = anubis_dec_tv_template,
3095 .count = ANUBIS_DEC_TEST_VECTORS
3096 }
3097 } 2828 }
3098 } 2829 }
3099 }, { 2830 }, {
@@ -3101,14 +2832,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3101 .test = alg_test_skcipher, 2832 .test = alg_test_skcipher,
3102 .suite = { 2833 .suite = {
3103 .cipher = { 2834 .cipher = {
3104 .enc = { 2835 .enc = __VECS(arc4_enc_tv_template),
3105 .vecs = arc4_enc_tv_template, 2836 .dec = __VECS(arc4_dec_tv_template)
3106 .count = ARC4_ENC_TEST_VECTORS
3107 },
3108 .dec = {
3109 .vecs = arc4_dec_tv_template,
3110 .count = ARC4_DEC_TEST_VECTORS
3111 }
3112 } 2837 }
3113 } 2838 }
3114 }, { 2839 }, {
@@ -3116,14 +2841,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3116 .test = alg_test_skcipher, 2841 .test = alg_test_skcipher,
3117 .suite = { 2842 .suite = {
3118 .cipher = { 2843 .cipher = {
3119 .enc = { 2844 .enc = __VECS(bf_enc_tv_template),
3120 .vecs = bf_enc_tv_template, 2845 .dec = __VECS(bf_dec_tv_template)
3121 .count = BF_ENC_TEST_VECTORS
3122 },
3123 .dec = {
3124 .vecs = bf_dec_tv_template,
3125 .count = BF_DEC_TEST_VECTORS
3126 }
3127 } 2846 }
3128 } 2847 }
3129 }, { 2848 }, {
@@ -3131,14 +2850,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3131 .test = alg_test_skcipher, 2850 .test = alg_test_skcipher,
3132 .suite = { 2851 .suite = {
3133 .cipher = { 2852 .cipher = {
3134 .enc = { 2853 .enc = __VECS(camellia_enc_tv_template),
3135 .vecs = camellia_enc_tv_template, 2854 .dec = __VECS(camellia_dec_tv_template)
3136 .count = CAMELLIA_ENC_TEST_VECTORS
3137 },
3138 .dec = {
3139 .vecs = camellia_dec_tv_template,
3140 .count = CAMELLIA_DEC_TEST_VECTORS
3141 }
3142 } 2855 }
3143 } 2856 }
3144 }, { 2857 }, {
@@ -3146,14 +2859,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3146 .test = alg_test_skcipher, 2859 .test = alg_test_skcipher,
3147 .suite = { 2860 .suite = {
3148 .cipher = { 2861 .cipher = {
3149 .enc = { 2862 .enc = __VECS(cast5_enc_tv_template),
3150 .vecs = cast5_enc_tv_template, 2863 .dec = __VECS(cast5_dec_tv_template)
3151 .count = CAST5_ENC_TEST_VECTORS
3152 },
3153 .dec = {
3154 .vecs = cast5_dec_tv_template,
3155 .count = CAST5_DEC_TEST_VECTORS
3156 }
3157 } 2864 }
3158 } 2865 }
3159 }, { 2866 }, {
@@ -3161,14 +2868,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3161 .test = alg_test_skcipher, 2868 .test = alg_test_skcipher,
3162 .suite = { 2869 .suite = {
3163 .cipher = { 2870 .cipher = {
3164 .enc = { 2871 .enc = __VECS(cast6_enc_tv_template),
3165 .vecs = cast6_enc_tv_template, 2872 .dec = __VECS(cast6_dec_tv_template)
3166 .count = CAST6_ENC_TEST_VECTORS
3167 },
3168 .dec = {
3169 .vecs = cast6_dec_tv_template,
3170 .count = CAST6_DEC_TEST_VECTORS
3171 }
3172 } 2873 }
3173 } 2874 }
3174 }, { 2875 }, {
@@ -3179,14 +2880,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3179 .test = alg_test_skcipher, 2880 .test = alg_test_skcipher,
3180 .suite = { 2881 .suite = {
3181 .cipher = { 2882 .cipher = {
3182 .enc = { 2883 .enc = __VECS(des_enc_tv_template),
3183 .vecs = des_enc_tv_template, 2884 .dec = __VECS(des_dec_tv_template)
3184 .count = DES_ENC_TEST_VECTORS
3185 },
3186 .dec = {
3187 .vecs = des_dec_tv_template,
3188 .count = DES_DEC_TEST_VECTORS
3189 }
3190 } 2885 }
3191 } 2886 }
3192 }, { 2887 }, {
@@ -3195,14 +2890,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3195 .fips_allowed = 1, 2890 .fips_allowed = 1,
3196 .suite = { 2891 .suite = {
3197 .cipher = { 2892 .cipher = {
3198 .enc = { 2893 .enc = __VECS(des3_ede_enc_tv_template),
3199 .vecs = des3_ede_enc_tv_template, 2894 .dec = __VECS(des3_ede_dec_tv_template)
3200 .count = DES3_EDE_ENC_TEST_VECTORS
3201 },
3202 .dec = {
3203 .vecs = des3_ede_dec_tv_template,
3204 .count = DES3_EDE_DEC_TEST_VECTORS
3205 }
3206 } 2895 }
3207 } 2896 }
3208 }, { 2897 }, {
@@ -3225,14 +2914,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3225 .test = alg_test_skcipher, 2914 .test = alg_test_skcipher,
3226 .suite = { 2915 .suite = {
3227 .cipher = { 2916 .cipher = {
3228 .enc = { 2917 .enc = __VECS(khazad_enc_tv_template),
3229 .vecs = khazad_enc_tv_template, 2918 .dec = __VECS(khazad_dec_tv_template)
3230 .count = KHAZAD_ENC_TEST_VECTORS
3231 },
3232 .dec = {
3233 .vecs = khazad_dec_tv_template,
3234 .count = KHAZAD_DEC_TEST_VECTORS
3235 }
3236 } 2919 }
3237 } 2920 }
3238 }, { 2921 }, {
@@ -3240,14 +2923,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3240 .test = alg_test_skcipher, 2923 .test = alg_test_skcipher,
3241 .suite = { 2924 .suite = {
3242 .cipher = { 2925 .cipher = {
3243 .enc = { 2926 .enc = __VECS(seed_enc_tv_template),
3244 .vecs = seed_enc_tv_template, 2927 .dec = __VECS(seed_dec_tv_template)
3245 .count = SEED_ENC_TEST_VECTORS
3246 },
3247 .dec = {
3248 .vecs = seed_dec_tv_template,
3249 .count = SEED_DEC_TEST_VECTORS
3250 }
3251 } 2928 }
3252 } 2929 }
3253 }, { 2930 }, {
@@ -3255,14 +2932,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3255 .test = alg_test_skcipher, 2932 .test = alg_test_skcipher,
3256 .suite = { 2933 .suite = {
3257 .cipher = { 2934 .cipher = {
3258 .enc = { 2935 .enc = __VECS(serpent_enc_tv_template),
3259 .vecs = serpent_enc_tv_template, 2936 .dec = __VECS(serpent_dec_tv_template)
3260 .count = SERPENT_ENC_TEST_VECTORS
3261 },
3262 .dec = {
3263 .vecs = serpent_dec_tv_template,
3264 .count = SERPENT_DEC_TEST_VECTORS
3265 }
3266 } 2937 }
3267 } 2938 }
3268 }, { 2939 }, {
@@ -3270,14 +2941,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3270 .test = alg_test_skcipher, 2941 .test = alg_test_skcipher,
3271 .suite = { 2942 .suite = {
3272 .cipher = { 2943 .cipher = {
3273 .enc = { 2944 .enc = __VECS(tea_enc_tv_template),
3274 .vecs = tea_enc_tv_template, 2945 .dec = __VECS(tea_dec_tv_template)
3275 .count = TEA_ENC_TEST_VECTORS
3276 },
3277 .dec = {
3278 .vecs = tea_dec_tv_template,
3279 .count = TEA_DEC_TEST_VECTORS
3280 }
3281 } 2946 }
3282 } 2947 }
3283 }, { 2948 }, {
@@ -3285,14 +2950,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3285 .test = alg_test_skcipher, 2950 .test = alg_test_skcipher,
3286 .suite = { 2951 .suite = {
3287 .cipher = { 2952 .cipher = {
3288 .enc = { 2953 .enc = __VECS(tnepres_enc_tv_template),
3289 .vecs = tnepres_enc_tv_template, 2954 .dec = __VECS(tnepres_dec_tv_template)
3290 .count = TNEPRES_ENC_TEST_VECTORS
3291 },
3292 .dec = {
3293 .vecs = tnepres_dec_tv_template,
3294 .count = TNEPRES_DEC_TEST_VECTORS
3295 }
3296 } 2955 }
3297 } 2956 }
3298 }, { 2957 }, {
@@ -3300,14 +2959,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3300 .test = alg_test_skcipher, 2959 .test = alg_test_skcipher,
3301 .suite = { 2960 .suite = {
3302 .cipher = { 2961 .cipher = {
3303 .enc = { 2962 .enc = __VECS(tf_enc_tv_template),
3304 .vecs = tf_enc_tv_template, 2963 .dec = __VECS(tf_dec_tv_template)
3305 .count = TF_ENC_TEST_VECTORS
3306 },
3307 .dec = {
3308 .vecs = tf_dec_tv_template,
3309 .count = TF_DEC_TEST_VECTORS
3310 }
3311 } 2964 }
3312 } 2965 }
3313 }, { 2966 }, {
@@ -3315,14 +2968,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3315 .test = alg_test_skcipher, 2968 .test = alg_test_skcipher,
3316 .suite = { 2969 .suite = {
3317 .cipher = { 2970 .cipher = {
3318 .enc = { 2971 .enc = __VECS(xeta_enc_tv_template),
3319 .vecs = xeta_enc_tv_template, 2972 .dec = __VECS(xeta_dec_tv_template)
3320 .count = XETA_ENC_TEST_VECTORS
3321 },
3322 .dec = {
3323 .vecs = xeta_dec_tv_template,
3324 .count = XETA_DEC_TEST_VECTORS
3325 }
3326 } 2973 }
3327 } 2974 }
3328 }, { 2975 }, {
@@ -3330,14 +2977,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3330 .test = alg_test_skcipher, 2977 .test = alg_test_skcipher,
3331 .suite = { 2978 .suite = {
3332 .cipher = { 2979 .cipher = {
3333 .enc = { 2980 .enc = __VECS(xtea_enc_tv_template),
3334 .vecs = xtea_enc_tv_template, 2981 .dec = __VECS(xtea_dec_tv_template)
3335 .count = XTEA_ENC_TEST_VECTORS
3336 },
3337 .dec = {
3338 .vecs = xtea_dec_tv_template,
3339 .count = XTEA_DEC_TEST_VECTORS
3340 }
3341 } 2982 }
3342 } 2983 }
3343 }, { 2984 }, {
@@ -3345,10 +2986,7 @@ static const struct alg_test_desc alg_test_descs[] = {
3345 .test = alg_test_kpp, 2986 .test = alg_test_kpp,
3346 .fips_allowed = 1, 2987 .fips_allowed = 1,
3347 .suite = { 2988 .suite = {
3348 .kpp = { 2989 .kpp = __VECS(ecdh_tv_template)
3349 .vecs = ecdh_tv_template,
3350 .count = ECDH_TEST_VECTORS
3351 }
3352 } 2990 }
3353 }, { 2991 }, {
3354 .alg = "gcm(aes)", 2992 .alg = "gcm(aes)",
@@ -3356,14 +2994,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3356 .fips_allowed = 1, 2994 .fips_allowed = 1,
3357 .suite = { 2995 .suite = {
3358 .aead = { 2996 .aead = {
3359 .enc = { 2997 .enc = __VECS(aes_gcm_enc_tv_template),
3360 .vecs = aes_gcm_enc_tv_template, 2998 .dec = __VECS(aes_gcm_dec_tv_template)
3361 .count = AES_GCM_ENC_TEST_VECTORS
3362 },
3363 .dec = {
3364 .vecs = aes_gcm_dec_tv_template,
3365 .count = AES_GCM_DEC_TEST_VECTORS
3366 }
3367 } 2999 }
3368 } 3000 }
3369 }, { 3001 }, {
@@ -3371,136 +3003,94 @@ static const struct alg_test_desc alg_test_descs[] = {
3371 .test = alg_test_hash, 3003 .test = alg_test_hash,
3372 .fips_allowed = 1, 3004 .fips_allowed = 1,
3373 .suite = { 3005 .suite = {
3374 .hash = { 3006 .hash = __VECS(ghash_tv_template)
3375 .vecs = ghash_tv_template,
3376 .count = GHASH_TEST_VECTORS
3377 }
3378 } 3007 }
3379 }, { 3008 }, {
3380 .alg = "hmac(crc32)", 3009 .alg = "hmac(crc32)",
3381 .test = alg_test_hash, 3010 .test = alg_test_hash,
3382 .suite = { 3011 .suite = {
3383 .hash = { 3012 .hash = __VECS(bfin_crc_tv_template)
3384 .vecs = bfin_crc_tv_template,
3385 .count = BFIN_CRC_TEST_VECTORS
3386 }
3387 } 3013 }
3388 }, { 3014 }, {
3389 .alg = "hmac(md5)", 3015 .alg = "hmac(md5)",
3390 .test = alg_test_hash, 3016 .test = alg_test_hash,
3391 .suite = { 3017 .suite = {
3392 .hash = { 3018 .hash = __VECS(hmac_md5_tv_template)
3393 .vecs = hmac_md5_tv_template,
3394 .count = HMAC_MD5_TEST_VECTORS
3395 }
3396 } 3019 }
3397 }, { 3020 }, {
3398 .alg = "hmac(rmd128)", 3021 .alg = "hmac(rmd128)",
3399 .test = alg_test_hash, 3022 .test = alg_test_hash,
3400 .suite = { 3023 .suite = {
3401 .hash = { 3024 .hash = __VECS(hmac_rmd128_tv_template)
3402 .vecs = hmac_rmd128_tv_template,
3403 .count = HMAC_RMD128_TEST_VECTORS
3404 }
3405 } 3025 }
3406 }, { 3026 }, {
3407 .alg = "hmac(rmd160)", 3027 .alg = "hmac(rmd160)",
3408 .test = alg_test_hash, 3028 .test = alg_test_hash,
3409 .suite = { 3029 .suite = {
3410 .hash = { 3030 .hash = __VECS(hmac_rmd160_tv_template)
3411 .vecs = hmac_rmd160_tv_template,
3412 .count = HMAC_RMD160_TEST_VECTORS
3413 }
3414 } 3031 }
3415 }, { 3032 }, {
3416 .alg = "hmac(sha1)", 3033 .alg = "hmac(sha1)",
3417 .test = alg_test_hash, 3034 .test = alg_test_hash,
3418 .fips_allowed = 1, 3035 .fips_allowed = 1,
3419 .suite = { 3036 .suite = {
3420 .hash = { 3037 .hash = __VECS(hmac_sha1_tv_template)
3421 .vecs = hmac_sha1_tv_template,
3422 .count = HMAC_SHA1_TEST_VECTORS
3423 }
3424 } 3038 }
3425 }, { 3039 }, {
3426 .alg = "hmac(sha224)", 3040 .alg = "hmac(sha224)",
3427 .test = alg_test_hash, 3041 .test = alg_test_hash,
3428 .fips_allowed = 1, 3042 .fips_allowed = 1,
3429 .suite = { 3043 .suite = {
3430 .hash = { 3044 .hash = __VECS(hmac_sha224_tv_template)
3431 .vecs = hmac_sha224_tv_template,
3432 .count = HMAC_SHA224_TEST_VECTORS
3433 }
3434 } 3045 }
3435 }, { 3046 }, {
3436 .alg = "hmac(sha256)", 3047 .alg = "hmac(sha256)",
3437 .test = alg_test_hash, 3048 .test = alg_test_hash,
3438 .fips_allowed = 1, 3049 .fips_allowed = 1,
3439 .suite = { 3050 .suite = {
3440 .hash = { 3051 .hash = __VECS(hmac_sha256_tv_template)
3441 .vecs = hmac_sha256_tv_template,
3442 .count = HMAC_SHA256_TEST_VECTORS
3443 }
3444 } 3052 }
3445 }, { 3053 }, {
3446 .alg = "hmac(sha3-224)", 3054 .alg = "hmac(sha3-224)",
3447 .test = alg_test_hash, 3055 .test = alg_test_hash,
3448 .fips_allowed = 1, 3056 .fips_allowed = 1,
3449 .suite = { 3057 .suite = {
3450 .hash = { 3058 .hash = __VECS(hmac_sha3_224_tv_template)
3451 .vecs = hmac_sha3_224_tv_template,
3452 .count = HMAC_SHA3_224_TEST_VECTORS
3453 }
3454 } 3059 }
3455 }, { 3060 }, {
3456 .alg = "hmac(sha3-256)", 3061 .alg = "hmac(sha3-256)",
3457 .test = alg_test_hash, 3062 .test = alg_test_hash,
3458 .fips_allowed = 1, 3063 .fips_allowed = 1,
3459 .suite = { 3064 .suite = {
3460 .hash = { 3065 .hash = __VECS(hmac_sha3_256_tv_template)
3461 .vecs = hmac_sha3_256_tv_template,
3462 .count = HMAC_SHA3_256_TEST_VECTORS
3463 }
3464 } 3066 }
3465 }, { 3067 }, {
3466 .alg = "hmac(sha3-384)", 3068 .alg = "hmac(sha3-384)",
3467 .test = alg_test_hash, 3069 .test = alg_test_hash,
3468 .fips_allowed = 1, 3070 .fips_allowed = 1,
3469 .suite = { 3071 .suite = {
3470 .hash = { 3072 .hash = __VECS(hmac_sha3_384_tv_template)
3471 .vecs = hmac_sha3_384_tv_template,
3472 .count = HMAC_SHA3_384_TEST_VECTORS
3473 }
3474 } 3073 }
3475 }, { 3074 }, {
3476 .alg = "hmac(sha3-512)", 3075 .alg = "hmac(sha3-512)",
3477 .test = alg_test_hash, 3076 .test = alg_test_hash,
3478 .fips_allowed = 1, 3077 .fips_allowed = 1,
3479 .suite = { 3078 .suite = {
3480 .hash = { 3079 .hash = __VECS(hmac_sha3_512_tv_template)
3481 .vecs = hmac_sha3_512_tv_template,
3482 .count = HMAC_SHA3_512_TEST_VECTORS
3483 }
3484 } 3080 }
3485 }, { 3081 }, {
3486 .alg = "hmac(sha384)", 3082 .alg = "hmac(sha384)",
3487 .test = alg_test_hash, 3083 .test = alg_test_hash,
3488 .fips_allowed = 1, 3084 .fips_allowed = 1,
3489 .suite = { 3085 .suite = {
3490 .hash = { 3086 .hash = __VECS(hmac_sha384_tv_template)
3491 .vecs = hmac_sha384_tv_template,
3492 .count = HMAC_SHA384_TEST_VECTORS
3493 }
3494 } 3087 }
3495 }, { 3088 }, {
3496 .alg = "hmac(sha512)", 3089 .alg = "hmac(sha512)",
3497 .test = alg_test_hash, 3090 .test = alg_test_hash,
3498 .fips_allowed = 1, 3091 .fips_allowed = 1,
3499 .suite = { 3092 .suite = {
3500 .hash = { 3093 .hash = __VECS(hmac_sha512_tv_template)
3501 .vecs = hmac_sha512_tv_template,
3502 .count = HMAC_SHA512_TEST_VECTORS
3503 }
3504 } 3094 }
3505 }, { 3095 }, {
3506 .alg = "jitterentropy_rng", 3096 .alg = "jitterentropy_rng",
@@ -3512,14 +3102,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3512 .fips_allowed = 1, 3102 .fips_allowed = 1,
3513 .suite = { 3103 .suite = {
3514 .cipher = { 3104 .cipher = {
3515 .enc = { 3105 .enc = __VECS(aes_kw_enc_tv_template),
3516 .vecs = aes_kw_enc_tv_template, 3106 .dec = __VECS(aes_kw_dec_tv_template)
3517 .count = ARRAY_SIZE(aes_kw_enc_tv_template)
3518 },
3519 .dec = {
3520 .vecs = aes_kw_dec_tv_template,
3521 .count = ARRAY_SIZE(aes_kw_dec_tv_template)
3522 }
3523 } 3107 }
3524 } 3108 }
3525 }, { 3109 }, {
@@ -3527,14 +3111,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3527 .test = alg_test_skcipher, 3111 .test = alg_test_skcipher,
3528 .suite = { 3112 .suite = {
3529 .cipher = { 3113 .cipher = {
3530 .enc = { 3114 .enc = __VECS(aes_lrw_enc_tv_template),
3531 .vecs = aes_lrw_enc_tv_template, 3115 .dec = __VECS(aes_lrw_dec_tv_template)
3532 .count = AES_LRW_ENC_TEST_VECTORS
3533 },
3534 .dec = {
3535 .vecs = aes_lrw_dec_tv_template,
3536 .count = AES_LRW_DEC_TEST_VECTORS
3537 }
3538 } 3116 }
3539 } 3117 }
3540 }, { 3118 }, {
@@ -3542,14 +3120,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3542 .test = alg_test_skcipher, 3120 .test = alg_test_skcipher,
3543 .suite = { 3121 .suite = {
3544 .cipher = { 3122 .cipher = {
3545 .enc = { 3123 .enc = __VECS(camellia_lrw_enc_tv_template),
3546 .vecs = camellia_lrw_enc_tv_template, 3124 .dec = __VECS(camellia_lrw_dec_tv_template)
3547 .count = CAMELLIA_LRW_ENC_TEST_VECTORS
3548 },
3549 .dec = {
3550 .vecs = camellia_lrw_dec_tv_template,
3551 .count = CAMELLIA_LRW_DEC_TEST_VECTORS
3552 }
3553 } 3125 }
3554 } 3126 }
3555 }, { 3127 }, {
@@ -3557,14 +3129,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3557 .test = alg_test_skcipher, 3129 .test = alg_test_skcipher,
3558 .suite = { 3130 .suite = {
3559 .cipher = { 3131 .cipher = {
3560 .enc = { 3132 .enc = __VECS(cast6_lrw_enc_tv_template),
3561 .vecs = cast6_lrw_enc_tv_template, 3133 .dec = __VECS(cast6_lrw_dec_tv_template)
3562 .count = CAST6_LRW_ENC_TEST_VECTORS
3563 },
3564 .dec = {
3565 .vecs = cast6_lrw_dec_tv_template,
3566 .count = CAST6_LRW_DEC_TEST_VECTORS
3567 }
3568 } 3134 }
3569 } 3135 }
3570 }, { 3136 }, {
@@ -3572,14 +3138,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3572 .test = alg_test_skcipher, 3138 .test = alg_test_skcipher,
3573 .suite = { 3139 .suite = {
3574 .cipher = { 3140 .cipher = {
3575 .enc = { 3141 .enc = __VECS(serpent_lrw_enc_tv_template),
3576 .vecs = serpent_lrw_enc_tv_template, 3142 .dec = __VECS(serpent_lrw_dec_tv_template)
3577 .count = SERPENT_LRW_ENC_TEST_VECTORS
3578 },
3579 .dec = {
3580 .vecs = serpent_lrw_dec_tv_template,
3581 .count = SERPENT_LRW_DEC_TEST_VECTORS
3582 }
3583 } 3143 }
3584 } 3144 }
3585 }, { 3145 }, {
@@ -3587,14 +3147,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3587 .test = alg_test_skcipher, 3147 .test = alg_test_skcipher,
3588 .suite = { 3148 .suite = {
3589 .cipher = { 3149 .cipher = {
3590 .enc = { 3150 .enc = __VECS(tf_lrw_enc_tv_template),
3591 .vecs = tf_lrw_enc_tv_template, 3151 .dec = __VECS(tf_lrw_dec_tv_template)
3592 .count = TF_LRW_ENC_TEST_VECTORS
3593 },
3594 .dec = {
3595 .vecs = tf_lrw_dec_tv_template,
3596 .count = TF_LRW_DEC_TEST_VECTORS
3597 }
3598 } 3152 }
3599 } 3153 }
3600 }, { 3154 }, {
@@ -3603,14 +3157,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3603 .fips_allowed = 1, 3157 .fips_allowed = 1,
3604 .suite = { 3158 .suite = {
3605 .comp = { 3159 .comp = {
3606 .comp = { 3160 .comp = __VECS(lz4_comp_tv_template),
3607 .vecs = lz4_comp_tv_template, 3161 .decomp = __VECS(lz4_decomp_tv_template)
3608 .count = LZ4_COMP_TEST_VECTORS
3609 },
3610 .decomp = {
3611 .vecs = lz4_decomp_tv_template,
3612 .count = LZ4_DECOMP_TEST_VECTORS
3613 }
3614 } 3162 }
3615 } 3163 }
3616 }, { 3164 }, {
@@ -3619,14 +3167,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3619 .fips_allowed = 1, 3167 .fips_allowed = 1,
3620 .suite = { 3168 .suite = {
3621 .comp = { 3169 .comp = {
3622 .comp = { 3170 .comp = __VECS(lz4hc_comp_tv_template),
3623 .vecs = lz4hc_comp_tv_template, 3171 .decomp = __VECS(lz4hc_decomp_tv_template)
3624 .count = LZ4HC_COMP_TEST_VECTORS
3625 },
3626 .decomp = {
3627 .vecs = lz4hc_decomp_tv_template,
3628 .count = LZ4HC_DECOMP_TEST_VECTORS
3629 }
3630 } 3172 }
3631 } 3173 }
3632 }, { 3174 }, {
@@ -3635,42 +3177,27 @@ static const struct alg_test_desc alg_test_descs[] = {
3635 .fips_allowed = 1, 3177 .fips_allowed = 1,
3636 .suite = { 3178 .suite = {
3637 .comp = { 3179 .comp = {
3638 .comp = { 3180 .comp = __VECS(lzo_comp_tv_template),
3639 .vecs = lzo_comp_tv_template, 3181 .decomp = __VECS(lzo_decomp_tv_template)
3640 .count = LZO_COMP_TEST_VECTORS
3641 },
3642 .decomp = {
3643 .vecs = lzo_decomp_tv_template,
3644 .count = LZO_DECOMP_TEST_VECTORS
3645 }
3646 } 3182 }
3647 } 3183 }
3648 }, { 3184 }, {
3649 .alg = "md4", 3185 .alg = "md4",
3650 .test = alg_test_hash, 3186 .test = alg_test_hash,
3651 .suite = { 3187 .suite = {
3652 .hash = { 3188 .hash = __VECS(md4_tv_template)
3653 .vecs = md4_tv_template,
3654 .count = MD4_TEST_VECTORS
3655 }
3656 } 3189 }
3657 }, { 3190 }, {
3658 .alg = "md5", 3191 .alg = "md5",
3659 .test = alg_test_hash, 3192 .test = alg_test_hash,
3660 .suite = { 3193 .suite = {
3661 .hash = { 3194 .hash = __VECS(md5_tv_template)
3662 .vecs = md5_tv_template,
3663 .count = MD5_TEST_VECTORS
3664 }
3665 } 3195 }
3666 }, { 3196 }, {
3667 .alg = "michael_mic", 3197 .alg = "michael_mic",
3668 .test = alg_test_hash, 3198 .test = alg_test_hash,
3669 .suite = { 3199 .suite = {
3670 .hash = { 3200 .hash = __VECS(michael_mic_tv_template)
3671 .vecs = michael_mic_tv_template,
3672 .count = MICHAEL_MIC_TEST_VECTORS
3673 }
3674 } 3201 }
3675 }, { 3202 }, {
3676 .alg = "ofb(aes)", 3203 .alg = "ofb(aes)",
@@ -3678,14 +3205,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3678 .fips_allowed = 1, 3205 .fips_allowed = 1,
3679 .suite = { 3206 .suite = {
3680 .cipher = { 3207 .cipher = {
3681 .enc = { 3208 .enc = __VECS(aes_ofb_enc_tv_template),
3682 .vecs = aes_ofb_enc_tv_template, 3209 .dec = __VECS(aes_ofb_dec_tv_template)
3683 .count = AES_OFB_ENC_TEST_VECTORS
3684 },
3685 .dec = {
3686 .vecs = aes_ofb_dec_tv_template,
3687 .count = AES_OFB_DEC_TEST_VECTORS
3688 }
3689 } 3210 }
3690 } 3211 }
3691 }, { 3212 }, {
@@ -3693,24 +3214,15 @@ static const struct alg_test_desc alg_test_descs[] = {
3693 .test = alg_test_skcipher, 3214 .test = alg_test_skcipher,
3694 .suite = { 3215 .suite = {
3695 .cipher = { 3216 .cipher = {
3696 .enc = { 3217 .enc = __VECS(fcrypt_pcbc_enc_tv_template),
3697 .vecs = fcrypt_pcbc_enc_tv_template, 3218 .dec = __VECS(fcrypt_pcbc_dec_tv_template)
3698 .count = FCRYPT_ENC_TEST_VECTORS
3699 },
3700 .dec = {
3701 .vecs = fcrypt_pcbc_dec_tv_template,
3702 .count = FCRYPT_DEC_TEST_VECTORS
3703 }
3704 } 3219 }
3705 } 3220 }
3706 }, { 3221 }, {
3707 .alg = "poly1305", 3222 .alg = "poly1305",
3708 .test = alg_test_hash, 3223 .test = alg_test_hash,
3709 .suite = { 3224 .suite = {
3710 .hash = { 3225 .hash = __VECS(poly1305_tv_template)
3711 .vecs = poly1305_tv_template,
3712 .count = POLY1305_TEST_VECTORS
3713 }
3714 } 3226 }
3715 }, { 3227 }, {
3716 .alg = "rfc3686(ctr(aes))", 3228 .alg = "rfc3686(ctr(aes))",
@@ -3718,14 +3230,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3718 .fips_allowed = 1, 3230 .fips_allowed = 1,
3719 .suite = { 3231 .suite = {
3720 .cipher = { 3232 .cipher = {
3721 .enc = { 3233 .enc = __VECS(aes_ctr_rfc3686_enc_tv_template),
3722 .vecs = aes_ctr_rfc3686_enc_tv_template, 3234 .dec = __VECS(aes_ctr_rfc3686_dec_tv_template)
3723 .count = AES_CTR_3686_ENC_TEST_VECTORS
3724 },
3725 .dec = {
3726 .vecs = aes_ctr_rfc3686_dec_tv_template,
3727 .count = AES_CTR_3686_DEC_TEST_VECTORS
3728 }
3729 } 3235 }
3730 } 3236 }
3731 }, { 3237 }, {
@@ -3734,14 +3240,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3734 .fips_allowed = 1, 3240 .fips_allowed = 1,
3735 .suite = { 3241 .suite = {
3736 .aead = { 3242 .aead = {
3737 .enc = { 3243 .enc = __VECS(aes_gcm_rfc4106_enc_tv_template),
3738 .vecs = aes_gcm_rfc4106_enc_tv_template, 3244 .dec = __VECS(aes_gcm_rfc4106_dec_tv_template)
3739 .count = AES_GCM_4106_ENC_TEST_VECTORS
3740 },
3741 .dec = {
3742 .vecs = aes_gcm_rfc4106_dec_tv_template,
3743 .count = AES_GCM_4106_DEC_TEST_VECTORS
3744 }
3745 } 3245 }
3746 } 3246 }
3747 }, { 3247 }, {
@@ -3750,14 +3250,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3750 .fips_allowed = 1, 3250 .fips_allowed = 1,
3751 .suite = { 3251 .suite = {
3752 .aead = { 3252 .aead = {
3753 .enc = { 3253 .enc = __VECS(aes_ccm_rfc4309_enc_tv_template),
3754 .vecs = aes_ccm_rfc4309_enc_tv_template, 3254 .dec = __VECS(aes_ccm_rfc4309_dec_tv_template)
3755 .count = AES_CCM_4309_ENC_TEST_VECTORS
3756 },
3757 .dec = {
3758 .vecs = aes_ccm_rfc4309_dec_tv_template,
3759 .count = AES_CCM_4309_DEC_TEST_VECTORS
3760 }
3761 } 3255 }
3762 } 3256 }
3763 }, { 3257 }, {
@@ -3765,14 +3259,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3765 .test = alg_test_aead, 3259 .test = alg_test_aead,
3766 .suite = { 3260 .suite = {
3767 .aead = { 3261 .aead = {
3768 .enc = { 3262 .enc = __VECS(aes_gcm_rfc4543_enc_tv_template),
3769 .vecs = aes_gcm_rfc4543_enc_tv_template, 3263 .dec = __VECS(aes_gcm_rfc4543_dec_tv_template),
3770 .count = AES_GCM_4543_ENC_TEST_VECTORS
3771 },
3772 .dec = {
3773 .vecs = aes_gcm_rfc4543_dec_tv_template,
3774 .count = AES_GCM_4543_DEC_TEST_VECTORS
3775 },
3776 } 3264 }
3777 } 3265 }
3778 }, { 3266 }, {
@@ -3780,14 +3268,8 @@ static const struct alg_test_desc alg_test_descs[] = {
3780 .test = alg_test_aead, 3268 .test = alg_test_aead,
3781 .suite = { 3269 .suite = {
3782 .aead = { 3270 .aead = {
3783 .enc = { 3271 .enc = __VECS(rfc7539_enc_tv_template),
3784 .vecs = rfc7539_enc_tv_template, 3272 .dec = __VECS(rfc7539_dec_tv_template),
3785 .count = RFC7539_ENC_TEST_VECTORS
3786 },
3787 .dec = {
3788 .vecs = rfc7539_dec_tv_template,
3789 .count = RFC7539_DEC_TEST_VECTORS
3790 },
3791 } 3273 }
3792 } 3274 }
3793 }, { 3275 }, {
@@ -3795,71 +3277,47 @@ static const struct alg_test_desc alg_test_descs[] = {
3795 .test = alg_test_aead, 3277 .test = alg_test_aead,
3796 .suite = { 3278 .suite = {
3797 .aead = { 3279 .aead = {
3798 .enc = { 3280 .enc = __VECS(rfc7539esp_enc_tv_template),
3799 .vecs = rfc7539esp_enc_tv_template, 3281 .dec = __VECS(rfc7539esp_dec_tv_template),
3800 .count = RFC7539ESP_ENC_TEST_VECTORS
3801 },
3802 .dec = {
3803 .vecs = rfc7539esp_dec_tv_template,
3804 .count = RFC7539ESP_DEC_TEST_VECTORS
3805 },
3806 } 3282 }
3807 } 3283 }
3808 }, { 3284 }, {
3809 .alg = "rmd128", 3285 .alg = "rmd128",
3810 .test = alg_test_hash, 3286 .test = alg_test_hash,
3811 .suite = { 3287 .suite = {
3812 .hash = { 3288 .hash = __VECS(rmd128_tv_template)
3813 .vecs = rmd128_tv_template,
3814 .count = RMD128_TEST_VECTORS
3815 }
3816 } 3289 }
3817 }, { 3290 }, {
3818 .alg = "rmd160", 3291 .alg = "rmd160",
3819 .test = alg_test_hash, 3292 .test = alg_test_hash,
3820 .suite = { 3293 .suite = {
3821 .hash = { 3294 .hash = __VECS(rmd160_tv_template)
3822 .vecs = rmd160_tv_template,
3823 .count = RMD160_TEST_VECTORS
3824 }
3825 } 3295 }
3826 }, { 3296 }, {
3827 .alg = "rmd256", 3297 .alg = "rmd256",
3828 .test = alg_test_hash, 3298 .test = alg_test_hash,
3829 .suite = { 3299 .suite = {
3830 .hash = { 3300 .hash = __VECS(rmd256_tv_template)
3831 .vecs = rmd256_tv_template,
3832 .count = RMD256_TEST_VECTORS
3833 }
3834 } 3301 }
3835 }, { 3302 }, {
3836 .alg = "rmd320", 3303 .alg = "rmd320",
3837 .test = alg_test_hash, 3304 .test = alg_test_hash,
3838 .suite = { 3305 .suite = {
3839 .hash = { 3306 .hash = __VECS(rmd320_tv_template)
3840 .vecs = rmd320_tv_template,
3841 .count = RMD320_TEST_VECTORS
3842 }
3843 } 3307 }
3844 }, { 3308 }, {
3845 .alg = "rsa", 3309 .alg = "rsa",
3846 .test = alg_test_akcipher, 3310 .test = alg_test_akcipher,
3847 .fips_allowed = 1, 3311 .fips_allowed = 1,
3848 .suite = { 3312 .suite = {
3849 .akcipher = { 3313 .akcipher = __VECS(rsa_tv_template)
3850 .vecs = rsa_tv_template,
3851 .count = RSA_TEST_VECTORS
3852 }
3853 } 3314 }
3854 }, { 3315 }, {
3855 .alg = "salsa20", 3316 .alg = "salsa20",
3856 .test = alg_test_skcipher, 3317 .test = alg_test_skcipher,
3857 .suite = { 3318 .suite = {
3858 .cipher = { 3319 .cipher = {
3859 .enc = { 3320 .enc = __VECS(salsa20_stream_enc_tv_template)
3860 .vecs = salsa20_stream_enc_tv_template,
3861 .count = SALSA20_STREAM_ENC_TEST_VECTORS
3862 }
3863 } 3321 }
3864 } 3322 }
3865 }, { 3323 }, {
@@ -3867,162 +3325,111 @@ static const struct alg_test_desc alg_test_descs[] = {
3867 .test = alg_test_hash, 3325 .test = alg_test_hash,
3868 .fips_allowed = 1, 3326 .fips_allowed = 1,
3869 .suite = { 3327 .suite = {
3870 .hash = { 3328 .hash = __VECS(sha1_tv_template)
3871 .vecs = sha1_tv_template,
3872 .count = SHA1_TEST_VECTORS
3873 }
3874 } 3329 }
3875 }, { 3330 }, {
3876 .alg = "sha224", 3331 .alg = "sha224",
3877 .test = alg_test_hash, 3332 .test = alg_test_hash,
3878 .fips_allowed = 1, 3333 .fips_allowed = 1,
3879 .suite = { 3334 .suite = {
3880 .hash = { 3335 .hash = __VECS(sha224_tv_template)
3881 .vecs = sha224_tv_template,
3882 .count = SHA224_TEST_VECTORS
3883 }
3884 } 3336 }
3885 }, { 3337 }, {
3886 .alg = "sha256", 3338 .alg = "sha256",
3887 .test = alg_test_hash, 3339 .test = alg_test_hash,
3888 .fips_allowed = 1, 3340 .fips_allowed = 1,
3889 .suite = { 3341 .suite = {
3890 .hash = { 3342 .hash = __VECS(sha256_tv_template)
3891 .vecs = sha256_tv_template,
3892 .count = SHA256_TEST_VECTORS
3893 }
3894 } 3343 }
3895 }, { 3344 }, {
3896 .alg = "sha3-224", 3345 .alg = "sha3-224",
3897 .test = alg_test_hash, 3346 .test = alg_test_hash,
3898 .fips_allowed = 1, 3347 .fips_allowed = 1,
3899 .suite = { 3348 .suite = {
3900 .hash = { 3349 .hash = __VECS(sha3_224_tv_template)
3901 .vecs = sha3_224_tv_template,
3902 .count = SHA3_224_TEST_VECTORS
3903 }
3904 } 3350 }
3905 }, { 3351 }, {
3906 .alg = "sha3-256", 3352 .alg = "sha3-256",
3907 .test = alg_test_hash, 3353 .test = alg_test_hash,
3908 .fips_allowed = 1, 3354 .fips_allowed = 1,
3909 .suite = { 3355 .suite = {
3910 .hash = { 3356 .hash = __VECS(sha3_256_tv_template)
3911 .vecs = sha3_256_tv_template,
3912 .count = SHA3_256_TEST_VECTORS
3913 }
3914 } 3357 }
3915 }, { 3358 }, {
3916 .alg = "sha3-384", 3359 .alg = "sha3-384",
3917 .test = alg_test_hash, 3360 .test = alg_test_hash,
3918 .fips_allowed = 1, 3361 .fips_allowed = 1,
3919 .suite = { 3362 .suite = {
3920 .hash = { 3363 .hash = __VECS(sha3_384_tv_template)
3921 .vecs = sha3_384_tv_template,
3922 .count = SHA3_384_TEST_VECTORS
3923 }
3924 } 3364 }
3925 }, { 3365 }, {
3926 .alg = "sha3-512", 3366 .alg = "sha3-512",
3927 .test = alg_test_hash, 3367 .test = alg_test_hash,
3928 .fips_allowed = 1, 3368 .fips_allowed = 1,
3929 .suite = { 3369 .suite = {
3930 .hash = { 3370 .hash = __VECS(sha3_512_tv_template)
3931 .vecs = sha3_512_tv_template,
3932 .count = SHA3_512_TEST_VECTORS
3933 }
3934 } 3371 }
3935 }, { 3372 }, {
3936 .alg = "sha384", 3373 .alg = "sha384",
3937 .test = alg_test_hash, 3374 .test = alg_test_hash,
3938 .fips_allowed = 1, 3375 .fips_allowed = 1,
3939 .suite = { 3376 .suite = {
3940 .hash = { 3377 .hash = __VECS(sha384_tv_template)
3941 .vecs = sha384_tv_template,
3942 .count = SHA384_TEST_VECTORS
3943 }
3944 } 3378 }
3945 }, { 3379 }, {
3946 .alg = "sha512", 3380 .alg = "sha512",
3947 .test = alg_test_hash, 3381 .test = alg_test_hash,
3948 .fips_allowed = 1, 3382 .fips_allowed = 1,
3949 .suite = { 3383 .suite = {
3950 .hash = { 3384 .hash = __VECS(sha512_tv_template)
3951 .vecs = sha512_tv_template,
3952 .count = SHA512_TEST_VECTORS
3953 }
3954 } 3385 }
3955 }, { 3386 }, {
3956 .alg = "tgr128", 3387 .alg = "tgr128",
3957 .test = alg_test_hash, 3388 .test = alg_test_hash,
3958 .suite = { 3389 .suite = {
3959 .hash = { 3390 .hash = __VECS(tgr128_tv_template)
3960 .vecs = tgr128_tv_template,
3961 .count = TGR128_TEST_VECTORS
3962 }
3963 } 3391 }
3964 }, { 3392 }, {
3965 .alg = "tgr160", 3393 .alg = "tgr160",
3966 .test = alg_test_hash, 3394 .test = alg_test_hash,
3967 .suite = { 3395 .suite = {
3968 .hash = { 3396 .hash = __VECS(tgr160_tv_template)
3969 .vecs = tgr160_tv_template,
3970 .count = TGR160_TEST_VECTORS
3971 }
3972 } 3397 }
3973 }, { 3398 }, {
3974 .alg = "tgr192", 3399 .alg = "tgr192",
3975 .test = alg_test_hash, 3400 .test = alg_test_hash,
3976 .suite = { 3401 .suite = {
3977 .hash = { 3402 .hash = __VECS(tgr192_tv_template)
3978 .vecs = tgr192_tv_template,
3979 .count = TGR192_TEST_VECTORS
3980 }
3981 } 3403 }
3982 }, { 3404 }, {
3983 .alg = "vmac(aes)", 3405 .alg = "vmac(aes)",
3984 .test = alg_test_hash, 3406 .test = alg_test_hash,
3985 .suite = { 3407 .suite = {
3986 .hash = { 3408 .hash = __VECS(aes_vmac128_tv_template)
3987 .vecs = aes_vmac128_tv_template,
3988 .count = VMAC_AES_TEST_VECTORS
3989 }
3990 } 3409 }
3991 }, { 3410 }, {
3992 .alg = "wp256", 3411 .alg = "wp256",
3993 .test = alg_test_hash, 3412 .test = alg_test_hash,
3994 .suite = { 3413 .suite = {
3995 .hash = { 3414 .hash = __VECS(wp256_tv_template)
3996 .vecs = wp256_tv_template,
3997 .count = WP256_TEST_VECTORS
3998 }
3999 } 3415 }
4000 }, { 3416 }, {
4001 .alg = "wp384", 3417 .alg = "wp384",
4002 .test = alg_test_hash, 3418 .test = alg_test_hash,
4003 .suite = { 3419 .suite = {
4004 .hash = { 3420 .hash = __VECS(wp384_tv_template)
4005 .vecs = wp384_tv_template,
4006 .count = WP384_TEST_VECTORS
4007 }
4008 } 3421 }
4009 }, { 3422 }, {
4010 .alg = "wp512", 3423 .alg = "wp512",
4011 .test = alg_test_hash, 3424 .test = alg_test_hash,
4012 .suite = { 3425 .suite = {
4013 .hash = { 3426 .hash = __VECS(wp512_tv_template)
4014 .vecs = wp512_tv_template,
4015 .count = WP512_TEST_VECTORS
4016 }
4017 } 3427 }
4018 }, { 3428 }, {
4019 .alg = "xcbc(aes)", 3429 .alg = "xcbc(aes)",
4020 .test = alg_test_hash, 3430 .test = alg_test_hash,
4021 .suite = { 3431 .suite = {
4022 .hash = { 3432 .hash = __VECS(aes_xcbc128_tv_template)
4023 .vecs = aes_xcbc128_tv_template,
4024 .count = XCBC_AES_TEST_VECTORS
4025 }
4026 } 3433 }
4027 }, { 3434 }, {
4028 .alg = "xts(aes)", 3435 .alg = "xts(aes)",
@@ -4030,14 +3437,8 @@ static const struct alg_test_desc alg_test_descs[] = {
4030 .fips_allowed = 1, 3437 .fips_allowed = 1,
4031 .suite = { 3438 .suite = {
4032 .cipher = { 3439 .cipher = {
4033 .enc = { 3440 .enc = __VECS(aes_xts_enc_tv_template),
4034 .vecs = aes_xts_enc_tv_template, 3441 .dec = __VECS(aes_xts_dec_tv_template)
4035 .count = AES_XTS_ENC_TEST_VECTORS
4036 },
4037 .dec = {
4038 .vecs = aes_xts_dec_tv_template,
4039 .count = AES_XTS_DEC_TEST_VECTORS
4040 }
4041 } 3442 }
4042 } 3443 }
4043 }, { 3444 }, {
@@ -4045,14 +3446,8 @@ static const struct alg_test_desc alg_test_descs[] = {
4045 .test = alg_test_skcipher, 3446 .test = alg_test_skcipher,
4046 .suite = { 3447 .suite = {
4047 .cipher = { 3448 .cipher = {
4048 .enc = { 3449 .enc = __VECS(camellia_xts_enc_tv_template),
4049 .vecs = camellia_xts_enc_tv_template, 3450 .dec = __VECS(camellia_xts_dec_tv_template)
4050 .count = CAMELLIA_XTS_ENC_TEST_VECTORS
4051 },
4052 .dec = {
4053 .vecs = camellia_xts_dec_tv_template,
4054 .count = CAMELLIA_XTS_DEC_TEST_VECTORS
4055 }
4056 } 3451 }
4057 } 3452 }
4058 }, { 3453 }, {
@@ -4060,14 +3455,8 @@ static const struct alg_test_desc alg_test_descs[] = {
4060 .test = alg_test_skcipher, 3455 .test = alg_test_skcipher,
4061 .suite = { 3456 .suite = {
4062 .cipher = { 3457 .cipher = {
4063 .enc = { 3458 .enc = __VECS(cast6_xts_enc_tv_template),
4064 .vecs = cast6_xts_enc_tv_template, 3459 .dec = __VECS(cast6_xts_dec_tv_template)
4065 .count = CAST6_XTS_ENC_TEST_VECTORS
4066 },
4067 .dec = {
4068 .vecs = cast6_xts_dec_tv_template,
4069 .count = CAST6_XTS_DEC_TEST_VECTORS
4070 }
4071 } 3460 }
4072 } 3461 }
4073 }, { 3462 }, {
@@ -4075,14 +3464,8 @@ static const struct alg_test_desc alg_test_descs[] = {
4075 .test = alg_test_skcipher, 3464 .test = alg_test_skcipher,
4076 .suite = { 3465 .suite = {
4077 .cipher = { 3466 .cipher = {
4078 .enc = { 3467 .enc = __VECS(serpent_xts_enc_tv_template),
4079 .vecs = serpent_xts_enc_tv_template, 3468 .dec = __VECS(serpent_xts_dec_tv_template)
4080 .count = SERPENT_XTS_ENC_TEST_VECTORS
4081 },
4082 .dec = {
4083 .vecs = serpent_xts_dec_tv_template,
4084 .count = SERPENT_XTS_DEC_TEST_VECTORS
4085 }
4086 } 3469 }
4087 } 3470 }
4088 }, { 3471 }, {
@@ -4090,14 +3473,8 @@ static const struct alg_test_desc alg_test_descs[] = {
4090 .test = alg_test_skcipher, 3473 .test = alg_test_skcipher,
4091 .suite = { 3474 .suite = {
4092 .cipher = { 3475 .cipher = {
4093 .enc = { 3476 .enc = __VECS(tf_xts_enc_tv_template),
4094 .vecs = tf_xts_enc_tv_template, 3477 .dec = __VECS(tf_xts_dec_tv_template)
4095 .count = TF_XTS_ENC_TEST_VECTORS
4096 },
4097 .dec = {
4098 .vecs = tf_xts_dec_tv_template,
4099 .count = TF_XTS_DEC_TEST_VECTORS
4100 }
4101 } 3478 }
4102 } 3479 }
4103 } 3480 }