diff options
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/testmgr.c | 1033 | ||||
| -rw-r--r-- | crypto/testmgr.h | 272 |
2 files changed, 204 insertions, 1101 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 500a5277cc22..98eb09782db8 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c | |||
| @@ -2250,30 +2250,23 @@ static int alg_test_null(const struct alg_test_desc *desc, | |||
| 2250 | return 0; | 2250 | return 0; |
| 2251 | } | 2251 | } |
| 2252 | 2252 | ||
| 2253 | #define __VECS(tv) { .vecs = tv, .count = ARRAY_SIZE(tv) } | ||
| 2254 | |||
| 2253 | /* Please keep this list sorted by algorithm name. */ | 2255 | /* Please keep this list sorted by algorithm name. */ |
| 2254 | static const struct alg_test_desc alg_test_descs[] = { | 2256 | static const struct alg_test_desc alg_test_descs[] = { |
| 2255 | { | 2257 | { |
| 2256 | .alg = "ansi_cprng", | 2258 | .alg = "ansi_cprng", |
| 2257 | .test = alg_test_cprng, | 2259 | .test = alg_test_cprng, |
| 2258 | .suite = { | 2260 | .suite = { |
| 2259 | .cprng = { | 2261 | .cprng = __VECS(ansi_cprng_aes_tv_template) |
| 2260 | .vecs = ansi_cprng_aes_tv_template, | ||
| 2261 | .count = ANSI_CPRNG_AES_TEST_VECTORS | ||
| 2262 | } | ||
| 2263 | } | 2262 | } |
| 2264 | }, { | 2263 | }, { |
| 2265 | .alg = "authenc(hmac(md5),ecb(cipher_null))", | 2264 | .alg = "authenc(hmac(md5),ecb(cipher_null))", |
| 2266 | .test = alg_test_aead, | 2265 | .test = alg_test_aead, |
| 2267 | .suite = { | 2266 | .suite = { |
| 2268 | .aead = { | 2267 | .aead = { |
| 2269 | .enc = { | 2268 | .enc = __VECS(hmac_md5_ecb_cipher_null_enc_tv_template), |
| 2270 | .vecs = hmac_md5_ecb_cipher_null_enc_tv_template, | 2269 | .dec = __VECS(hmac_md5_ecb_cipher_null_dec_tv_template) |
| 2271 | .count = HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS | ||
| 2272 | }, | ||
| 2273 | .dec = { | ||
| 2274 | .vecs = hmac_md5_ecb_cipher_null_dec_tv_template, | ||
| 2275 | .count = HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS | ||
| 2276 | } | ||
| 2277 | } | 2270 | } |
| 2278 | } | 2271 | } |
| 2279 | }, { | 2272 | }, { |
| @@ -2281,12 +2274,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2281 | .test = alg_test_aead, | 2274 | .test = alg_test_aead, |
| 2282 | .suite = { | 2275 | .suite = { |
| 2283 | .aead = { | 2276 | .aead = { |
| 2284 | .enc = { | 2277 | .enc = __VECS(hmac_sha1_aes_cbc_enc_tv_temp) |
| 2285 | .vecs = | ||
| 2286 | hmac_sha1_aes_cbc_enc_tv_temp, | ||
| 2287 | .count = | ||
| 2288 | HMAC_SHA1_AES_CBC_ENC_TEST_VEC | ||
| 2289 | } | ||
| 2290 | } | 2278 | } |
| 2291 | } | 2279 | } |
| 2292 | }, { | 2280 | }, { |
| @@ -2294,12 +2282,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2294 | .test = alg_test_aead, | 2282 | .test = alg_test_aead, |
| 2295 | .suite = { | 2283 | .suite = { |
| 2296 | .aead = { | 2284 | .aead = { |
| 2297 | .enc = { | 2285 | .enc = __VECS(hmac_sha1_des_cbc_enc_tv_temp) |
| 2298 | .vecs = | ||
| 2299 | hmac_sha1_des_cbc_enc_tv_temp, | ||
| 2300 | .count = | ||
| 2301 | HMAC_SHA1_DES_CBC_ENC_TEST_VEC | ||
| 2302 | } | ||
| 2303 | } | 2286 | } |
| 2304 | } | 2287 | } |
| 2305 | }, { | 2288 | }, { |
| @@ -2308,12 +2291,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2308 | .fips_allowed = 1, | 2291 | .fips_allowed = 1, |
| 2309 | .suite = { | 2292 | .suite = { |
| 2310 | .aead = { | 2293 | .aead = { |
| 2311 | .enc = { | 2294 | .enc = __VECS(hmac_sha1_des3_ede_cbc_enc_tv_temp) |
| 2312 | .vecs = | ||
| 2313 | hmac_sha1_des3_ede_cbc_enc_tv_temp, | ||
| 2314 | .count = | ||
| 2315 | HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC | ||
| 2316 | } | ||
| 2317 | } | 2295 | } |
| 2318 | } | 2296 | } |
| 2319 | }, { | 2297 | }, { |
| @@ -2325,18 +2303,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2325 | .test = alg_test_aead, | 2303 | .test = alg_test_aead, |
| 2326 | .suite = { | 2304 | .suite = { |
| 2327 | .aead = { | 2305 | .aead = { |
| 2328 | .enc = { | 2306 | .enc = __VECS(hmac_sha1_ecb_cipher_null_enc_tv_temp), |
| 2329 | .vecs = | 2307 | .dec = __VECS(hmac_sha1_ecb_cipher_null_dec_tv_temp) |
| 2330 | hmac_sha1_ecb_cipher_null_enc_tv_temp, | ||
| 2331 | .count = | ||
| 2332 | HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC | ||
| 2333 | }, | ||
| 2334 | .dec = { | ||
| 2335 | .vecs = | ||
| 2336 | hmac_sha1_ecb_cipher_null_dec_tv_temp, | ||
| 2337 | .count = | ||
| 2338 | HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC | ||
| 2339 | } | ||
| 2340 | } | 2308 | } |
| 2341 | } | 2309 | } |
| 2342 | }, { | 2310 | }, { |
| @@ -2348,12 +2316,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2348 | .test = alg_test_aead, | 2316 | .test = alg_test_aead, |
| 2349 | .suite = { | 2317 | .suite = { |
| 2350 | .aead = { | 2318 | .aead = { |
| 2351 | .enc = { | 2319 | .enc = __VECS(hmac_sha224_des_cbc_enc_tv_temp) |
| 2352 | .vecs = | ||
| 2353 | hmac_sha224_des_cbc_enc_tv_temp, | ||
| 2354 | .count = | ||
| 2355 | HMAC_SHA224_DES_CBC_ENC_TEST_VEC | ||
| 2356 | } | ||
| 2357 | } | 2320 | } |
| 2358 | } | 2321 | } |
| 2359 | }, { | 2322 | }, { |
| @@ -2362,12 +2325,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2362 | .fips_allowed = 1, | 2325 | .fips_allowed = 1, |
| 2363 | .suite = { | 2326 | .suite = { |
| 2364 | .aead = { | 2327 | .aead = { |
| 2365 | .enc = { | 2328 | .enc = __VECS(hmac_sha224_des3_ede_cbc_enc_tv_temp) |
| 2366 | .vecs = | ||
| 2367 | hmac_sha224_des3_ede_cbc_enc_tv_temp, | ||
| 2368 | .count = | ||
| 2369 | HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC | ||
| 2370 | } | ||
| 2371 | } | 2329 | } |
| 2372 | } | 2330 | } |
| 2373 | }, { | 2331 | }, { |
| @@ -2376,12 +2334,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2376 | .fips_allowed = 1, | 2334 | .fips_allowed = 1, |
| 2377 | .suite = { | 2335 | .suite = { |
| 2378 | .aead = { | 2336 | .aead = { |
| 2379 | .enc = { | 2337 | .enc = __VECS(hmac_sha256_aes_cbc_enc_tv_temp) |
| 2380 | .vecs = | ||
| 2381 | hmac_sha256_aes_cbc_enc_tv_temp, | ||
| 2382 | .count = | ||
| 2383 | HMAC_SHA256_AES_CBC_ENC_TEST_VEC | ||
| 2384 | } | ||
| 2385 | } | 2338 | } |
| 2386 | } | 2339 | } |
| 2387 | }, { | 2340 | }, { |
| @@ -2389,12 +2342,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2389 | .test = alg_test_aead, | 2342 | .test = alg_test_aead, |
| 2390 | .suite = { | 2343 | .suite = { |
| 2391 | .aead = { | 2344 | .aead = { |
| 2392 | .enc = { | 2345 | .enc = __VECS(hmac_sha256_des_cbc_enc_tv_temp) |
| 2393 | .vecs = | ||
| 2394 | hmac_sha256_des_cbc_enc_tv_temp, | ||
| 2395 | .count = | ||
| 2396 | HMAC_SHA256_DES_CBC_ENC_TEST_VEC | ||
| 2397 | } | ||
| 2398 | } | 2346 | } |
| 2399 | } | 2347 | } |
| 2400 | }, { | 2348 | }, { |
| @@ -2403,12 +2351,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2403 | .fips_allowed = 1, | 2351 | .fips_allowed = 1, |
| 2404 | .suite = { | 2352 | .suite = { |
| 2405 | .aead = { | 2353 | .aead = { |
| 2406 | .enc = { | 2354 | .enc = __VECS(hmac_sha256_des3_ede_cbc_enc_tv_temp) |
| 2407 | .vecs = | ||
| 2408 | hmac_sha256_des3_ede_cbc_enc_tv_temp, | ||
| 2409 | .count = | ||
| 2410 | HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC | ||
| 2411 | } | ||
| 2412 | } | 2355 | } |
| 2413 | } | 2356 | } |
| 2414 | }, { | 2357 | }, { |
| @@ -2424,12 +2367,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2424 | .test = alg_test_aead, | 2367 | .test = alg_test_aead, |
| 2425 | .suite = { | 2368 | .suite = { |
| 2426 | .aead = { | 2369 | .aead = { |
| 2427 | .enc = { | 2370 | .enc = __VECS(hmac_sha384_des_cbc_enc_tv_temp) |
| 2428 | .vecs = | ||
| 2429 | hmac_sha384_des_cbc_enc_tv_temp, | ||
| 2430 | .count = | ||
| 2431 | HMAC_SHA384_DES_CBC_ENC_TEST_VEC | ||
| 2432 | } | ||
| 2433 | } | 2371 | } |
| 2434 | } | 2372 | } |
| 2435 | }, { | 2373 | }, { |
| @@ -2438,12 +2376,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2438 | .fips_allowed = 1, | 2376 | .fips_allowed = 1, |
| 2439 | .suite = { | 2377 | .suite = { |
| 2440 | .aead = { | 2378 | .aead = { |
| 2441 | .enc = { | 2379 | .enc = __VECS(hmac_sha384_des3_ede_cbc_enc_tv_temp) |
| 2442 | .vecs = | ||
| 2443 | hmac_sha384_des3_ede_cbc_enc_tv_temp, | ||
| 2444 | .count = | ||
| 2445 | HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC | ||
| 2446 | } | ||
| 2447 | } | 2380 | } |
| 2448 | } | 2381 | } |
| 2449 | }, { | 2382 | }, { |
| @@ -2460,12 +2393,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2460 | .test = alg_test_aead, | 2393 | .test = alg_test_aead, |
| 2461 | .suite = { | 2394 | .suite = { |
| 2462 | .aead = { | 2395 | .aead = { |
| 2463 | .enc = { | 2396 | .enc = __VECS(hmac_sha512_aes_cbc_enc_tv_temp) |
| 2464 | .vecs = | ||
| 2465 | hmac_sha512_aes_cbc_enc_tv_temp, | ||
| 2466 | .count = | ||
| 2467 | HMAC_SHA512_AES_CBC_ENC_TEST_VEC | ||
| 2468 | } | ||
| 2469 | } | 2397 | } |
| 2470 | } | 2398 | } |
| 2471 | }, { | 2399 | }, { |
| @@ -2473,12 +2401,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2473 | .test = alg_test_aead, | 2401 | .test = alg_test_aead, |
| 2474 | .suite = { | 2402 | .suite = { |
| 2475 | .aead = { | 2403 | .aead = { |
| 2476 | .enc = { | 2404 | .enc = __VECS(hmac_sha512_des_cbc_enc_tv_temp) |
| 2477 | .vecs = | ||
| 2478 | hmac_sha512_des_cbc_enc_tv_temp, | ||
| 2479 | .count = | ||
| 2480 | HMAC_SHA512_DES_CBC_ENC_TEST_VEC | ||
| 2481 | } | ||
| 2482 | } | 2405 | } |
| 2483 | } | 2406 | } |
| 2484 | }, { | 2407 | }, { |
| @@ -2487,12 +2410,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2487 | .fips_allowed = 1, | 2410 | .fips_allowed = 1, |
| 2488 | .suite = { | 2411 | .suite = { |
| 2489 | .aead = { | 2412 | .aead = { |
| 2490 | .enc = { | 2413 | .enc = __VECS(hmac_sha512_des3_ede_cbc_enc_tv_temp) |
| 2491 | .vecs = | ||
| 2492 | hmac_sha512_des3_ede_cbc_enc_tv_temp, | ||
| 2493 | .count = | ||
| 2494 | HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC | ||
| 2495 | } | ||
| 2496 | } | 2414 | } |
| 2497 | } | 2415 | } |
| 2498 | }, { | 2416 | }, { |
| @@ -2509,14 +2427,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2509 | .fips_allowed = 1, | 2427 | .fips_allowed = 1, |
| 2510 | .suite = { | 2428 | .suite = { |
| 2511 | .cipher = { | 2429 | .cipher = { |
| 2512 | .enc = { | 2430 | .enc = __VECS(aes_cbc_enc_tv_template), |
| 2513 | .vecs = aes_cbc_enc_tv_template, | 2431 | .dec = __VECS(aes_cbc_dec_tv_template) |
| 2514 | .count = AES_CBC_ENC_TEST_VECTORS | ||
| 2515 | }, | ||
| 2516 | .dec = { | ||
| 2517 | .vecs = aes_cbc_dec_tv_template, | ||
| 2518 | .count = AES_CBC_DEC_TEST_VECTORS | ||
| 2519 | } | ||
| 2520 | } | 2432 | } |
| 2521 | } | 2433 | } |
| 2522 | }, { | 2434 | }, { |
| @@ -2524,14 +2436,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2524 | .test = alg_test_skcipher, | 2436 | .test = alg_test_skcipher, |
| 2525 | .suite = { | 2437 | .suite = { |
| 2526 | .cipher = { | 2438 | .cipher = { |
| 2527 | .enc = { | 2439 | .enc = __VECS(anubis_cbc_enc_tv_template), |
| 2528 | .vecs = anubis_cbc_enc_tv_template, | 2440 | .dec = __VECS(anubis_cbc_dec_tv_template) |
| 2529 | .count = ANUBIS_CBC_ENC_TEST_VECTORS | ||
| 2530 | }, | ||
| 2531 | .dec = { | ||
| 2532 | .vecs = anubis_cbc_dec_tv_template, | ||
| 2533 | .count = ANUBIS_CBC_DEC_TEST_VECTORS | ||
| 2534 | } | ||
| 2535 | } | 2441 | } |
| 2536 | } | 2442 | } |
| 2537 | }, { | 2443 | }, { |
| @@ -2539,14 +2445,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2539 | .test = alg_test_skcipher, | 2445 | .test = alg_test_skcipher, |
| 2540 | .suite = { | 2446 | .suite = { |
| 2541 | .cipher = { | 2447 | .cipher = { |
| 2542 | .enc = { | 2448 | .enc = __VECS(bf_cbc_enc_tv_template), |
| 2543 | .vecs = bf_cbc_enc_tv_template, | 2449 | .dec = __VECS(bf_cbc_dec_tv_template) |
| 2544 | .count = BF_CBC_ENC_TEST_VECTORS | ||
| 2545 | }, | ||
| 2546 | .dec = { | ||
| 2547 | .vecs = bf_cbc_dec_tv_template, | ||
| 2548 | .count = BF_CBC_DEC_TEST_VECTORS | ||
| 2549 | } | ||
| 2550 | } | 2450 | } |
| 2551 | } | 2451 | } |
| 2552 | }, { | 2452 | }, { |
| @@ -2554,14 +2454,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2554 | .test = alg_test_skcipher, | 2454 | .test = alg_test_skcipher, |
| 2555 | .suite = { | 2455 | .suite = { |
| 2556 | .cipher = { | 2456 | .cipher = { |
| 2557 | .enc = { | 2457 | .enc = __VECS(camellia_cbc_enc_tv_template), |
| 2558 | .vecs = camellia_cbc_enc_tv_template, | 2458 | .dec = __VECS(camellia_cbc_dec_tv_template) |
| 2559 | .count = CAMELLIA_CBC_ENC_TEST_VECTORS | ||
| 2560 | }, | ||
| 2561 | .dec = { | ||
| 2562 | .vecs = camellia_cbc_dec_tv_template, | ||
| 2563 | .count = CAMELLIA_CBC_DEC_TEST_VECTORS | ||
| 2564 | } | ||
| 2565 | } | 2459 | } |
| 2566 | } | 2460 | } |
| 2567 | }, { | 2461 | }, { |
| @@ -2569,14 +2463,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2569 | .test = alg_test_skcipher, | 2463 | .test = alg_test_skcipher, |
| 2570 | .suite = { | 2464 | .suite = { |
| 2571 | .cipher = { | 2465 | .cipher = { |
| 2572 | .enc = { | 2466 | .enc = __VECS(cast5_cbc_enc_tv_template), |
| 2573 | .vecs = cast5_cbc_enc_tv_template, | 2467 | .dec = __VECS(cast5_cbc_dec_tv_template) |
| 2574 | .count = CAST5_CBC_ENC_TEST_VECTORS | ||
| 2575 | }, | ||
| 2576 | .dec = { | ||
| 2577 | .vecs = cast5_cbc_dec_tv_template, | ||
| 2578 | .count = CAST5_CBC_DEC_TEST_VECTORS | ||
| 2579 | } | ||
| 2580 | } | 2468 | } |
| 2581 | } | 2469 | } |
| 2582 | }, { | 2470 | }, { |
| @@ -2584,14 +2472,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2584 | .test = alg_test_skcipher, | 2472 | .test = alg_test_skcipher, |
| 2585 | .suite = { | 2473 | .suite = { |
| 2586 | .cipher = { | 2474 | .cipher = { |
| 2587 | .enc = { | 2475 | .enc = __VECS(cast6_cbc_enc_tv_template), |
| 2588 | .vecs = cast6_cbc_enc_tv_template, | 2476 | .dec = __VECS(cast6_cbc_dec_tv_template) |
| 2589 | .count = CAST6_CBC_ENC_TEST_VECTORS | ||
| 2590 | }, | ||
| 2591 | .dec = { | ||
| 2592 | .vecs = cast6_cbc_dec_tv_template, | ||
| 2593 | .count = CAST6_CBC_DEC_TEST_VECTORS | ||
| 2594 | } | ||
| 2595 | } | 2477 | } |
| 2596 | } | 2478 | } |
| 2597 | }, { | 2479 | }, { |
| @@ -2599,14 +2481,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2599 | .test = alg_test_skcipher, | 2481 | .test = alg_test_skcipher, |
| 2600 | .suite = { | 2482 | .suite = { |
| 2601 | .cipher = { | 2483 | .cipher = { |
| 2602 | .enc = { | 2484 | .enc = __VECS(des_cbc_enc_tv_template), |
| 2603 | .vecs = des_cbc_enc_tv_template, | 2485 | .dec = __VECS(des_cbc_dec_tv_template) |
| 2604 | .count = DES_CBC_ENC_TEST_VECTORS | ||
| 2605 | }, | ||
| 2606 | .dec = { | ||
| 2607 | .vecs = des_cbc_dec_tv_template, | ||
| 2608 | .count = DES_CBC_DEC_TEST_VECTORS | ||
| 2609 | } | ||
| 2610 | } | 2486 | } |
| 2611 | } | 2487 | } |
| 2612 | }, { | 2488 | }, { |
| @@ -2615,14 +2491,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2615 | .fips_allowed = 1, | 2491 | .fips_allowed = 1, |
| 2616 | .suite = { | 2492 | .suite = { |
| 2617 | .cipher = { | 2493 | .cipher = { |
| 2618 | .enc = { | 2494 | .enc = __VECS(des3_ede_cbc_enc_tv_template), |
| 2619 | .vecs = des3_ede_cbc_enc_tv_template, | 2495 | .dec = __VECS(des3_ede_cbc_dec_tv_template) |
| 2620 | .count = DES3_EDE_CBC_ENC_TEST_VECTORS | ||
| 2621 | }, | ||
| 2622 | .dec = { | ||
| 2623 | .vecs = des3_ede_cbc_dec_tv_template, | ||
| 2624 | .count = DES3_EDE_CBC_DEC_TEST_VECTORS | ||
| 2625 | } | ||
| 2626 | } | 2496 | } |
| 2627 | } | 2497 | } |
| 2628 | }, { | 2498 | }, { |
| @@ -2630,14 +2500,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2630 | .test = alg_test_skcipher, | 2500 | .test = alg_test_skcipher, |
| 2631 | .suite = { | 2501 | .suite = { |
| 2632 | .cipher = { | 2502 | .cipher = { |
| 2633 | .enc = { | 2503 | .enc = __VECS(serpent_cbc_enc_tv_template), |
| 2634 | .vecs = serpent_cbc_enc_tv_template, | 2504 | .dec = __VECS(serpent_cbc_dec_tv_template) |
| 2635 | .count = SERPENT_CBC_ENC_TEST_VECTORS | ||
| 2636 | }, | ||
| 2637 | .dec = { | ||
| 2638 | .vecs = serpent_cbc_dec_tv_template, | ||
| 2639 | .count = SERPENT_CBC_DEC_TEST_VECTORS | ||
| 2640 | } | ||
| 2641 | } | 2505 | } |
| 2642 | } | 2506 | } |
| 2643 | }, { | 2507 | }, { |
| @@ -2645,14 +2509,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2645 | .test = alg_test_skcipher, | 2509 | .test = alg_test_skcipher, |
| 2646 | .suite = { | 2510 | .suite = { |
| 2647 | .cipher = { | 2511 | .cipher = { |
| 2648 | .enc = { | 2512 | .enc = __VECS(tf_cbc_enc_tv_template), |
| 2649 | .vecs = tf_cbc_enc_tv_template, | 2513 | .dec = __VECS(tf_cbc_dec_tv_template) |
| 2650 | .count = TF_CBC_ENC_TEST_VECTORS | ||
| 2651 | }, | ||
| 2652 | .dec = { | ||
| 2653 | .vecs = tf_cbc_dec_tv_template, | ||
| 2654 | .count = TF_CBC_DEC_TEST_VECTORS | ||
| 2655 | } | ||
| 2656 | } | 2514 | } |
| 2657 | } | 2515 | } |
| 2658 | }, { | 2516 | }, { |
| @@ -2661,14 +2519,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2661 | .fips_allowed = 1, | 2519 | .fips_allowed = 1, |
| 2662 | .suite = { | 2520 | .suite = { |
| 2663 | .aead = { | 2521 | .aead = { |
| 2664 | .enc = { | 2522 | .enc = __VECS(aes_ccm_enc_tv_template), |
| 2665 | .vecs = aes_ccm_enc_tv_template, | 2523 | .dec = __VECS(aes_ccm_dec_tv_template) |
| 2666 | .count = AES_CCM_ENC_TEST_VECTORS | ||
| 2667 | }, | ||
| 2668 | .dec = { | ||
| 2669 | .vecs = aes_ccm_dec_tv_template, | ||
| 2670 | .count = AES_CCM_DEC_TEST_VECTORS | ||
| 2671 | } | ||
| 2672 | } | 2524 | } |
| 2673 | } | 2525 | } |
| 2674 | }, { | 2526 | }, { |
| @@ -2676,14 +2528,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2676 | .test = alg_test_skcipher, | 2528 | .test = alg_test_skcipher, |
| 2677 | .suite = { | 2529 | .suite = { |
| 2678 | .cipher = { | 2530 | .cipher = { |
| 2679 | .enc = { | 2531 | .enc = __VECS(chacha20_enc_tv_template), |
| 2680 | .vecs = chacha20_enc_tv_template, | 2532 | .dec = __VECS(chacha20_enc_tv_template), |
| 2681 | .count = CHACHA20_ENC_TEST_VECTORS | ||
| 2682 | }, | ||
| 2683 | .dec = { | ||
| 2684 | .vecs = chacha20_enc_tv_template, | ||
| 2685 | .count = CHACHA20_ENC_TEST_VECTORS | ||
| 2686 | }, | ||
| 2687 | } | 2533 | } |
| 2688 | } | 2534 | } |
| 2689 | }, { | 2535 | }, { |
| @@ -2691,20 +2537,14 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2691 | .fips_allowed = 1, | 2537 | .fips_allowed = 1, |
| 2692 | .test = alg_test_hash, | 2538 | .test = alg_test_hash, |
| 2693 | .suite = { | 2539 | .suite = { |
| 2694 | .hash = { | 2540 | .hash = __VECS(aes_cmac128_tv_template) |
| 2695 | .vecs = aes_cmac128_tv_template, | ||
| 2696 | .count = CMAC_AES_TEST_VECTORS | ||
| 2697 | } | ||
| 2698 | } | 2541 | } |
| 2699 | }, { | 2542 | }, { |
| 2700 | .alg = "cmac(des3_ede)", | 2543 | .alg = "cmac(des3_ede)", |
| 2701 | .fips_allowed = 1, | 2544 | .fips_allowed = 1, |
| 2702 | .test = alg_test_hash, | 2545 | .test = alg_test_hash, |
| 2703 | .suite = { | 2546 | .suite = { |
| 2704 | .hash = { | 2547 | .hash = __VECS(des3_ede_cmac64_tv_template) |
| 2705 | .vecs = des3_ede_cmac64_tv_template, | ||
| 2706 | .count = CMAC_DES3_EDE_TEST_VECTORS | ||
| 2707 | } | ||
| 2708 | } | 2548 | } |
| 2709 | }, { | 2549 | }, { |
| 2710 | .alg = "compress_null", | 2550 | .alg = "compress_null", |
| @@ -2713,30 +2553,21 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2713 | .alg = "crc32", | 2553 | .alg = "crc32", |
| 2714 | .test = alg_test_hash, | 2554 | .test = alg_test_hash, |
| 2715 | .suite = { | 2555 | .suite = { |
| 2716 | .hash = { | 2556 | .hash = __VECS(crc32_tv_template) |
| 2717 | .vecs = crc32_tv_template, | ||
| 2718 | .count = CRC32_TEST_VECTORS | ||
| 2719 | } | ||
| 2720 | } | 2557 | } |
| 2721 | }, { | 2558 | }, { |
| 2722 | .alg = "crc32c", | 2559 | .alg = "crc32c", |
| 2723 | .test = alg_test_crc32c, | 2560 | .test = alg_test_crc32c, |
| 2724 | .fips_allowed = 1, | 2561 | .fips_allowed = 1, |
| 2725 | .suite = { | 2562 | .suite = { |
| 2726 | .hash = { | 2563 | .hash = __VECS(crc32c_tv_template) |
| 2727 | .vecs = crc32c_tv_template, | ||
| 2728 | .count = CRC32C_TEST_VECTORS | ||
| 2729 | } | ||
| 2730 | } | 2564 | } |
| 2731 | }, { | 2565 | }, { |
| 2732 | .alg = "crct10dif", | 2566 | .alg = "crct10dif", |
| 2733 | .test = alg_test_hash, | 2567 | .test = alg_test_hash, |
| 2734 | .fips_allowed = 1, | 2568 | .fips_allowed = 1, |
| 2735 | .suite = { | 2569 | .suite = { |
| 2736 | .hash = { | 2570 | .hash = __VECS(crct10dif_tv_template) |
| 2737 | .vecs = crct10dif_tv_template, | ||
| 2738 | .count = CRCT10DIF_TEST_VECTORS | ||
| 2739 | } | ||
| 2740 | } | 2571 | } |
| 2741 | }, { | 2572 | }, { |
| 2742 | .alg = "ctr(aes)", | 2573 | .alg = "ctr(aes)", |
| @@ -2744,14 +2575,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2744 | .fips_allowed = 1, | 2575 | .fips_allowed = 1, |
| 2745 | .suite = { | 2576 | .suite = { |
| 2746 | .cipher = { | 2577 | .cipher = { |
| 2747 | .enc = { | 2578 | .enc = __VECS(aes_ctr_enc_tv_template), |
| 2748 | .vecs = aes_ctr_enc_tv_template, | 2579 | .dec = __VECS(aes_ctr_dec_tv_template) |
| 2749 | .count = AES_CTR_ENC_TEST_VECTORS | ||
| 2750 | }, | ||
| 2751 | .dec = { | ||
| 2752 | .vecs = aes_ctr_dec_tv_template, | ||
| 2753 | .count = AES_CTR_DEC_TEST_VECTORS | ||
| 2754 | } | ||
| 2755 | } | 2580 | } |
| 2756 | } | 2581 | } |
| 2757 | }, { | 2582 | }, { |
| @@ -2759,14 +2584,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2759 | .test = alg_test_skcipher, | 2584 | .test = alg_test_skcipher, |
| 2760 | .suite = { | 2585 | .suite = { |
| 2761 | .cipher = { | 2586 | .cipher = { |
| 2762 | .enc = { | 2587 | .enc = __VECS(bf_ctr_enc_tv_template), |
| 2763 | .vecs = bf_ctr_enc_tv_template, | 2588 | .dec = __VECS(bf_ctr_dec_tv_template) |
| 2764 | .count = BF_CTR_ENC_TEST_VECTORS | ||
| 2765 | }, | ||
| 2766 | .dec = { | ||
| 2767 | .vecs = bf_ctr_dec_tv_template, | ||
| 2768 | .count = BF_CTR_DEC_TEST_VECTORS | ||
| 2769 | } | ||
| 2770 | } | 2589 | } |
| 2771 | } | 2590 | } |
| 2772 | }, { | 2591 | }, { |
| @@ -2774,14 +2593,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2774 | .test = alg_test_skcipher, | 2593 | .test = alg_test_skcipher, |
| 2775 | .suite = { | 2594 | .suite = { |
| 2776 | .cipher = { | 2595 | .cipher = { |
| 2777 | .enc = { | 2596 | .enc = __VECS(camellia_ctr_enc_tv_template), |
| 2778 | .vecs = camellia_ctr_enc_tv_template, | 2597 | .dec = __VECS(camellia_ctr_dec_tv_template) |
| 2779 | .count = CAMELLIA_CTR_ENC_TEST_VECTORS | ||
| 2780 | }, | ||
| 2781 | .dec = { | ||
| 2782 | .vecs = camellia_ctr_dec_tv_template, | ||
| 2783 | .count = CAMELLIA_CTR_DEC_TEST_VECTORS | ||
| 2784 | } | ||
| 2785 | } | 2598 | } |
| 2786 | } | 2599 | } |
| 2787 | }, { | 2600 | }, { |
| @@ -2789,14 +2602,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2789 | .test = alg_test_skcipher, | 2602 | .test = alg_test_skcipher, |
| 2790 | .suite = { | 2603 | .suite = { |
| 2791 | .cipher = { | 2604 | .cipher = { |
| 2792 | .enc = { | 2605 | .enc = __VECS(cast5_ctr_enc_tv_template), |
| 2793 | .vecs = cast5_ctr_enc_tv_template, | 2606 | .dec = __VECS(cast5_ctr_dec_tv_template) |
| 2794 | .count = CAST5_CTR_ENC_TEST_VECTORS | ||
| 2795 | }, | ||
| 2796 | .dec = { | ||
| 2797 | .vecs = cast5_ctr_dec_tv_template, | ||
| 2798 | .count = CAST5_CTR_DEC_TEST_VECTORS | ||
| 2799 | } | ||
| 2800 | } | 2607 | } |
| 2801 | } | 2608 | } |
| 2802 | }, { | 2609 | }, { |
| @@ -2804,14 +2611,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2804 | .test = alg_test_skcipher, | 2611 | .test = alg_test_skcipher, |
| 2805 | .suite = { | 2612 | .suite = { |
| 2806 | .cipher = { | 2613 | .cipher = { |
| 2807 | .enc = { | 2614 | .enc = __VECS(cast6_ctr_enc_tv_template), |
| 2808 | .vecs = cast6_ctr_enc_tv_template, | 2615 | .dec = __VECS(cast6_ctr_dec_tv_template) |
| 2809 | .count = CAST6_CTR_ENC_TEST_VECTORS | ||
| 2810 | }, | ||
| 2811 | .dec = { | ||
| 2812 | .vecs = cast6_ctr_dec_tv_template, | ||
| 2813 | .count = CAST6_CTR_DEC_TEST_VECTORS | ||
| 2814 | } | ||
| 2815 | } | 2616 | } |
| 2816 | } | 2617 | } |
| 2817 | }, { | 2618 | }, { |
| @@ -2819,14 +2620,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2819 | .test = alg_test_skcipher, | 2620 | .test = alg_test_skcipher, |
| 2820 | .suite = { | 2621 | .suite = { |
| 2821 | .cipher = { | 2622 | .cipher = { |
| 2822 | .enc = { | 2623 | .enc = __VECS(des_ctr_enc_tv_template), |
| 2823 | .vecs = des_ctr_enc_tv_template, | 2624 | .dec = __VECS(des_ctr_dec_tv_template) |
| 2824 | .count = DES_CTR_ENC_TEST_VECTORS | ||
| 2825 | }, | ||
| 2826 | .dec = { | ||
| 2827 | .vecs = des_ctr_dec_tv_template, | ||
| 2828 | .count = DES_CTR_DEC_TEST_VECTORS | ||
| 2829 | } | ||
| 2830 | } | 2625 | } |
| 2831 | } | 2626 | } |
| 2832 | }, { | 2627 | }, { |
| @@ -2834,14 +2629,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2834 | .test = alg_test_skcipher, | 2629 | .test = alg_test_skcipher, |
| 2835 | .suite = { | 2630 | .suite = { |
| 2836 | .cipher = { | 2631 | .cipher = { |
| 2837 | .enc = { | 2632 | .enc = __VECS(des3_ede_ctr_enc_tv_template), |
| 2838 | .vecs = des3_ede_ctr_enc_tv_template, | 2633 | .dec = __VECS(des3_ede_ctr_dec_tv_template) |
| 2839 | .count = DES3_EDE_CTR_ENC_TEST_VECTORS | ||
| 2840 | }, | ||
| 2841 | .dec = { | ||
| 2842 | .vecs = des3_ede_ctr_dec_tv_template, | ||
| 2843 | .count = DES3_EDE_CTR_DEC_TEST_VECTORS | ||
| 2844 | } | ||
| 2845 | } | 2634 | } |
| 2846 | } | 2635 | } |
| 2847 | }, { | 2636 | }, { |
| @@ -2849,14 +2638,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2849 | .test = alg_test_skcipher, | 2638 | .test = alg_test_skcipher, |
| 2850 | .suite = { | 2639 | .suite = { |
| 2851 | .cipher = { | 2640 | .cipher = { |
| 2852 | .enc = { | 2641 | .enc = __VECS(serpent_ctr_enc_tv_template), |
| 2853 | .vecs = serpent_ctr_enc_tv_template, | 2642 | .dec = __VECS(serpent_ctr_dec_tv_template) |
| 2854 | .count = SERPENT_CTR_ENC_TEST_VECTORS | ||
| 2855 | }, | ||
| 2856 | .dec = { | ||
| 2857 | .vecs = serpent_ctr_dec_tv_template, | ||
| 2858 | .count = SERPENT_CTR_DEC_TEST_VECTORS | ||
| 2859 | } | ||
| 2860 | } | 2643 | } |
| 2861 | } | 2644 | } |
| 2862 | }, { | 2645 | }, { |
| @@ -2864,14 +2647,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2864 | .test = alg_test_skcipher, | 2647 | .test = alg_test_skcipher, |
| 2865 | .suite = { | 2648 | .suite = { |
| 2866 | .cipher = { | 2649 | .cipher = { |
| 2867 | .enc = { | 2650 | .enc = __VECS(tf_ctr_enc_tv_template), |
| 2868 | .vecs = tf_ctr_enc_tv_template, | 2651 | .dec = __VECS(tf_ctr_dec_tv_template) |
| 2869 | .count = TF_CTR_ENC_TEST_VECTORS | ||
| 2870 | }, | ||
| 2871 | .dec = { | ||
| 2872 | .vecs = tf_ctr_dec_tv_template, | ||
| 2873 | .count = TF_CTR_DEC_TEST_VECTORS | ||
| 2874 | } | ||
| 2875 | } | 2652 | } |
| 2876 | } | 2653 | } |
| 2877 | }, { | 2654 | }, { |
| @@ -2879,14 +2656,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2879 | .test = alg_test_skcipher, | 2656 | .test = alg_test_skcipher, |
| 2880 | .suite = { | 2657 | .suite = { |
| 2881 | .cipher = { | 2658 | .cipher = { |
| 2882 | .enc = { | 2659 | .enc = __VECS(cts_mode_enc_tv_template), |
| 2883 | .vecs = cts_mode_enc_tv_template, | 2660 | .dec = __VECS(cts_mode_dec_tv_template) |
| 2884 | .count = CTS_MODE_ENC_TEST_VECTORS | ||
| 2885 | }, | ||
| 2886 | .dec = { | ||
| 2887 | .vecs = cts_mode_dec_tv_template, | ||
| 2888 | .count = CTS_MODE_DEC_TEST_VECTORS | ||
| 2889 | } | ||
| 2890 | } | 2661 | } |
| 2891 | } | 2662 | } |
| 2892 | }, { | 2663 | }, { |
| @@ -2895,14 +2666,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2895 | .fips_allowed = 1, | 2666 | .fips_allowed = 1, |
| 2896 | .suite = { | 2667 | .suite = { |
| 2897 | .comp = { | 2668 | .comp = { |
| 2898 | .comp = { | 2669 | .comp = __VECS(deflate_comp_tv_template), |
| 2899 | .vecs = deflate_comp_tv_template, | 2670 | .decomp = __VECS(deflate_decomp_tv_template) |
| 2900 | .count = DEFLATE_COMP_TEST_VECTORS | ||
| 2901 | }, | ||
| 2902 | .decomp = { | ||
| 2903 | .vecs = deflate_decomp_tv_template, | ||
| 2904 | .count = DEFLATE_DECOMP_TEST_VECTORS | ||
| 2905 | } | ||
| 2906 | } | 2671 | } |
| 2907 | } | 2672 | } |
| 2908 | }, { | 2673 | }, { |
| @@ -2910,10 +2675,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2910 | .test = alg_test_kpp, | 2675 | .test = alg_test_kpp, |
| 2911 | .fips_allowed = 1, | 2676 | .fips_allowed = 1, |
| 2912 | .suite = { | 2677 | .suite = { |
| 2913 | .kpp = { | 2678 | .kpp = __VECS(dh_tv_template) |
| 2914 | .vecs = dh_tv_template, | ||
| 2915 | .count = DH_TEST_VECTORS | ||
| 2916 | } | ||
| 2917 | } | 2679 | } |
| 2918 | }, { | 2680 | }, { |
| 2919 | .alg = "digest_null", | 2681 | .alg = "digest_null", |
| @@ -2923,30 +2685,21 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2923 | .test = alg_test_drbg, | 2685 | .test = alg_test_drbg, |
| 2924 | .fips_allowed = 1, | 2686 | .fips_allowed = 1, |
| 2925 | .suite = { | 2687 | .suite = { |
| 2926 | .drbg = { | 2688 | .drbg = __VECS(drbg_nopr_ctr_aes128_tv_template) |
| 2927 | .vecs = drbg_nopr_ctr_aes128_tv_template, | ||
| 2928 | .count = ARRAY_SIZE(drbg_nopr_ctr_aes128_tv_template) | ||
| 2929 | } | ||
| 2930 | } | 2689 | } |
| 2931 | }, { | 2690 | }, { |
| 2932 | .alg = "drbg_nopr_ctr_aes192", | 2691 | .alg = "drbg_nopr_ctr_aes192", |
| 2933 | .test = alg_test_drbg, | 2692 | .test = alg_test_drbg, |
| 2934 | .fips_allowed = 1, | 2693 | .fips_allowed = 1, |
| 2935 | .suite = { | 2694 | .suite = { |
| 2936 | .drbg = { | 2695 | .drbg = __VECS(drbg_nopr_ctr_aes192_tv_template) |
| 2937 | .vecs = drbg_nopr_ctr_aes192_tv_template, | ||
| 2938 | .count = ARRAY_SIZE(drbg_nopr_ctr_aes192_tv_template) | ||
| 2939 | } | ||
| 2940 | } | 2696 | } |
| 2941 | }, { | 2697 | }, { |
| 2942 | .alg = "drbg_nopr_ctr_aes256", | 2698 | .alg = "drbg_nopr_ctr_aes256", |
| 2943 | .test = alg_test_drbg, | 2699 | .test = alg_test_drbg, |
| 2944 | .fips_allowed = 1, | 2700 | .fips_allowed = 1, |
| 2945 | .suite = { | 2701 | .suite = { |
| 2946 | .drbg = { | 2702 | .drbg = __VECS(drbg_nopr_ctr_aes256_tv_template) |
| 2947 | .vecs = drbg_nopr_ctr_aes256_tv_template, | ||
| 2948 | .count = ARRAY_SIZE(drbg_nopr_ctr_aes256_tv_template) | ||
| 2949 | } | ||
| 2950 | } | 2703 | } |
| 2951 | }, { | 2704 | }, { |
| 2952 | /* | 2705 | /* |
| @@ -2961,11 +2714,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2961 | .test = alg_test_drbg, | 2714 | .test = alg_test_drbg, |
| 2962 | .fips_allowed = 1, | 2715 | .fips_allowed = 1, |
| 2963 | .suite = { | 2716 | .suite = { |
| 2964 | .drbg = { | 2717 | .drbg = __VECS(drbg_nopr_hmac_sha256_tv_template) |
| 2965 | .vecs = drbg_nopr_hmac_sha256_tv_template, | ||
| 2966 | .count = | ||
| 2967 | ARRAY_SIZE(drbg_nopr_hmac_sha256_tv_template) | ||
| 2968 | } | ||
| 2969 | } | 2718 | } |
| 2970 | }, { | 2719 | }, { |
| 2971 | /* covered by drbg_nopr_hmac_sha256 test */ | 2720 | /* covered by drbg_nopr_hmac_sha256 test */ |
| @@ -2985,10 +2734,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 2985 | .test = alg_test_drbg, | 2734 | .test = alg_test_drbg, |
| 2986 | .fips_allowed = 1, | 2735 | .fips_allowed = 1, |
| 2987 | .suite = { | 2736 | .suite = { |
| 2988 | .drbg = { | 2737 | .drbg = __VECS(drbg_nopr_sha256_tv_template) |
| 2989 | .vecs = drbg_nopr_sha256_tv_template, | ||
| 2990 | .count = ARRAY_SIZE(drbg_nopr_sha256_tv_template) | ||
| 2991 | } | ||
| 2992 | } | 2738 | } |
| 2993 | }, { | 2739 | }, { |
| 2994 | /* covered by drbg_nopr_sha256 test */ | 2740 | /* covered by drbg_nopr_sha256 test */ |
| @@ -3004,10 +2750,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3004 | .test = alg_test_drbg, | 2750 | .test = alg_test_drbg, |
| 3005 | .fips_allowed = 1, | 2751 | .fips_allowed = 1, |
| 3006 | .suite = { | 2752 | .suite = { |
| 3007 | .drbg = { | 2753 | .drbg = __VECS(drbg_pr_ctr_aes128_tv_template) |
| 3008 | .vecs = drbg_pr_ctr_aes128_tv_template, | ||
| 3009 | .count = ARRAY_SIZE(drbg_pr_ctr_aes128_tv_template) | ||
| 3010 | } | ||
| 3011 | } | 2754 | } |
| 3012 | }, { | 2755 | }, { |
| 3013 | /* covered by drbg_pr_ctr_aes128 test */ | 2756 | /* covered by drbg_pr_ctr_aes128 test */ |
| @@ -3027,10 +2770,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3027 | .test = alg_test_drbg, | 2770 | .test = alg_test_drbg, |
| 3028 | .fips_allowed = 1, | 2771 | .fips_allowed = 1, |
| 3029 | .suite = { | 2772 | .suite = { |
| 3030 | .drbg = { | 2773 | .drbg = __VECS(drbg_pr_hmac_sha256_tv_template) |
| 3031 | .vecs = drbg_pr_hmac_sha256_tv_template, | ||
| 3032 | .count = ARRAY_SIZE(drbg_pr_hmac_sha256_tv_template) | ||
| 3033 | } | ||
| 3034 | } | 2774 | } |
| 3035 | }, { | 2775 | }, { |
| 3036 | /* covered by drbg_pr_hmac_sha256 test */ | 2776 | /* covered by drbg_pr_hmac_sha256 test */ |
| @@ -3050,10 +2790,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3050 | .test = alg_test_drbg, | 2790 | .test = alg_test_drbg, |
| 3051 | .fips_allowed = 1, | 2791 | .fips_allowed = 1, |
| 3052 | .suite = { | 2792 | .suite = { |
| 3053 | .drbg = { | 2793 | .drbg = __VECS(drbg_pr_sha256_tv_template) |
| 3054 | .vecs = drbg_pr_sha256_tv_template, | ||
| 3055 | .count = ARRAY_SIZE(drbg_pr_sha256_tv_template) | ||
| 3056 | } | ||
| 3057 | } | 2794 | } |
| 3058 | }, { | 2795 | }, { |
| 3059 | /* covered by drbg_pr_sha256 test */ | 2796 | /* covered by drbg_pr_sha256 test */ |
| @@ -3070,14 +2807,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3070 | .fips_allowed = 1, | 2807 | .fips_allowed = 1, |
| 3071 | .suite = { | 2808 | .suite = { |
| 3072 | .cipher = { | 2809 | .cipher = { |
| 3073 | .enc = { | 2810 | .enc = __VECS(aes_enc_tv_template), |
| 3074 | .vecs = aes_enc_tv_template, | 2811 | .dec = __VECS(aes_dec_tv_template) |
| 3075 | .count = AES_ENC_TEST_VECTORS | ||
| 3076 | }, | ||
| 3077 | .dec = { | ||
| 3078 | .vecs = aes_dec_tv_template, | ||
| 3079 | .count = AES_DEC_TEST_VECTORS | ||
| 3080 | } | ||
| 3081 | } | 2812 | } |
| 3082 | } | 2813 | } |
| 3083 | }, { | 2814 | }, { |
| @@ -3085,14 +2816,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3085 | .test = alg_test_skcipher, | 2816 | .test = alg_test_skcipher, |
| 3086 | .suite = { | 2817 | .suite = { |
| 3087 | .cipher = { | 2818 | .cipher = { |
| 3088 | .enc = { | 2819 | .enc = __VECS(anubis_enc_tv_template), |
| 3089 | .vecs = anubis_enc_tv_template, | 2820 | .dec = __VECS(anubis_dec_tv_template) |
| 3090 | .count = ANUBIS_ENC_TEST_VECTORS | ||
| 3091 | }, | ||
| 3092 | .dec = { | ||
| 3093 | .vecs = anubis_dec_tv_template, | ||
| 3094 | .count = ANUBIS_DEC_TEST_VECTORS | ||
| 3095 | } | ||
| 3096 | } | 2821 | } |
| 3097 | } | 2822 | } |
| 3098 | }, { | 2823 | }, { |
| @@ -3100,14 +2825,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3100 | .test = alg_test_skcipher, | 2825 | .test = alg_test_skcipher, |
| 3101 | .suite = { | 2826 | .suite = { |
| 3102 | .cipher = { | 2827 | .cipher = { |
| 3103 | .enc = { | 2828 | .enc = __VECS(arc4_enc_tv_template), |
| 3104 | .vecs = arc4_enc_tv_template, | 2829 | .dec = __VECS(arc4_dec_tv_template) |
| 3105 | .count = ARC4_ENC_TEST_VECTORS | ||
| 3106 | }, | ||
| 3107 | .dec = { | ||
| 3108 | .vecs = arc4_dec_tv_template, | ||
| 3109 | .count = ARC4_DEC_TEST_VECTORS | ||
| 3110 | } | ||
| 3111 | } | 2830 | } |
| 3112 | } | 2831 | } |
| 3113 | }, { | 2832 | }, { |
| @@ -3115,14 +2834,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3115 | .test = alg_test_skcipher, | 2834 | .test = alg_test_skcipher, |
| 3116 | .suite = { | 2835 | .suite = { |
| 3117 | .cipher = { | 2836 | .cipher = { |
| 3118 | .enc = { | 2837 | .enc = __VECS(bf_enc_tv_template), |
| 3119 | .vecs = bf_enc_tv_template, | 2838 | .dec = __VECS(bf_dec_tv_template) |
| 3120 | .count = BF_ENC_TEST_VECTORS | ||
| 3121 | }, | ||
| 3122 | .dec = { | ||
| 3123 | .vecs = bf_dec_tv_template, | ||
| 3124 | .count = BF_DEC_TEST_VECTORS | ||
| 3125 | } | ||
| 3126 | } | 2839 | } |
| 3127 | } | 2840 | } |
| 3128 | }, { | 2841 | }, { |
| @@ -3130,14 +2843,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3130 | .test = alg_test_skcipher, | 2843 | .test = alg_test_skcipher, |
| 3131 | .suite = { | 2844 | .suite = { |
| 3132 | .cipher = { | 2845 | .cipher = { |
| 3133 | .enc = { | 2846 | .enc = __VECS(camellia_enc_tv_template), |
| 3134 | .vecs = camellia_enc_tv_template, | 2847 | .dec = __VECS(camellia_dec_tv_template) |
| 3135 | .count = CAMELLIA_ENC_TEST_VECTORS | ||
| 3136 | }, | ||
| 3137 | .dec = { | ||
| 3138 | .vecs = camellia_dec_tv_template, | ||
| 3139 | .count = CAMELLIA_DEC_TEST_VECTORS | ||
| 3140 | } | ||
| 3141 | } | 2848 | } |
| 3142 | } | 2849 | } |
| 3143 | }, { | 2850 | }, { |
| @@ -3145,14 +2852,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3145 | .test = alg_test_skcipher, | 2852 | .test = alg_test_skcipher, |
| 3146 | .suite = { | 2853 | .suite = { |
| 3147 | .cipher = { | 2854 | .cipher = { |
| 3148 | .enc = { | 2855 | .enc = __VECS(cast5_enc_tv_template), |
| 3149 | .vecs = cast5_enc_tv_template, | 2856 | .dec = __VECS(cast5_dec_tv_template) |
| 3150 | .count = CAST5_ENC_TEST_VECTORS | ||
| 3151 | }, | ||
| 3152 | .dec = { | ||
| 3153 | .vecs = cast5_dec_tv_template, | ||
| 3154 | .count = CAST5_DEC_TEST_VECTORS | ||
| 3155 | } | ||
| 3156 | } | 2857 | } |
| 3157 | } | 2858 | } |
| 3158 | }, { | 2859 | }, { |
| @@ -3160,14 +2861,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3160 | .test = alg_test_skcipher, | 2861 | .test = alg_test_skcipher, |
| 3161 | .suite = { | 2862 | .suite = { |
| 3162 | .cipher = { | 2863 | .cipher = { |
| 3163 | .enc = { | 2864 | .enc = __VECS(cast6_enc_tv_template), |
| 3164 | .vecs = cast6_enc_tv_template, | 2865 | .dec = __VECS(cast6_dec_tv_template) |
| 3165 | .count = CAST6_ENC_TEST_VECTORS | ||
| 3166 | }, | ||
| 3167 | .dec = { | ||
| 3168 | .vecs = cast6_dec_tv_template, | ||
| 3169 | .count = CAST6_DEC_TEST_VECTORS | ||
| 3170 | } | ||
| 3171 | } | 2866 | } |
| 3172 | } | 2867 | } |
| 3173 | }, { | 2868 | }, { |
| @@ -3178,14 +2873,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3178 | .test = alg_test_skcipher, | 2873 | .test = alg_test_skcipher, |
| 3179 | .suite = { | 2874 | .suite = { |
| 3180 | .cipher = { | 2875 | .cipher = { |
| 3181 | .enc = { | 2876 | .enc = __VECS(des_enc_tv_template), |
| 3182 | .vecs = des_enc_tv_template, | 2877 | .dec = __VECS(des_dec_tv_template) |
| 3183 | .count = DES_ENC_TEST_VECTORS | ||
| 3184 | }, | ||
| 3185 | .dec = { | ||
| 3186 | .vecs = des_dec_tv_template, | ||
| 3187 | .count = DES_DEC_TEST_VECTORS | ||
| 3188 | } | ||
| 3189 | } | 2878 | } |
| 3190 | } | 2879 | } |
| 3191 | }, { | 2880 | }, { |
| @@ -3194,14 +2883,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3194 | .fips_allowed = 1, | 2883 | .fips_allowed = 1, |
| 3195 | .suite = { | 2884 | .suite = { |
| 3196 | .cipher = { | 2885 | .cipher = { |
| 3197 | .enc = { | 2886 | .enc = __VECS(des3_ede_enc_tv_template), |
| 3198 | .vecs = des3_ede_enc_tv_template, | 2887 | .dec = __VECS(des3_ede_dec_tv_template) |
| 3199 | .count = DES3_EDE_ENC_TEST_VECTORS | ||
| 3200 | }, | ||
| 3201 | .dec = { | ||
| 3202 | .vecs = des3_ede_dec_tv_template, | ||
| 3203 | .count = DES3_EDE_DEC_TEST_VECTORS | ||
| 3204 | } | ||
| 3205 | } | 2888 | } |
| 3206 | } | 2889 | } |
| 3207 | }, { | 2890 | }, { |
| @@ -3224,14 +2907,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3224 | .test = alg_test_skcipher, | 2907 | .test = alg_test_skcipher, |
| 3225 | .suite = { | 2908 | .suite = { |
| 3226 | .cipher = { | 2909 | .cipher = { |
| 3227 | .enc = { | 2910 | .enc = __VECS(khazad_enc_tv_template), |
| 3228 | .vecs = khazad_enc_tv_template, | 2911 | .dec = __VECS(khazad_dec_tv_template) |
| 3229 | .count = KHAZAD_ENC_TEST_VECTORS | ||
| 3230 | }, | ||
| 3231 | .dec = { | ||
| 3232 | .vecs = khazad_dec_tv_template, | ||
| 3233 | .count = KHAZAD_DEC_TEST_VECTORS | ||
| 3234 | } | ||
| 3235 | } | 2912 | } |
| 3236 | } | 2913 | } |
| 3237 | }, { | 2914 | }, { |
| @@ -3239,14 +2916,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3239 | .test = alg_test_skcipher, | 2916 | .test = alg_test_skcipher, |
| 3240 | .suite = { | 2917 | .suite = { |
| 3241 | .cipher = { | 2918 | .cipher = { |
| 3242 | .enc = { | 2919 | .enc = __VECS(seed_enc_tv_template), |
| 3243 | .vecs = seed_enc_tv_template, | 2920 | .dec = __VECS(seed_dec_tv_template) |
| 3244 | .count = SEED_ENC_TEST_VECTORS | ||
| 3245 | }, | ||
| 3246 | .dec = { | ||
| 3247 | .vecs = seed_dec_tv_template, | ||
| 3248 | .count = SEED_DEC_TEST_VECTORS | ||
| 3249 | } | ||
| 3250 | } | 2921 | } |
| 3251 | } | 2922 | } |
| 3252 | }, { | 2923 | }, { |
| @@ -3254,14 +2925,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3254 | .test = alg_test_skcipher, | 2925 | .test = alg_test_skcipher, |
| 3255 | .suite = { | 2926 | .suite = { |
| 3256 | .cipher = { | 2927 | .cipher = { |
| 3257 | .enc = { | 2928 | .enc = __VECS(serpent_enc_tv_template), |
| 3258 | .vecs = serpent_enc_tv_template, | 2929 | .dec = __VECS(serpent_dec_tv_template) |
| 3259 | .count = SERPENT_ENC_TEST_VECTORS | ||
| 3260 | }, | ||
| 3261 | .dec = { | ||
| 3262 | .vecs = serpent_dec_tv_template, | ||
| 3263 | .count = SERPENT_DEC_TEST_VECTORS | ||
| 3264 | } | ||
| 3265 | } | 2930 | } |
| 3266 | } | 2931 | } |
| 3267 | }, { | 2932 | }, { |
| @@ -3269,14 +2934,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3269 | .test = alg_test_skcipher, | 2934 | .test = alg_test_skcipher, |
| 3270 | .suite = { | 2935 | .suite = { |
| 3271 | .cipher = { | 2936 | .cipher = { |
| 3272 | .enc = { | 2937 | .enc = __VECS(tea_enc_tv_template), |
| 3273 | .vecs = tea_enc_tv_template, | 2938 | .dec = __VECS(tea_dec_tv_template) |
| 3274 | .count = TEA_ENC_TEST_VECTORS | ||
| 3275 | }, | ||
| 3276 | .dec = { | ||
| 3277 | .vecs = tea_dec_tv_template, | ||
| 3278 | .count = TEA_DEC_TEST_VECTORS | ||
| 3279 | } | ||
| 3280 | } | 2939 | } |
| 3281 | } | 2940 | } |
| 3282 | }, { | 2941 | }, { |
| @@ -3284,14 +2943,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3284 | .test = alg_test_skcipher, | 2943 | .test = alg_test_skcipher, |
| 3285 | .suite = { | 2944 | .suite = { |
| 3286 | .cipher = { | 2945 | .cipher = { |
| 3287 | .enc = { | 2946 | .enc = __VECS(tnepres_enc_tv_template), |
| 3288 | .vecs = tnepres_enc_tv_template, | 2947 | .dec = __VECS(tnepres_dec_tv_template) |
| 3289 | .count = TNEPRES_ENC_TEST_VECTORS | ||
| 3290 | }, | ||
| 3291 | .dec = { | ||
| 3292 | .vecs = tnepres_dec_tv_template, | ||
| 3293 | .count = TNEPRES_DEC_TEST_VECTORS | ||
| 3294 | } | ||
| 3295 | } | 2948 | } |
| 3296 | } | 2949 | } |
| 3297 | }, { | 2950 | }, { |
| @@ -3299,14 +2952,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3299 | .test = alg_test_skcipher, | 2952 | .test = alg_test_skcipher, |
| 3300 | .suite = { | 2953 | .suite = { |
| 3301 | .cipher = { | 2954 | .cipher = { |
| 3302 | .enc = { | 2955 | .enc = __VECS(tf_enc_tv_template), |
| 3303 | .vecs = tf_enc_tv_template, | 2956 | .dec = __VECS(tf_dec_tv_template) |
| 3304 | .count = TF_ENC_TEST_VECTORS | ||
| 3305 | }, | ||
| 3306 | .dec = { | ||
| 3307 | .vecs = tf_dec_tv_template, | ||
| 3308 | .count = TF_DEC_TEST_VECTORS | ||
| 3309 | } | ||
| 3310 | } | 2957 | } |
| 3311 | } | 2958 | } |
| 3312 | }, { | 2959 | }, { |
| @@ -3314,14 +2961,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3314 | .test = alg_test_skcipher, | 2961 | .test = alg_test_skcipher, |
| 3315 | .suite = { | 2962 | .suite = { |
| 3316 | .cipher = { | 2963 | .cipher = { |
| 3317 | .enc = { | 2964 | .enc = __VECS(xeta_enc_tv_template), |
| 3318 | .vecs = xeta_enc_tv_template, | 2965 | .dec = __VECS(xeta_dec_tv_template) |
| 3319 | .count = XETA_ENC_TEST_VECTORS | ||
| 3320 | }, | ||
| 3321 | .dec = { | ||
| 3322 | .vecs = xeta_dec_tv_template, | ||
| 3323 | .count = XETA_DEC_TEST_VECTORS | ||
| 3324 | } | ||
| 3325 | } | 2966 | } |
| 3326 | } | 2967 | } |
| 3327 | }, { | 2968 | }, { |
| @@ -3329,14 +2970,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3329 | .test = alg_test_skcipher, | 2970 | .test = alg_test_skcipher, |
| 3330 | .suite = { | 2971 | .suite = { |
| 3331 | .cipher = { | 2972 | .cipher = { |
| 3332 | .enc = { | 2973 | .enc = __VECS(xtea_enc_tv_template), |
| 3333 | .vecs = xtea_enc_tv_template, | 2974 | .dec = __VECS(xtea_dec_tv_template) |
| 3334 | .count = XTEA_ENC_TEST_VECTORS | ||
| 3335 | }, | ||
| 3336 | .dec = { | ||
| 3337 | .vecs = xtea_dec_tv_template, | ||
| 3338 | .count = XTEA_DEC_TEST_VECTORS | ||
| 3339 | } | ||
| 3340 | } | 2975 | } |
| 3341 | } | 2976 | } |
| 3342 | }, { | 2977 | }, { |
| @@ -3344,10 +2979,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3344 | .test = alg_test_kpp, | 2979 | .test = alg_test_kpp, |
| 3345 | .fips_allowed = 1, | 2980 | .fips_allowed = 1, |
| 3346 | .suite = { | 2981 | .suite = { |
| 3347 | .kpp = { | 2982 | .kpp = __VECS(ecdh_tv_template) |
| 3348 | .vecs = ecdh_tv_template, | ||
| 3349 | .count = ECDH_TEST_VECTORS | ||
| 3350 | } | ||
| 3351 | } | 2983 | } |
| 3352 | }, { | 2984 | }, { |
| 3353 | .alg = "gcm(aes)", | 2985 | .alg = "gcm(aes)", |
| @@ -3355,14 +2987,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3355 | .fips_allowed = 1, | 2987 | .fips_allowed = 1, |
| 3356 | .suite = { | 2988 | .suite = { |
| 3357 | .aead = { | 2989 | .aead = { |
| 3358 | .enc = { | 2990 | .enc = __VECS(aes_gcm_enc_tv_template), |
| 3359 | .vecs = aes_gcm_enc_tv_template, | 2991 | .dec = __VECS(aes_gcm_dec_tv_template) |
| 3360 | .count = AES_GCM_ENC_TEST_VECTORS | ||
| 3361 | }, | ||
| 3362 | .dec = { | ||
| 3363 | .vecs = aes_gcm_dec_tv_template, | ||
| 3364 | .count = AES_GCM_DEC_TEST_VECTORS | ||
| 3365 | } | ||
| 3366 | } | 2992 | } |
| 3367 | } | 2993 | } |
| 3368 | }, { | 2994 | }, { |
| @@ -3370,136 +2996,94 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3370 | .test = alg_test_hash, | 2996 | .test = alg_test_hash, |
| 3371 | .fips_allowed = 1, | 2997 | .fips_allowed = 1, |
| 3372 | .suite = { | 2998 | .suite = { |
| 3373 | .hash = { | 2999 | .hash = __VECS(ghash_tv_template) |
| 3374 | .vecs = ghash_tv_template, | ||
| 3375 | .count = GHASH_TEST_VECTORS | ||
| 3376 | } | ||
| 3377 | } | 3000 | } |
| 3378 | }, { | 3001 | }, { |
| 3379 | .alg = "hmac(crc32)", | 3002 | .alg = "hmac(crc32)", |
| 3380 | .test = alg_test_hash, | 3003 | .test = alg_test_hash, |
| 3381 | .suite = { | 3004 | .suite = { |
| 3382 | .hash = { | 3005 | .hash = __VECS(bfin_crc_tv_template) |
| 3383 | .vecs = bfin_crc_tv_template, | ||
| 3384 | .count = BFIN_CRC_TEST_VECTORS | ||
| 3385 | } | ||
| 3386 | } | 3006 | } |
| 3387 | }, { | 3007 | }, { |
| 3388 | .alg = "hmac(md5)", | 3008 | .alg = "hmac(md5)", |
| 3389 | .test = alg_test_hash, | 3009 | .test = alg_test_hash, |
| 3390 | .suite = { | 3010 | .suite = { |
| 3391 | .hash = { | 3011 | .hash = __VECS(hmac_md5_tv_template) |
| 3392 | .vecs = hmac_md5_tv_template, | ||
| 3393 | .count = HMAC_MD5_TEST_VECTORS | ||
| 3394 | } | ||
| 3395 | } | 3012 | } |
| 3396 | }, { | 3013 | }, { |
| 3397 | .alg = "hmac(rmd128)", | 3014 | .alg = "hmac(rmd128)", |
| 3398 | .test = alg_test_hash, | 3015 | .test = alg_test_hash, |
| 3399 | .suite = { | 3016 | .suite = { |
| 3400 | .hash = { | 3017 | .hash = __VECS(hmac_rmd128_tv_template) |
| 3401 | .vecs = hmac_rmd128_tv_template, | ||
| 3402 | .count = HMAC_RMD128_TEST_VECTORS | ||
| 3403 | } | ||
| 3404 | } | 3018 | } |
| 3405 | }, { | 3019 | }, { |
| 3406 | .alg = "hmac(rmd160)", | 3020 | .alg = "hmac(rmd160)", |
| 3407 | .test = alg_test_hash, | 3021 | .test = alg_test_hash, |
| 3408 | .suite = { | 3022 | .suite = { |
| 3409 | .hash = { | 3023 | .hash = __VECS(hmac_rmd160_tv_template) |
| 3410 | .vecs = hmac_rmd160_tv_template, | ||
| 3411 | .count = HMAC_RMD160_TEST_VECTORS | ||
| 3412 | } | ||
| 3413 | } | 3024 | } |
| 3414 | }, { | 3025 | }, { |
| 3415 | .alg = "hmac(sha1)", | 3026 | .alg = "hmac(sha1)", |
| 3416 | .test = alg_test_hash, | 3027 | .test = alg_test_hash, |
| 3417 | .fips_allowed = 1, | 3028 | .fips_allowed = 1, |
| 3418 | .suite = { | 3029 | .suite = { |
| 3419 | .hash = { | 3030 | .hash = __VECS(hmac_sha1_tv_template) |
| 3420 | .vecs = hmac_sha1_tv_template, | ||
| 3421 | .count = HMAC_SHA1_TEST_VECTORS | ||
| 3422 | } | ||
| 3423 | } | 3031 | } |
| 3424 | }, { | 3032 | }, { |
| 3425 | .alg = "hmac(sha224)", | 3033 | .alg = "hmac(sha224)", |
| 3426 | .test = alg_test_hash, | 3034 | .test = alg_test_hash, |
| 3427 | .fips_allowed = 1, | 3035 | .fips_allowed = 1, |
| 3428 | .suite = { | 3036 | .suite = { |
| 3429 | .hash = { | 3037 | .hash = __VECS(hmac_sha224_tv_template) |
| 3430 | .vecs = hmac_sha224_tv_template, | ||
| 3431 | .count = HMAC_SHA224_TEST_VECTORS | ||
| 3432 | } | ||
| 3433 | } | 3038 | } |
| 3434 | }, { | 3039 | }, { |
| 3435 | .alg = "hmac(sha256)", | 3040 | .alg = "hmac(sha256)", |
| 3436 | .test = alg_test_hash, | 3041 | .test = alg_test_hash, |
| 3437 | .fips_allowed = 1, | 3042 | .fips_allowed = 1, |
| 3438 | .suite = { | 3043 | .suite = { |
| 3439 | .hash = { | 3044 | .hash = __VECS(hmac_sha256_tv_template) |
| 3440 | .vecs = hmac_sha256_tv_template, | ||
| 3441 | .count = HMAC_SHA256_TEST_VECTORS | ||
| 3442 | } | ||
| 3443 | } | 3045 | } |
| 3444 | }, { | 3046 | }, { |
| 3445 | .alg = "hmac(sha3-224)", | 3047 | .alg = "hmac(sha3-224)", |
| 3446 | .test = alg_test_hash, | 3048 | .test = alg_test_hash, |
| 3447 | .fips_allowed = 1, | 3049 | .fips_allowed = 1, |
| 3448 | .suite = { | 3050 | .suite = { |
| 3449 | .hash = { | 3051 | .hash = __VECS(hmac_sha3_224_tv_template) |
| 3450 | .vecs = hmac_sha3_224_tv_template, | ||
| 3451 | .count = HMAC_SHA3_224_TEST_VECTORS | ||
| 3452 | } | ||
| 3453 | } | 3052 | } |
| 3454 | }, { | 3053 | }, { |
| 3455 | .alg = "hmac(sha3-256)", | 3054 | .alg = "hmac(sha3-256)", |
| 3456 | .test = alg_test_hash, | 3055 | .test = alg_test_hash, |
| 3457 | .fips_allowed = 1, | 3056 | .fips_allowed = 1, |
| 3458 | .suite = { | 3057 | .suite = { |
| 3459 | .hash = { | 3058 | .hash = __VECS(hmac_sha3_256_tv_template) |
| 3460 | .vecs = hmac_sha3_256_tv_template, | ||
| 3461 | .count = HMAC_SHA3_256_TEST_VECTORS | ||
| 3462 | } | ||
| 3463 | } | 3059 | } |
| 3464 | }, { | 3060 | }, { |
| 3465 | .alg = "hmac(sha3-384)", | 3061 | .alg = "hmac(sha3-384)", |
| 3466 | .test = alg_test_hash, | 3062 | .test = alg_test_hash, |
| 3467 | .fips_allowed = 1, | 3063 | .fips_allowed = 1, |
| 3468 | .suite = { | 3064 | .suite = { |
| 3469 | .hash = { | 3065 | .hash = __VECS(hmac_sha3_384_tv_template) |
| 3470 | .vecs = hmac_sha3_384_tv_template, | ||
| 3471 | .count = HMAC_SHA3_384_TEST_VECTORS | ||
| 3472 | } | ||
| 3473 | } | 3066 | } |
| 3474 | }, { | 3067 | }, { |
| 3475 | .alg = "hmac(sha3-512)", | 3068 | .alg = "hmac(sha3-512)", |
| 3476 | .test = alg_test_hash, | 3069 | .test = alg_test_hash, |
| 3477 | .fips_allowed = 1, | 3070 | .fips_allowed = 1, |
| 3478 | .suite = { | 3071 | .suite = { |
| 3479 | .hash = { | 3072 | .hash = __VECS(hmac_sha3_512_tv_template) |
| 3480 | .vecs = hmac_sha3_512_tv_template, | ||
| 3481 | .count = HMAC_SHA3_512_TEST_VECTORS | ||
| 3482 | } | ||
| 3483 | } | 3073 | } |
| 3484 | }, { | 3074 | }, { |
| 3485 | .alg = "hmac(sha384)", | 3075 | .alg = "hmac(sha384)", |
| 3486 | .test = alg_test_hash, | 3076 | .test = alg_test_hash, |
| 3487 | .fips_allowed = 1, | 3077 | .fips_allowed = 1, |
| 3488 | .suite = { | 3078 | .suite = { |
| 3489 | .hash = { | 3079 | .hash = __VECS(hmac_sha384_tv_template) |
| 3490 | .vecs = hmac_sha384_tv_template, | ||
| 3491 | .count = HMAC_SHA384_TEST_VECTORS | ||
| 3492 | } | ||
| 3493 | } | 3080 | } |
| 3494 | }, { | 3081 | }, { |
| 3495 | .alg = "hmac(sha512)", | 3082 | .alg = "hmac(sha512)", |
| 3496 | .test = alg_test_hash, | 3083 | .test = alg_test_hash, |
| 3497 | .fips_allowed = 1, | 3084 | .fips_allowed = 1, |
| 3498 | .suite = { | 3085 | .suite = { |
| 3499 | .hash = { | 3086 | .hash = __VECS(hmac_sha512_tv_template) |
| 3500 | .vecs = hmac_sha512_tv_template, | ||
| 3501 | .count = HMAC_SHA512_TEST_VECTORS | ||
| 3502 | } | ||
| 3503 | } | 3087 | } |
| 3504 | }, { | 3088 | }, { |
| 3505 | .alg = "jitterentropy_rng", | 3089 | .alg = "jitterentropy_rng", |
| @@ -3511,14 +3095,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3511 | .fips_allowed = 1, | 3095 | .fips_allowed = 1, |
| 3512 | .suite = { | 3096 | .suite = { |
| 3513 | .cipher = { | 3097 | .cipher = { |
| 3514 | .enc = { | 3098 | .enc = __VECS(aes_kw_enc_tv_template), |
| 3515 | .vecs = aes_kw_enc_tv_template, | 3099 | .dec = __VECS(aes_kw_dec_tv_template) |
| 3516 | .count = ARRAY_SIZE(aes_kw_enc_tv_template) | ||
| 3517 | }, | ||
| 3518 | .dec = { | ||
| 3519 | .vecs = aes_kw_dec_tv_template, | ||
| 3520 | .count = ARRAY_SIZE(aes_kw_dec_tv_template) | ||
| 3521 | } | ||
| 3522 | } | 3100 | } |
| 3523 | } | 3101 | } |
| 3524 | }, { | 3102 | }, { |
| @@ -3526,14 +3104,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3526 | .test = alg_test_skcipher, | 3104 | .test = alg_test_skcipher, |
| 3527 | .suite = { | 3105 | .suite = { |
| 3528 | .cipher = { | 3106 | .cipher = { |
| 3529 | .enc = { | 3107 | .enc = __VECS(aes_lrw_enc_tv_template), |
| 3530 | .vecs = aes_lrw_enc_tv_template, | 3108 | .dec = __VECS(aes_lrw_dec_tv_template) |
| 3531 | .count = AES_LRW_ENC_TEST_VECTORS | ||
| 3532 | }, | ||
| 3533 | .dec = { | ||
| 3534 | .vecs = aes_lrw_dec_tv_template, | ||
| 3535 | .count = AES_LRW_DEC_TEST_VECTORS | ||
| 3536 | } | ||
| 3537 | } | 3109 | } |
| 3538 | } | 3110 | } |
| 3539 | }, { | 3111 | }, { |
| @@ -3541,14 +3113,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3541 | .test = alg_test_skcipher, | 3113 | .test = alg_test_skcipher, |
| 3542 | .suite = { | 3114 | .suite = { |
| 3543 | .cipher = { | 3115 | .cipher = { |
| 3544 | .enc = { | 3116 | .enc = __VECS(camellia_lrw_enc_tv_template), |
| 3545 | .vecs = camellia_lrw_enc_tv_template, | 3117 | .dec = __VECS(camellia_lrw_dec_tv_template) |
| 3546 | .count = CAMELLIA_LRW_ENC_TEST_VECTORS | ||
| 3547 | }, | ||
| 3548 | .dec = { | ||
| 3549 | .vecs = camellia_lrw_dec_tv_template, | ||
| 3550 | .count = CAMELLIA_LRW_DEC_TEST_VECTORS | ||
| 3551 | } | ||
| 3552 | } | 3118 | } |
| 3553 | } | 3119 | } |
| 3554 | }, { | 3120 | }, { |
| @@ -3556,14 +3122,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3556 | .test = alg_test_skcipher, | 3122 | .test = alg_test_skcipher, |
| 3557 | .suite = { | 3123 | .suite = { |
| 3558 | .cipher = { | 3124 | .cipher = { |
| 3559 | .enc = { | 3125 | .enc = __VECS(cast6_lrw_enc_tv_template), |
| 3560 | .vecs = cast6_lrw_enc_tv_template, | 3126 | .dec = __VECS(cast6_lrw_dec_tv_template) |
| 3561 | .count = CAST6_LRW_ENC_TEST_VECTORS | ||
| 3562 | }, | ||
| 3563 | .dec = { | ||
| 3564 | .vecs = cast6_lrw_dec_tv_template, | ||
| 3565 | .count = CAST6_LRW_DEC_TEST_VECTORS | ||
| 3566 | } | ||
| 3567 | } | 3127 | } |
| 3568 | } | 3128 | } |
| 3569 | }, { | 3129 | }, { |
| @@ -3571,14 +3131,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3571 | .test = alg_test_skcipher, | 3131 | .test = alg_test_skcipher, |
| 3572 | .suite = { | 3132 | .suite = { |
| 3573 | .cipher = { | 3133 | .cipher = { |
| 3574 | .enc = { | 3134 | .enc = __VECS(serpent_lrw_enc_tv_template), |
| 3575 | .vecs = serpent_lrw_enc_tv_template, | 3135 | .dec = __VECS(serpent_lrw_dec_tv_template) |
| 3576 | .count = SERPENT_LRW_ENC_TEST_VECTORS | ||
| 3577 | }, | ||
| 3578 | .dec = { | ||
| 3579 | .vecs = serpent_lrw_dec_tv_template, | ||
| 3580 | .count = SERPENT_LRW_DEC_TEST_VECTORS | ||
| 3581 | } | ||
| 3582 | } | 3136 | } |
| 3583 | } | 3137 | } |
| 3584 | }, { | 3138 | }, { |
| @@ -3586,14 +3140,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3586 | .test = alg_test_skcipher, | 3140 | .test = alg_test_skcipher, |
| 3587 | .suite = { | 3141 | .suite = { |
| 3588 | .cipher = { | 3142 | .cipher = { |
| 3589 | .enc = { | 3143 | .enc = __VECS(tf_lrw_enc_tv_template), |
| 3590 | .vecs = tf_lrw_enc_tv_template, | 3144 | .dec = __VECS(tf_lrw_dec_tv_template) |
| 3591 | .count = TF_LRW_ENC_TEST_VECTORS | ||
| 3592 | }, | ||
| 3593 | .dec = { | ||
| 3594 | .vecs = tf_lrw_dec_tv_template, | ||
| 3595 | .count = TF_LRW_DEC_TEST_VECTORS | ||
| 3596 | } | ||
| 3597 | } | 3145 | } |
| 3598 | } | 3146 | } |
| 3599 | }, { | 3147 | }, { |
| @@ -3602,14 +3150,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3602 | .fips_allowed = 1, | 3150 | .fips_allowed = 1, |
| 3603 | .suite = { | 3151 | .suite = { |
| 3604 | .comp = { | 3152 | .comp = { |
| 3605 | .comp = { | 3153 | .comp = __VECS(lz4_comp_tv_template), |
| 3606 | .vecs = lz4_comp_tv_template, | 3154 | .decomp = __VECS(lz4_decomp_tv_template) |
| 3607 | .count = LZ4_COMP_TEST_VECTORS | ||
| 3608 | }, | ||
| 3609 | .decomp = { | ||
| 3610 | .vecs = lz4_decomp_tv_template, | ||
| 3611 | .count = LZ4_DECOMP_TEST_VECTORS | ||
| 3612 | } | ||
| 3613 | } | 3155 | } |
| 3614 | } | 3156 | } |
| 3615 | }, { | 3157 | }, { |
| @@ -3618,14 +3160,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3618 | .fips_allowed = 1, | 3160 | .fips_allowed = 1, |
| 3619 | .suite = { | 3161 | .suite = { |
| 3620 | .comp = { | 3162 | .comp = { |
| 3621 | .comp = { | 3163 | .comp = __VECS(lz4hc_comp_tv_template), |
| 3622 | .vecs = lz4hc_comp_tv_template, | 3164 | .decomp = __VECS(lz4hc_decomp_tv_template) |
| 3623 | .count = LZ4HC_COMP_TEST_VECTORS | ||
| 3624 | }, | ||
| 3625 | .decomp = { | ||
| 3626 | .vecs = lz4hc_decomp_tv_template, | ||
| 3627 | .count = LZ4HC_DECOMP_TEST_VECTORS | ||
| 3628 | } | ||
| 3629 | } | 3165 | } |
| 3630 | } | 3166 | } |
| 3631 | }, { | 3167 | }, { |
| @@ -3634,42 +3170,27 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3634 | .fips_allowed = 1, | 3170 | .fips_allowed = 1, |
| 3635 | .suite = { | 3171 | .suite = { |
| 3636 | .comp = { | 3172 | .comp = { |
| 3637 | .comp = { | 3173 | .comp = __VECS(lzo_comp_tv_template), |
| 3638 | .vecs = lzo_comp_tv_template, | 3174 | .decomp = __VECS(lzo_decomp_tv_template) |
| 3639 | .count = LZO_COMP_TEST_VECTORS | ||
| 3640 | }, | ||
| 3641 | .decomp = { | ||
| 3642 | .vecs = lzo_decomp_tv_template, | ||
| 3643 | .count = LZO_DECOMP_TEST_VECTORS | ||
| 3644 | } | ||
| 3645 | } | 3175 | } |
| 3646 | } | 3176 | } |
| 3647 | }, { | 3177 | }, { |
| 3648 | .alg = "md4", | 3178 | .alg = "md4", |
| 3649 | .test = alg_test_hash, | 3179 | .test = alg_test_hash, |
| 3650 | .suite = { | 3180 | .suite = { |
| 3651 | .hash = { | 3181 | .hash = __VECS(md4_tv_template) |
| 3652 | .vecs = md4_tv_template, | ||
| 3653 | .count = MD4_TEST_VECTORS | ||
| 3654 | } | ||
| 3655 | } | 3182 | } |
| 3656 | }, { | 3183 | }, { |
| 3657 | .alg = "md5", | 3184 | .alg = "md5", |
| 3658 | .test = alg_test_hash, | 3185 | .test = alg_test_hash, |
| 3659 | .suite = { | 3186 | .suite = { |
| 3660 | .hash = { | 3187 | .hash = __VECS(md5_tv_template) |
| 3661 | .vecs = md5_tv_template, | ||
| 3662 | .count = MD5_TEST_VECTORS | ||
| 3663 | } | ||
| 3664 | } | 3188 | } |
| 3665 | }, { | 3189 | }, { |
| 3666 | .alg = "michael_mic", | 3190 | .alg = "michael_mic", |
| 3667 | .test = alg_test_hash, | 3191 | .test = alg_test_hash, |
| 3668 | .suite = { | 3192 | .suite = { |
| 3669 | .hash = { | 3193 | .hash = __VECS(michael_mic_tv_template) |
| 3670 | .vecs = michael_mic_tv_template, | ||
| 3671 | .count = MICHAEL_MIC_TEST_VECTORS | ||
| 3672 | } | ||
| 3673 | } | 3194 | } |
| 3674 | }, { | 3195 | }, { |
| 3675 | .alg = "ofb(aes)", | 3196 | .alg = "ofb(aes)", |
| @@ -3677,14 +3198,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3677 | .fips_allowed = 1, | 3198 | .fips_allowed = 1, |
| 3678 | .suite = { | 3199 | .suite = { |
| 3679 | .cipher = { | 3200 | .cipher = { |
| 3680 | .enc = { | 3201 | .enc = __VECS(aes_ofb_enc_tv_template), |
| 3681 | .vecs = aes_ofb_enc_tv_template, | 3202 | .dec = __VECS(aes_ofb_dec_tv_template) |
| 3682 | .count = AES_OFB_ENC_TEST_VECTORS | ||
| 3683 | }, | ||
| 3684 | .dec = { | ||
| 3685 | .vecs = aes_ofb_dec_tv_template, | ||
| 3686 | .count = AES_OFB_DEC_TEST_VECTORS | ||
| 3687 | } | ||
| 3688 | } | 3203 | } |
| 3689 | } | 3204 | } |
| 3690 | }, { | 3205 | }, { |
| @@ -3692,24 +3207,15 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3692 | .test = alg_test_skcipher, | 3207 | .test = alg_test_skcipher, |
| 3693 | .suite = { | 3208 | .suite = { |
| 3694 | .cipher = { | 3209 | .cipher = { |
| 3695 | .enc = { | 3210 | .enc = __VECS(fcrypt_pcbc_enc_tv_template), |
| 3696 | .vecs = fcrypt_pcbc_enc_tv_template, | 3211 | .dec = __VECS(fcrypt_pcbc_dec_tv_template) |
| 3697 | .count = FCRYPT_ENC_TEST_VECTORS | ||
| 3698 | }, | ||
| 3699 | .dec = { | ||
| 3700 | .vecs = fcrypt_pcbc_dec_tv_template, | ||
| 3701 | .count = FCRYPT_DEC_TEST_VECTORS | ||
| 3702 | } | ||
| 3703 | } | 3212 | } |
| 3704 | } | 3213 | } |
| 3705 | }, { | 3214 | }, { |
| 3706 | .alg = "poly1305", | 3215 | .alg = "poly1305", |
| 3707 | .test = alg_test_hash, | 3216 | .test = alg_test_hash, |
| 3708 | .suite = { | 3217 | .suite = { |
| 3709 | .hash = { | 3218 | .hash = __VECS(poly1305_tv_template) |
| 3710 | .vecs = poly1305_tv_template, | ||
| 3711 | .count = POLY1305_TEST_VECTORS | ||
| 3712 | } | ||
| 3713 | } | 3219 | } |
| 3714 | }, { | 3220 | }, { |
| 3715 | .alg = "rfc3686(ctr(aes))", | 3221 | .alg = "rfc3686(ctr(aes))", |
| @@ -3717,14 +3223,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3717 | .fips_allowed = 1, | 3223 | .fips_allowed = 1, |
| 3718 | .suite = { | 3224 | .suite = { |
| 3719 | .cipher = { | 3225 | .cipher = { |
| 3720 | .enc = { | 3226 | .enc = __VECS(aes_ctr_rfc3686_enc_tv_template), |
| 3721 | .vecs = aes_ctr_rfc3686_enc_tv_template, | 3227 | .dec = __VECS(aes_ctr_rfc3686_dec_tv_template) |
| 3722 | .count = AES_CTR_3686_ENC_TEST_VECTORS | ||
| 3723 | }, | ||
| 3724 | .dec = { | ||
| 3725 | .vecs = aes_ctr_rfc3686_dec_tv_template, | ||
| 3726 | .count = AES_CTR_3686_DEC_TEST_VECTORS | ||
| 3727 | } | ||
| 3728 | } | 3228 | } |
| 3729 | } | 3229 | } |
| 3730 | }, { | 3230 | }, { |
| @@ -3733,14 +3233,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3733 | .fips_allowed = 1, | 3233 | .fips_allowed = 1, |
| 3734 | .suite = { | 3234 | .suite = { |
| 3735 | .aead = { | 3235 | .aead = { |
| 3736 | .enc = { | 3236 | .enc = __VECS(aes_gcm_rfc4106_enc_tv_template), |
| 3737 | .vecs = aes_gcm_rfc4106_enc_tv_template, | 3237 | .dec = __VECS(aes_gcm_rfc4106_dec_tv_template) |
| 3738 | .count = AES_GCM_4106_ENC_TEST_VECTORS | ||
| 3739 | }, | ||
| 3740 | .dec = { | ||
| 3741 | .vecs = aes_gcm_rfc4106_dec_tv_template, | ||
| 3742 | .count = AES_GCM_4106_DEC_TEST_VECTORS | ||
| 3743 | } | ||
| 3744 | } | 3238 | } |
| 3745 | } | 3239 | } |
| 3746 | }, { | 3240 | }, { |
| @@ -3749,14 +3243,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3749 | .fips_allowed = 1, | 3243 | .fips_allowed = 1, |
| 3750 | .suite = { | 3244 | .suite = { |
| 3751 | .aead = { | 3245 | .aead = { |
| 3752 | .enc = { | 3246 | .enc = __VECS(aes_ccm_rfc4309_enc_tv_template), |
| 3753 | .vecs = aes_ccm_rfc4309_enc_tv_template, | 3247 | .dec = __VECS(aes_ccm_rfc4309_dec_tv_template) |
| 3754 | .count = AES_CCM_4309_ENC_TEST_VECTORS | ||
| 3755 | }, | ||
| 3756 | .dec = { | ||
| 3757 | .vecs = aes_ccm_rfc4309_dec_tv_template, | ||
| 3758 | .count = AES_CCM_4309_DEC_TEST_VECTORS | ||
| 3759 | } | ||
| 3760 | } | 3248 | } |
| 3761 | } | 3249 | } |
| 3762 | }, { | 3250 | }, { |
| @@ -3764,14 +3252,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3764 | .test = alg_test_aead, | 3252 | .test = alg_test_aead, |
| 3765 | .suite = { | 3253 | .suite = { |
| 3766 | .aead = { | 3254 | .aead = { |
| 3767 | .enc = { | 3255 | .enc = __VECS(aes_gcm_rfc4543_enc_tv_template), |
| 3768 | .vecs = aes_gcm_rfc4543_enc_tv_template, | 3256 | .dec = __VECS(aes_gcm_rfc4543_dec_tv_template), |
| 3769 | .count = AES_GCM_4543_ENC_TEST_VECTORS | ||
| 3770 | }, | ||
| 3771 | .dec = { | ||
| 3772 | .vecs = aes_gcm_rfc4543_dec_tv_template, | ||
| 3773 | .count = AES_GCM_4543_DEC_TEST_VECTORS | ||
| 3774 | }, | ||
| 3775 | } | 3257 | } |
| 3776 | } | 3258 | } |
| 3777 | }, { | 3259 | }, { |
| @@ -3779,14 +3261,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3779 | .test = alg_test_aead, | 3261 | .test = alg_test_aead, |
| 3780 | .suite = { | 3262 | .suite = { |
| 3781 | .aead = { | 3263 | .aead = { |
| 3782 | .enc = { | 3264 | .enc = __VECS(rfc7539_enc_tv_template), |
| 3783 | .vecs = rfc7539_enc_tv_template, | 3265 | .dec = __VECS(rfc7539_dec_tv_template), |
| 3784 | .count = RFC7539_ENC_TEST_VECTORS | ||
| 3785 | }, | ||
| 3786 | .dec = { | ||
| 3787 | .vecs = rfc7539_dec_tv_template, | ||
| 3788 | .count = RFC7539_DEC_TEST_VECTORS | ||
| 3789 | }, | ||
| 3790 | } | 3266 | } |
| 3791 | } | 3267 | } |
| 3792 | }, { | 3268 | }, { |
| @@ -3794,71 +3270,47 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3794 | .test = alg_test_aead, | 3270 | .test = alg_test_aead, |
| 3795 | .suite = { | 3271 | .suite = { |
| 3796 | .aead = { | 3272 | .aead = { |
| 3797 | .enc = { | 3273 | .enc = __VECS(rfc7539esp_enc_tv_template), |
| 3798 | .vecs = rfc7539esp_enc_tv_template, | 3274 | .dec = __VECS(rfc7539esp_dec_tv_template), |
| 3799 | .count = RFC7539ESP_ENC_TEST_VECTORS | ||
| 3800 | }, | ||
| 3801 | .dec = { | ||
| 3802 | .vecs = rfc7539esp_dec_tv_template, | ||
| 3803 | .count = RFC7539ESP_DEC_TEST_VECTORS | ||
| 3804 | }, | ||
| 3805 | } | 3275 | } |
| 3806 | } | 3276 | } |
| 3807 | }, { | 3277 | }, { |
| 3808 | .alg = "rmd128", | 3278 | .alg = "rmd128", |
| 3809 | .test = alg_test_hash, | 3279 | .test = alg_test_hash, |
| 3810 | .suite = { | 3280 | .suite = { |
| 3811 | .hash = { | 3281 | .hash = __VECS(rmd128_tv_template) |
| 3812 | .vecs = rmd128_tv_template, | ||
| 3813 | .count = RMD128_TEST_VECTORS | ||
| 3814 | } | ||
| 3815 | } | 3282 | } |
| 3816 | }, { | 3283 | }, { |
| 3817 | .alg = "rmd160", | 3284 | .alg = "rmd160", |
| 3818 | .test = alg_test_hash, | 3285 | .test = alg_test_hash, |
| 3819 | .suite = { | 3286 | .suite = { |
| 3820 | .hash = { | 3287 | .hash = __VECS(rmd160_tv_template) |
| 3821 | .vecs = rmd160_tv_template, | ||
| 3822 | .count = RMD160_TEST_VECTORS | ||
| 3823 | } | ||
| 3824 | } | 3288 | } |
| 3825 | }, { | 3289 | }, { |
| 3826 | .alg = "rmd256", | 3290 | .alg = "rmd256", |
| 3827 | .test = alg_test_hash, | 3291 | .test = alg_test_hash, |
| 3828 | .suite = { | 3292 | .suite = { |
| 3829 | .hash = { | 3293 | .hash = __VECS(rmd256_tv_template) |
| 3830 | .vecs = rmd256_tv_template, | ||
| 3831 | .count = RMD256_TEST_VECTORS | ||
| 3832 | } | ||
| 3833 | } | 3294 | } |
| 3834 | }, { | 3295 | }, { |
| 3835 | .alg = "rmd320", | 3296 | .alg = "rmd320", |
| 3836 | .test = alg_test_hash, | 3297 | .test = alg_test_hash, |
| 3837 | .suite = { | 3298 | .suite = { |
| 3838 | .hash = { | 3299 | .hash = __VECS(rmd320_tv_template) |
| 3839 | .vecs = rmd320_tv_template, | ||
| 3840 | .count = RMD320_TEST_VECTORS | ||
| 3841 | } | ||
| 3842 | } | 3300 | } |
| 3843 | }, { | 3301 | }, { |
| 3844 | .alg = "rsa", | 3302 | .alg = "rsa", |
| 3845 | .test = alg_test_akcipher, | 3303 | .test = alg_test_akcipher, |
| 3846 | .fips_allowed = 1, | 3304 | .fips_allowed = 1, |
| 3847 | .suite = { | 3305 | .suite = { |
| 3848 | .akcipher = { | 3306 | .akcipher = __VECS(rsa_tv_template) |
| 3849 | .vecs = rsa_tv_template, | ||
| 3850 | .count = RSA_TEST_VECTORS | ||
| 3851 | } | ||
| 3852 | } | 3307 | } |
| 3853 | }, { | 3308 | }, { |
| 3854 | .alg = "salsa20", | 3309 | .alg = "salsa20", |
| 3855 | .test = alg_test_skcipher, | 3310 | .test = alg_test_skcipher, |
| 3856 | .suite = { | 3311 | .suite = { |
| 3857 | .cipher = { | 3312 | .cipher = { |
| 3858 | .enc = { | 3313 | .enc = __VECS(salsa20_stream_enc_tv_template) |
| 3859 | .vecs = salsa20_stream_enc_tv_template, | ||
| 3860 | .count = SALSA20_STREAM_ENC_TEST_VECTORS | ||
| 3861 | } | ||
| 3862 | } | 3314 | } |
| 3863 | } | 3315 | } |
| 3864 | }, { | 3316 | }, { |
| @@ -3866,162 +3318,111 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 3866 | .test = alg_test_hash, | 3318 | .test = alg_test_hash, |
| 3867 | .fips_allowed = 1, | 3319 | .fips_allowed = 1, |
| 3868 | .suite = { | 3320 | .suite = { |
| 3869 | .hash = { | 3321 | .hash = __VECS(sha1_tv_template) |
| 3870 | .vecs = sha1_tv_template, | ||
| 3871 | .count = SHA1_TEST_VECTORS | ||
| 3872 | } | ||
| 3873 | } | 3322 | } |
| 3874 | }, { | 3323 | }, { |
| 3875 | .alg = "sha224", | 3324 | .alg = "sha224", |
| 3876 | .test = alg_test_hash, | 3325 | .test = alg_test_hash, |
| 3877 | .fips_allowed = 1, | 3326 | .fips_allowed = 1, |
| 3878 | .suite = { | 3327 | .suite = { |
| 3879 | .hash = { | 3328 | .hash = __VECS(sha224_tv_template) |
| 3880 | .vecs = sha224_tv_template, | ||
| 3881 | .count = SHA224_TEST_VECTORS | ||
| 3882 | } | ||
| 3883 | } | 3329 | } |
| 3884 | }, { | 3330 | }, { |
| 3885 | .alg = "sha256", | 3331 | .alg = "sha256", |
| 3886 | .test = alg_test_hash, | 3332 | .test = alg_test_hash, |
| 3887 | .fips_allowed = 1, | 3333 | .fips_allowed = 1, |
| 3888 | .suite = { | 3334 | .suite = { |
| 3889 | .hash = { | 3335 | .hash = __VECS(sha256_tv_template) |
| 3890 | .vecs = sha256_tv_template, | ||
| 3891 | .count = SHA256_TEST_VECTORS | ||
| 3892 | } | ||
| 3893 | } | 3336 | } |
| 3894 | }, { | 3337 | }, { |
| 3895 | .alg = "sha3-224", | 3338 | .alg = "sha3-224", |
| 3896 | .test = alg_test_hash, | 3339 | .test = alg_test_hash, |
| 3897 | .fips_allowed = 1, | 3340 | .fips_allowed = 1, |
| 3898 | .suite = { | 3341 | .suite = { |
| 3899 | .hash = { | 3342 | .hash = __VECS(sha3_224_tv_template) |
| 3900 | .vecs = sha3_224_tv_template, | ||
| 3901 | .count = SHA3_224_TEST_VECTORS | ||
| 3902 | } | ||
| 3903 | } | 3343 | } |
| 3904 | }, { | 3344 | }, { |
| 3905 | .alg = "sha3-256", | 3345 | .alg = "sha3-256", |
| 3906 | .test = alg_test_hash, | 3346 | .test = alg_test_hash, |
| 3907 | .fips_allowed = 1, | 3347 | .fips_allowed = 1, |
| 3908 | .suite = { | 3348 | .suite = { |
| 3909 | .hash = { | 3349 | .hash = __VECS(sha3_256_tv_template) |
| 3910 | .vecs = sha3_256_tv_template, | ||
| 3911 | .count = SHA3_256_TEST_VECTORS | ||
| 3912 | } | ||
| 3913 | } | 3350 | } |
| 3914 | }, { | 3351 | }, { |
| 3915 | .alg = "sha3-384", | 3352 | .alg = "sha3-384", |
| 3916 | .test = alg_test_hash, | 3353 | .test = alg_test_hash, |
| 3917 | .fips_allowed = 1, | 3354 | .fips_allowed = 1, |
| 3918 | .suite = { | 3355 | .suite = { |
| 3919 | .hash = { | 3356 | .hash = __VECS(sha3_384_tv_template) |
| 3920 | .vecs = sha3_384_tv_template, | ||
| 3921 | .count = SHA3_384_TEST_VECTORS | ||
| 3922 | } | ||
| 3923 | } | 3357 | } |
| 3924 | }, { | 3358 | }, { |
| 3925 | .alg = "sha3-512", | 3359 | .alg = "sha3-512", |
| 3926 | .test = alg_test_hash, | 3360 | .test = alg_test_hash, |
| 3927 | .fips_allowed = 1, | 3361 | .fips_allowed = 1, |
| 3928 | .suite = { | 3362 | .suite = { |
| 3929 | .hash = { | 3363 | .hash = __VECS(sha3_512_tv_template) |
| 3930 | .vecs = sha3_512_tv_template, | ||
| 3931 | .count = SHA3_512_TEST_VECTORS | ||
| 3932 | } | ||
| 3933 | } | 3364 | } |
| 3934 | }, { | 3365 | }, { |
| 3935 | .alg = "sha384", | 3366 | .alg = "sha384", |
| 3936 | .test = alg_test_hash, | 3367 | .test = alg_test_hash, |
| 3937 | .fips_allowed = 1, | 3368 | .fips_allowed = 1, |
| 3938 | .suite = { | 3369 | .suite = { |
| 3939 | .hash = { | 3370 | .hash = __VECS(sha384_tv_template) |
| 3940 | .vecs = sha384_tv_template, | ||
| 3941 | .count = SHA384_TEST_VECTORS | ||
| 3942 | } | ||
| 3943 | } | 3371 | } |
| 3944 | }, { | 3372 | }, { |
| 3945 | .alg = "sha512", | 3373 | .alg = "sha512", |
| 3946 | .test = alg_test_hash, | 3374 | .test = alg_test_hash, |
| 3947 | .fips_allowed = 1, | 3375 | .fips_allowed = 1, |
| 3948 | .suite = { | 3376 | .suite = { |
| 3949 | .hash = { | 3377 | .hash = __VECS(sha512_tv_template) |
| 3950 | .vecs = sha512_tv_template, | ||
| 3951 | .count = SHA512_TEST_VECTORS | ||
| 3952 | } | ||
| 3953 | } | 3378 | } |
| 3954 | }, { | 3379 | }, { |
| 3955 | .alg = "tgr128", | 3380 | .alg = "tgr128", |
| 3956 | .test = alg_test_hash, | 3381 | .test = alg_test_hash, |
| 3957 | .suite = { | 3382 | .suite = { |
| 3958 | .hash = { | 3383 | .hash = __VECS(tgr128_tv_template) |
| 3959 | .vecs = tgr128_tv_template, | ||
| 3960 | .count = TGR128_TEST_VECTORS | ||
| 3961 | } | ||
| 3962 | } | 3384 | } |
| 3963 | }, { | 3385 | }, { |
| 3964 | .alg = "tgr160", | 3386 | .alg = "tgr160", |
| 3965 | .test = alg_test_hash, | 3387 | .test = alg_test_hash, |
| 3966 | .suite = { | 3388 | .suite = { |
| 3967 | .hash = { | 3389 | .hash = __VECS(tgr160_tv_template) |
| 3968 | .vecs = tgr160_tv_template, | ||
| 3969 | .count = TGR160_TEST_VECTORS | ||
| 3970 | } | ||
| 3971 | } | 3390 | } |
| 3972 | }, { | 3391 | }, { |
| 3973 | .alg = "tgr192", | 3392 | .alg = "tgr192", |
| 3974 | .test = alg_test_hash, | 3393 | .test = alg_test_hash, |
| 3975 | .suite = { | 3394 | .suite = { |
| 3976 | .hash = { | 3395 | .hash = __VECS(tgr192_tv_template) |
| 3977 | .vecs = tgr192_tv_template, | ||
| 3978 | .count = TGR192_TEST_VECTORS | ||
| 3979 | } | ||
| 3980 | } | 3396 | } |
| 3981 | }, { | 3397 | }, { |
| 3982 | .alg = "vmac(aes)", | 3398 | .alg = "vmac(aes)", |
| 3983 | .test = alg_test_hash, | 3399 | .test = alg_test_hash, |
| 3984 | .suite = { | 3400 | .suite = { |
| 3985 | .hash = { | 3401 | .hash = __VECS(aes_vmac128_tv_template) |
| 3986 | .vecs = aes_vmac128_tv_template, | ||
| 3987 | .count = VMAC_AES_TEST_VECTORS | ||
| 3988 | } | ||
| 3989 | } | 3402 | } |
| 3990 | }, { | 3403 | }, { |
| 3991 | .alg = "wp256", | 3404 | .alg = "wp256", |
| 3992 | .test = alg_test_hash, | 3405 | .test = alg_test_hash, |
| 3993 | .suite = { | 3406 | .suite = { |
| 3994 | .hash = { | 3407 | .hash = __VECS(wp256_tv_template) |
| 3995 | .vecs = wp256_tv_template, | ||
| 3996 | .count = WP256_TEST_VECTORS | ||
| 3997 | } | ||
| 3998 | } | 3408 | } |
| 3999 | }, { | 3409 | }, { |
| 4000 | .alg = "wp384", | 3410 | .alg = "wp384", |
| 4001 | .test = alg_test_hash, | 3411 | .test = alg_test_hash, |
| 4002 | .suite = { | 3412 | .suite = { |
| 4003 | .hash = { | 3413 | .hash = __VECS(wp384_tv_template) |
| 4004 | .vecs = wp384_tv_template, | ||
| 4005 | .count = WP384_TEST_VECTORS | ||
| 4006 | } | ||
| 4007 | } | 3414 | } |
| 4008 | }, { | 3415 | }, { |
| 4009 | .alg = "wp512", | 3416 | .alg = "wp512", |
| 4010 | .test = alg_test_hash, | 3417 | .test = alg_test_hash, |
| 4011 | .suite = { | 3418 | .suite = { |
| 4012 | .hash = { | 3419 | .hash = __VECS(wp512_tv_template) |
| 4013 | .vecs = wp512_tv_template, | ||
| 4014 | .count = WP512_TEST_VECTORS | ||
| 4015 | } | ||
| 4016 | } | 3420 | } |
| 4017 | }, { | 3421 | }, { |
| 4018 | .alg = "xcbc(aes)", | 3422 | .alg = "xcbc(aes)", |
| 4019 | .test = alg_test_hash, | 3423 | .test = alg_test_hash, |
| 4020 | .suite = { | 3424 | .suite = { |
| 4021 | .hash = { | 3425 | .hash = __VECS(aes_xcbc128_tv_template) |
| 4022 | .vecs = aes_xcbc128_tv_template, | ||
| 4023 | .count = XCBC_AES_TEST_VECTORS | ||
| 4024 | } | ||
| 4025 | } | 3426 | } |
| 4026 | }, { | 3427 | }, { |
| 4027 | .alg = "xts(aes)", | 3428 | .alg = "xts(aes)", |
| @@ -4029,14 +3430,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 4029 | .fips_allowed = 1, | 3430 | .fips_allowed = 1, |
| 4030 | .suite = { | 3431 | .suite = { |
| 4031 | .cipher = { | 3432 | .cipher = { |
| 4032 | .enc = { | 3433 | .enc = __VECS(aes_xts_enc_tv_template), |
| 4033 | .vecs = aes_xts_enc_tv_template, | 3434 | .dec = __VECS(aes_xts_dec_tv_template) |
| 4034 | .count = AES_XTS_ENC_TEST_VECTORS | ||
| 4035 | }, | ||
| 4036 | .dec = { | ||
| 4037 | .vecs = aes_xts_dec_tv_template, | ||
| 4038 | .count = AES_XTS_DEC_TEST_VECTORS | ||
| 4039 | } | ||
| 4040 | } | 3435 | } |
| 4041 | } | 3436 | } |
| 4042 | }, { | 3437 | }, { |
| @@ -4044,14 +3439,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 4044 | .test = alg_test_skcipher, | 3439 | .test = alg_test_skcipher, |
| 4045 | .suite = { | 3440 | .suite = { |
| 4046 | .cipher = { | 3441 | .cipher = { |
| 4047 | .enc = { | 3442 | .enc = __VECS(camellia_xts_enc_tv_template), |
| 4048 | .vecs = camellia_xts_enc_tv_template, | 3443 | .dec = __VECS(camellia_xts_dec_tv_template) |
| 4049 | .count = CAMELLIA_XTS_ENC_TEST_VECTORS | ||
| 4050 | }, | ||
| 4051 | .dec = { | ||
| 4052 | .vecs = camellia_xts_dec_tv_template, | ||
| 4053 | .count = CAMELLIA_XTS_DEC_TEST_VECTORS | ||
| 4054 | } | ||
| 4055 | } | 3444 | } |
| 4056 | } | 3445 | } |
| 4057 | }, { | 3446 | }, { |
| @@ -4059,14 +3448,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 4059 | .test = alg_test_skcipher, | 3448 | .test = alg_test_skcipher, |
| 4060 | .suite = { | 3449 | .suite = { |
| 4061 | .cipher = { | 3450 | .cipher = { |
| 4062 | .enc = { | 3451 | .enc = __VECS(cast6_xts_enc_tv_template), |
| 4063 | .vecs = cast6_xts_enc_tv_template, | 3452 | .dec = __VECS(cast6_xts_dec_tv_template) |
| 4064 | .count = CAST6_XTS_ENC_TEST_VECTORS | ||
| 4065 | }, | ||
| 4066 | .dec = { | ||
| 4067 | .vecs = cast6_xts_dec_tv_template, | ||
| 4068 | .count = CAST6_XTS_DEC_TEST_VECTORS | ||
| 4069 | } | ||
| 4070 | } | 3453 | } |
| 4071 | } | 3454 | } |
| 4072 | }, { | 3455 | }, { |
| @@ -4074,14 +3457,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 4074 | .test = alg_test_skcipher, | 3457 | .test = alg_test_skcipher, |
| 4075 | .suite = { | 3458 | .suite = { |
| 4076 | .cipher = { | 3459 | .cipher = { |
| 4077 | .enc = { | 3460 | .enc = __VECS(serpent_xts_enc_tv_template), |
| 4078 | .vecs = serpent_xts_enc_tv_template, | 3461 | .dec = __VECS(serpent_xts_dec_tv_template) |
| 4079 | .count = SERPENT_XTS_ENC_TEST_VECTORS | ||
| 4080 | }, | ||
| 4081 | .dec = { | ||
| 4082 | .vecs = serpent_xts_dec_tv_template, | ||
| 4083 | .count = SERPENT_XTS_DEC_TEST_VECTORS | ||
| 4084 | } | ||
| 4085 | } | 3462 | } |
| 4086 | } | 3463 | } |
| 4087 | }, { | 3464 | }, { |
| @@ -4089,14 +3466,8 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
| 4089 | .test = alg_test_skcipher, | 3466 | .test = alg_test_skcipher, |
| 4090 | .suite = { | 3467 | .suite = { |
| 4091 | .cipher = { | 3468 | .cipher = { |
| 4092 | .enc = { | 3469 | .enc = __VECS(tf_xts_enc_tv_template), |
| 4093 | .vecs = tf_xts_enc_tv_template, | 3470 | .dec = __VECS(tf_xts_dec_tv_template) |
| 4094 | .count = TF_XTS_ENC_TEST_VECTORS | ||
| 4095 | }, | ||
| 4096 | .dec = { | ||
| 4097 | .vecs = tf_xts_dec_tv_template, | ||
| 4098 | .count = TF_XTS_DEC_TEST_VECTORS | ||
| 4099 | } | ||
| 4100 | } | 3471 | } |
| 4101 | } | 3472 | } |
| 4102 | } | 3473 | } |
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 9b656be7f52f..64595f067d72 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
| @@ -151,11 +151,6 @@ static char zeroed_string[48]; | |||
| 151 | /* | 151 | /* |
| 152 | * RSA test vectors. Borrowed from openSSL. | 152 | * RSA test vectors. Borrowed from openSSL. |
| 153 | */ | 153 | */ |
| 154 | #ifdef CONFIG_CRYPTO_FIPS | ||
| 155 | #define RSA_TEST_VECTORS 2 | ||
| 156 | #else | ||
| 157 | #define RSA_TEST_VECTORS 5 | ||
| 158 | #endif | ||
| 159 | static struct akcipher_testvec rsa_tv_template[] = { | 154 | static struct akcipher_testvec rsa_tv_template[] = { |
| 160 | { | 155 | { |
| 161 | #ifndef CONFIG_CRYPTO_FIPS | 156 | #ifndef CONFIG_CRYPTO_FIPS |
| @@ -340,6 +335,7 @@ static struct akcipher_testvec rsa_tv_template[] = { | |||
| 340 | .m_size = 8, | 335 | .m_size = 8, |
| 341 | .c_size = 256, | 336 | .c_size = 256, |
| 342 | .public_key_vec = true, | 337 | .public_key_vec = true, |
| 338 | #ifndef CONFIG_CRYPTO_FIPS | ||
| 343 | }, { | 339 | }, { |
| 344 | .key = | 340 | .key = |
| 345 | "\x30\x82\x09\x29" /* sequence of 2345 bytes */ | 341 | "\x30\x82\x09\x29" /* sequence of 2345 bytes */ |
| @@ -538,11 +534,10 @@ static struct akcipher_testvec rsa_tv_template[] = { | |||
| 538 | .key_len = 2349, | 534 | .key_len = 2349, |
| 539 | .m_size = 8, | 535 | .m_size = 8, |
| 540 | .c_size = 512, | 536 | .c_size = 512, |
| 537 | #endif | ||
| 541 | } | 538 | } |
| 542 | }; | 539 | }; |
| 543 | 540 | ||
| 544 | #define DH_TEST_VECTORS 2 | ||
| 545 | |||
| 546 | struct kpp_testvec dh_tv_template[] = { | 541 | struct kpp_testvec dh_tv_template[] = { |
| 547 | { | 542 | { |
| 548 | .secret = | 543 | .secret = |
| @@ -760,11 +755,6 @@ struct kpp_testvec dh_tv_template[] = { | |||
| 760 | } | 755 | } |
| 761 | }; | 756 | }; |
| 762 | 757 | ||
| 763 | #ifdef CONFIG_CRYPTO_FIPS | ||
| 764 | #define ECDH_TEST_VECTORS 1 | ||
| 765 | #else | ||
| 766 | #define ECDH_TEST_VECTORS 2 | ||
| 767 | #endif | ||
| 768 | struct kpp_testvec ecdh_tv_template[] = { | 758 | struct kpp_testvec ecdh_tv_template[] = { |
| 769 | { | 759 | { |
| 770 | #ifndef CONFIG_CRYPTO_FIPS | 760 | #ifndef CONFIG_CRYPTO_FIPS |
| @@ -856,8 +846,6 @@ struct kpp_testvec ecdh_tv_template[] = { | |||
| 856 | /* | 846 | /* |
| 857 | * MD4 test vectors from RFC1320 | 847 | * MD4 test vectors from RFC1320 |
| 858 | */ | 848 | */ |
| 859 | #define MD4_TEST_VECTORS 7 | ||
| 860 | |||
| 861 | static struct hash_testvec md4_tv_template [] = { | 849 | static struct hash_testvec md4_tv_template [] = { |
| 862 | { | 850 | { |
| 863 | .plaintext = "", | 851 | .plaintext = "", |
| @@ -899,7 +887,6 @@ static struct hash_testvec md4_tv_template [] = { | |||
| 899 | }, | 887 | }, |
| 900 | }; | 888 | }; |
| 901 | 889 | ||
| 902 | #define SHA3_224_TEST_VECTORS 3 | ||
| 903 | static struct hash_testvec sha3_224_tv_template[] = { | 890 | static struct hash_testvec sha3_224_tv_template[] = { |
| 904 | { | 891 | { |
| 905 | .plaintext = "", | 892 | .plaintext = "", |
| @@ -925,7 +912,6 @@ static struct hash_testvec sha3_224_tv_template[] = { | |||
| 925 | }, | 912 | }, |
| 926 | }; | 913 | }; |
| 927 | 914 | ||
| 928 | #define SHA3_256_TEST_VECTORS 3 | ||
| 929 | static struct hash_testvec sha3_256_tv_template[] = { | 915 | static struct hash_testvec sha3_256_tv_template[] = { |
| 930 | { | 916 | { |
| 931 | .plaintext = "", | 917 | .plaintext = "", |
| @@ -952,7 +938,6 @@ static struct hash_testvec sha3_256_tv_template[] = { | |||
| 952 | }; | 938 | }; |
| 953 | 939 | ||
| 954 | 940 | ||
| 955 | #define SHA3_384_TEST_VECTORS 3 | ||
| 956 | static struct hash_testvec sha3_384_tv_template[] = { | 941 | static struct hash_testvec sha3_384_tv_template[] = { |
| 957 | { | 942 | { |
| 958 | .plaintext = "", | 943 | .plaintext = "", |
| @@ -985,7 +970,6 @@ static struct hash_testvec sha3_384_tv_template[] = { | |||
| 985 | }; | 970 | }; |
| 986 | 971 | ||
| 987 | 972 | ||
| 988 | #define SHA3_512_TEST_VECTORS 3 | ||
| 989 | static struct hash_testvec sha3_512_tv_template[] = { | 973 | static struct hash_testvec sha3_512_tv_template[] = { |
| 990 | { | 974 | { |
| 991 | .plaintext = "", | 975 | .plaintext = "", |
| @@ -1027,8 +1011,6 @@ static struct hash_testvec sha3_512_tv_template[] = { | |||
| 1027 | /* | 1011 | /* |
| 1028 | * MD5 test vectors from RFC1321 | 1012 | * MD5 test vectors from RFC1321 |
| 1029 | */ | 1013 | */ |
| 1030 | #define MD5_TEST_VECTORS 7 | ||
| 1031 | |||
| 1032 | static struct hash_testvec md5_tv_template[] = { | 1014 | static struct hash_testvec md5_tv_template[] = { |
| 1033 | { | 1015 | { |
| 1034 | .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04" | 1016 | .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04" |
| @@ -1073,8 +1055,6 @@ static struct hash_testvec md5_tv_template[] = { | |||
| 1073 | /* | 1055 | /* |
| 1074 | * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E) | 1056 | * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E) |
| 1075 | */ | 1057 | */ |
| 1076 | #define RMD128_TEST_VECTORS 10 | ||
| 1077 | |||
| 1078 | static struct hash_testvec rmd128_tv_template[] = { | 1058 | static struct hash_testvec rmd128_tv_template[] = { |
| 1079 | { | 1059 | { |
| 1080 | .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e" | 1060 | .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e" |
| @@ -1137,8 +1117,6 @@ static struct hash_testvec rmd128_tv_template[] = { | |||
| 1137 | /* | 1117 | /* |
| 1138 | * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E) | 1118 | * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E) |
| 1139 | */ | 1119 | */ |
| 1140 | #define RMD160_TEST_VECTORS 10 | ||
| 1141 | |||
| 1142 | static struct hash_testvec rmd160_tv_template[] = { | 1120 | static struct hash_testvec rmd160_tv_template[] = { |
| 1143 | { | 1121 | { |
| 1144 | .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" | 1122 | .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" |
| @@ -1201,8 +1179,6 @@ static struct hash_testvec rmd160_tv_template[] = { | |||
| 1201 | /* | 1179 | /* |
| 1202 | * RIPEMD-256 test vectors | 1180 | * RIPEMD-256 test vectors |
| 1203 | */ | 1181 | */ |
| 1204 | #define RMD256_TEST_VECTORS 8 | ||
| 1205 | |||
| 1206 | static struct hash_testvec rmd256_tv_template[] = { | 1182 | static struct hash_testvec rmd256_tv_template[] = { |
| 1207 | { | 1183 | { |
| 1208 | .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18" | 1184 | .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18" |
| @@ -1269,8 +1245,6 @@ static struct hash_testvec rmd256_tv_template[] = { | |||
| 1269 | /* | 1245 | /* |
| 1270 | * RIPEMD-320 test vectors | 1246 | * RIPEMD-320 test vectors |
| 1271 | */ | 1247 | */ |
| 1272 | #define RMD320_TEST_VECTORS 8 | ||
| 1273 | |||
| 1274 | static struct hash_testvec rmd320_tv_template[] = { | 1248 | static struct hash_testvec rmd320_tv_template[] = { |
| 1275 | { | 1249 | { |
| 1276 | .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1" | 1250 | .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1" |
| @@ -1334,7 +1308,6 @@ static struct hash_testvec rmd320_tv_template[] = { | |||
| 1334 | } | 1308 | } |
| 1335 | }; | 1309 | }; |
| 1336 | 1310 | ||
| 1337 | #define CRCT10DIF_TEST_VECTORS ARRAY_SIZE(crct10dif_tv_template) | ||
| 1338 | static struct hash_testvec crct10dif_tv_template[] = { | 1311 | static struct hash_testvec crct10dif_tv_template[] = { |
| 1339 | { | 1312 | { |
| 1340 | .plaintext = "abc", | 1313 | .plaintext = "abc", |
| @@ -1385,8 +1358,6 @@ static struct hash_testvec crct10dif_tv_template[] = { | |||
| 1385 | * SHA1 test vectors from from FIPS PUB 180-1 | 1358 | * SHA1 test vectors from from FIPS PUB 180-1 |
| 1386 | * Long vector from CAVS 5.0 | 1359 | * Long vector from CAVS 5.0 |
| 1387 | */ | 1360 | */ |
| 1388 | #define SHA1_TEST_VECTORS 6 | ||
| 1389 | |||
| 1390 | static struct hash_testvec sha1_tv_template[] = { | 1361 | static struct hash_testvec sha1_tv_template[] = { |
| 1391 | { | 1362 | { |
| 1392 | .plaintext = "", | 1363 | .plaintext = "", |
| @@ -1577,8 +1548,6 @@ static struct hash_testvec sha1_tv_template[] = { | |||
| 1577 | /* | 1548 | /* |
| 1578 | * SHA224 test vectors from from FIPS PUB 180-2 | 1549 | * SHA224 test vectors from from FIPS PUB 180-2 |
| 1579 | */ | 1550 | */ |
| 1580 | #define SHA224_TEST_VECTORS 5 | ||
| 1581 | |||
| 1582 | static struct hash_testvec sha224_tv_template[] = { | 1551 | static struct hash_testvec sha224_tv_template[] = { |
| 1583 | { | 1552 | { |
| 1584 | .plaintext = "", | 1553 | .plaintext = "", |
| @@ -1751,8 +1720,6 @@ static struct hash_testvec sha224_tv_template[] = { | |||
| 1751 | /* | 1720 | /* |
| 1752 | * SHA256 test vectors from from NIST | 1721 | * SHA256 test vectors from from NIST |
| 1753 | */ | 1722 | */ |
| 1754 | #define SHA256_TEST_VECTORS 5 | ||
| 1755 | |||
| 1756 | static struct hash_testvec sha256_tv_template[] = { | 1723 | static struct hash_testvec sha256_tv_template[] = { |
| 1757 | { | 1724 | { |
| 1758 | .plaintext = "", | 1725 | .plaintext = "", |
| @@ -1924,8 +1891,6 @@ static struct hash_testvec sha256_tv_template[] = { | |||
| 1924 | /* | 1891 | /* |
| 1925 | * SHA384 test vectors from from NIST and kerneli | 1892 | * SHA384 test vectors from from NIST and kerneli |
| 1926 | */ | 1893 | */ |
| 1927 | #define SHA384_TEST_VECTORS 6 | ||
| 1928 | |||
| 1929 | static struct hash_testvec sha384_tv_template[] = { | 1894 | static struct hash_testvec sha384_tv_template[] = { |
| 1930 | { | 1895 | { |
| 1931 | .plaintext = "", | 1896 | .plaintext = "", |
| @@ -2118,8 +2083,6 @@ static struct hash_testvec sha384_tv_template[] = { | |||
| 2118 | /* | 2083 | /* |
| 2119 | * SHA512 test vectors from from NIST and kerneli | 2084 | * SHA512 test vectors from from NIST and kerneli |
| 2120 | */ | 2085 | */ |
| 2121 | #define SHA512_TEST_VECTORS 6 | ||
| 2122 | |||
| 2123 | static struct hash_testvec sha512_tv_template[] = { | 2086 | static struct hash_testvec sha512_tv_template[] = { |
| 2124 | { | 2087 | { |
| 2125 | .plaintext = "", | 2088 | .plaintext = "", |
| @@ -2327,8 +2290,6 @@ static struct hash_testvec sha512_tv_template[] = { | |||
| 2327 | * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE | 2290 | * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE |
| 2328 | * submission | 2291 | * submission |
| 2329 | */ | 2292 | */ |
| 2330 | #define WP512_TEST_VECTORS 8 | ||
| 2331 | |||
| 2332 | static struct hash_testvec wp512_tv_template[] = { | 2293 | static struct hash_testvec wp512_tv_template[] = { |
| 2333 | { | 2294 | { |
| 2334 | .plaintext = "", | 2295 | .plaintext = "", |
| @@ -2425,8 +2386,6 @@ static struct hash_testvec wp512_tv_template[] = { | |||
| 2425 | }, | 2386 | }, |
| 2426 | }; | 2387 | }; |
| 2427 | 2388 | ||
| 2428 | #define WP384_TEST_VECTORS 8 | ||
| 2429 | |||
| 2430 | static struct hash_testvec wp384_tv_template[] = { | 2389 | static struct hash_testvec wp384_tv_template[] = { |
| 2431 | { | 2390 | { |
| 2432 | .plaintext = "", | 2391 | .plaintext = "", |
| @@ -2507,8 +2466,6 @@ static struct hash_testvec wp384_tv_template[] = { | |||
| 2507 | }, | 2466 | }, |
| 2508 | }; | 2467 | }; |
| 2509 | 2468 | ||
| 2510 | #define WP256_TEST_VECTORS 8 | ||
| 2511 | |||
| 2512 | static struct hash_testvec wp256_tv_template[] = { | 2469 | static struct hash_testvec wp256_tv_template[] = { |
| 2513 | { | 2470 | { |
| 2514 | .plaintext = "", | 2471 | .plaintext = "", |
| @@ -2576,8 +2533,6 @@ static struct hash_testvec wp256_tv_template[] = { | |||
| 2576 | /* | 2533 | /* |
| 2577 | * TIGER test vectors from Tiger website | 2534 | * TIGER test vectors from Tiger website |
| 2578 | */ | 2535 | */ |
| 2579 | #define TGR192_TEST_VECTORS 6 | ||
| 2580 | |||
| 2581 | static struct hash_testvec tgr192_tv_template[] = { | 2536 | static struct hash_testvec tgr192_tv_template[] = { |
| 2582 | { | 2537 | { |
| 2583 | .plaintext = "", | 2538 | .plaintext = "", |
| @@ -2621,8 +2576,6 @@ static struct hash_testvec tgr192_tv_template[] = { | |||
| 2621 | }, | 2576 | }, |
| 2622 | }; | 2577 | }; |
| 2623 | 2578 | ||
| 2624 | #define TGR160_TEST_VECTORS 6 | ||
| 2625 | |||
| 2626 | static struct hash_testvec tgr160_tv_template[] = { | 2579 | static struct hash_testvec tgr160_tv_template[] = { |
| 2627 | { | 2580 | { |
| 2628 | .plaintext = "", | 2581 | .plaintext = "", |
| @@ -2666,8 +2619,6 @@ static struct hash_testvec tgr160_tv_template[] = { | |||
| 2666 | }, | 2619 | }, |
| 2667 | }; | 2620 | }; |
| 2668 | 2621 | ||
| 2669 | #define TGR128_TEST_VECTORS 6 | ||
| 2670 | |||
| 2671 | static struct hash_testvec tgr128_tv_template[] = { | 2622 | static struct hash_testvec tgr128_tv_template[] = { |
| 2672 | { | 2623 | { |
| 2673 | .plaintext = "", | 2624 | .plaintext = "", |
| @@ -2705,8 +2656,6 @@ static struct hash_testvec tgr128_tv_template[] = { | |||
| 2705 | }, | 2656 | }, |
| 2706 | }; | 2657 | }; |
| 2707 | 2658 | ||
| 2708 | #define GHASH_TEST_VECTORS 6 | ||
| 2709 | |||
| 2710 | static struct hash_testvec ghash_tv_template[] = | 2659 | static struct hash_testvec ghash_tv_template[] = |
| 2711 | { | 2660 | { |
| 2712 | { | 2661 | { |
| @@ -2822,8 +2771,6 @@ static struct hash_testvec ghash_tv_template[] = | |||
| 2822 | * HMAC-MD5 test vectors from RFC2202 | 2771 | * HMAC-MD5 test vectors from RFC2202 |
| 2823 | * (These need to be fixed to not use strlen). | 2772 | * (These need to be fixed to not use strlen). |
| 2824 | */ | 2773 | */ |
| 2825 | #define HMAC_MD5_TEST_VECTORS 7 | ||
| 2826 | |||
| 2827 | static struct hash_testvec hmac_md5_tv_template[] = | 2774 | static struct hash_testvec hmac_md5_tv_template[] = |
| 2828 | { | 2775 | { |
| 2829 | { | 2776 | { |
| @@ -2904,8 +2851,6 @@ static struct hash_testvec hmac_md5_tv_template[] = | |||
| 2904 | /* | 2851 | /* |
| 2905 | * HMAC-RIPEMD128 test vectors from RFC2286 | 2852 | * HMAC-RIPEMD128 test vectors from RFC2286 |
| 2906 | */ | 2853 | */ |
| 2907 | #define HMAC_RMD128_TEST_VECTORS 7 | ||
| 2908 | |||
| 2909 | static struct hash_testvec hmac_rmd128_tv_template[] = { | 2854 | static struct hash_testvec hmac_rmd128_tv_template[] = { |
| 2910 | { | 2855 | { |
| 2911 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", | 2856 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", |
| @@ -2985,8 +2930,6 @@ static struct hash_testvec hmac_rmd128_tv_template[] = { | |||
| 2985 | /* | 2930 | /* |
| 2986 | * HMAC-RIPEMD160 test vectors from RFC2286 | 2931 | * HMAC-RIPEMD160 test vectors from RFC2286 |
| 2987 | */ | 2932 | */ |
| 2988 | #define HMAC_RMD160_TEST_VECTORS 7 | ||
| 2989 | |||
| 2990 | static struct hash_testvec hmac_rmd160_tv_template[] = { | 2933 | static struct hash_testvec hmac_rmd160_tv_template[] = { |
| 2991 | { | 2934 | { |
| 2992 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", | 2935 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", |
| @@ -3066,8 +3009,6 @@ static struct hash_testvec hmac_rmd160_tv_template[] = { | |||
| 3066 | /* | 3009 | /* |
| 3067 | * HMAC-SHA1 test vectors from RFC2202 | 3010 | * HMAC-SHA1 test vectors from RFC2202 |
| 3068 | */ | 3011 | */ |
| 3069 | #define HMAC_SHA1_TEST_VECTORS 7 | ||
| 3070 | |||
| 3071 | static struct hash_testvec hmac_sha1_tv_template[] = { | 3012 | static struct hash_testvec hmac_sha1_tv_template[] = { |
| 3072 | { | 3013 | { |
| 3073 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", | 3014 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", |
| @@ -3149,8 +3090,6 @@ static struct hash_testvec hmac_sha1_tv_template[] = { | |||
| 3149 | /* | 3090 | /* |
| 3150 | * SHA224 HMAC test vectors from RFC4231 | 3091 | * SHA224 HMAC test vectors from RFC4231 |
| 3151 | */ | 3092 | */ |
| 3152 | #define HMAC_SHA224_TEST_VECTORS 4 | ||
| 3153 | |||
| 3154 | static struct hash_testvec hmac_sha224_tv_template[] = { | 3093 | static struct hash_testvec hmac_sha224_tv_template[] = { |
| 3155 | { | 3094 | { |
| 3156 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 3095 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -3264,8 +3203,6 @@ static struct hash_testvec hmac_sha224_tv_template[] = { | |||
| 3264 | * HMAC-SHA256 test vectors from | 3203 | * HMAC-SHA256 test vectors from |
| 3265 | * draft-ietf-ipsec-ciph-sha-256-01.txt | 3204 | * draft-ietf-ipsec-ciph-sha-256-01.txt |
| 3266 | */ | 3205 | */ |
| 3267 | #define HMAC_SHA256_TEST_VECTORS 10 | ||
| 3268 | |||
| 3269 | static struct hash_testvec hmac_sha256_tv_template[] = { | 3206 | static struct hash_testvec hmac_sha256_tv_template[] = { |
| 3270 | { | 3207 | { |
| 3271 | .key = "\x01\x02\x03\x04\x05\x06\x07\x08" | 3208 | .key = "\x01\x02\x03\x04\x05\x06\x07\x08" |
| @@ -3401,8 +3338,6 @@ static struct hash_testvec hmac_sha256_tv_template[] = { | |||
| 3401 | }, | 3338 | }, |
| 3402 | }; | 3339 | }; |
| 3403 | 3340 | ||
| 3404 | #define CMAC_AES_TEST_VECTORS 6 | ||
| 3405 | |||
| 3406 | static struct hash_testvec aes_cmac128_tv_template[] = { | 3341 | static struct hash_testvec aes_cmac128_tv_template[] = { |
| 3407 | { /* From NIST Special Publication 800-38B, AES-128 */ | 3342 | { /* From NIST Special Publication 800-38B, AES-128 */ |
| 3408 | .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" | 3343 | .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" |
| @@ -3478,8 +3413,6 @@ static struct hash_testvec aes_cmac128_tv_template[] = { | |||
| 3478 | } | 3413 | } |
| 3479 | }; | 3414 | }; |
| 3480 | 3415 | ||
| 3481 | #define CMAC_DES3_EDE_TEST_VECTORS 4 | ||
| 3482 | |||
| 3483 | static struct hash_testvec des3_ede_cmac64_tv_template[] = { | 3416 | static struct hash_testvec des3_ede_cmac64_tv_template[] = { |
| 3484 | /* | 3417 | /* |
| 3485 | * From NIST Special Publication 800-38B, Three Key TDEA | 3418 | * From NIST Special Publication 800-38B, Three Key TDEA |
| @@ -3526,8 +3459,6 @@ static struct hash_testvec des3_ede_cmac64_tv_template[] = { | |||
| 3526 | } | 3459 | } |
| 3527 | }; | 3460 | }; |
| 3528 | 3461 | ||
| 3529 | #define XCBC_AES_TEST_VECTORS 6 | ||
| 3530 | |||
| 3531 | static struct hash_testvec aes_xcbc128_tv_template[] = { | 3462 | static struct hash_testvec aes_xcbc128_tv_template[] = { |
| 3532 | { | 3463 | { |
| 3533 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | 3464 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| @@ -3594,7 +3525,6 @@ static struct hash_testvec aes_xcbc128_tv_template[] = { | |||
| 3594 | } | 3525 | } |
| 3595 | }; | 3526 | }; |
| 3596 | 3527 | ||
| 3597 | #define VMAC_AES_TEST_VECTORS 11 | ||
| 3598 | static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01', | 3528 | static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01', |
| 3599 | '\x02', '\x03', '\x02', '\x02', | 3529 | '\x02', '\x03', '\x02', '\x02', |
| 3600 | '\x02', '\x04', '\x01', '\x07', | 3530 | '\x02', '\x04', '\x01', '\x07', |
| @@ -3701,8 +3631,6 @@ static struct hash_testvec aes_vmac128_tv_template[] = { | |||
| 3701 | * SHA384 HMAC test vectors from RFC4231 | 3631 | * SHA384 HMAC test vectors from RFC4231 |
| 3702 | */ | 3632 | */ |
| 3703 | 3633 | ||
| 3704 | #define HMAC_SHA384_TEST_VECTORS 4 | ||
| 3705 | |||
| 3706 | static struct hash_testvec hmac_sha384_tv_template[] = { | 3634 | static struct hash_testvec hmac_sha384_tv_template[] = { |
| 3707 | { | 3635 | { |
| 3708 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 3636 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -3801,8 +3729,6 @@ static struct hash_testvec hmac_sha384_tv_template[] = { | |||
| 3801 | * SHA512 HMAC test vectors from RFC4231 | 3729 | * SHA512 HMAC test vectors from RFC4231 |
| 3802 | */ | 3730 | */ |
| 3803 | 3731 | ||
| 3804 | #define HMAC_SHA512_TEST_VECTORS 4 | ||
| 3805 | |||
| 3806 | static struct hash_testvec hmac_sha512_tv_template[] = { | 3732 | static struct hash_testvec hmac_sha512_tv_template[] = { |
| 3807 | { | 3733 | { |
| 3808 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 3734 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -3908,8 +3834,6 @@ static struct hash_testvec hmac_sha512_tv_template[] = { | |||
| 3908 | }, | 3834 | }, |
| 3909 | }; | 3835 | }; |
| 3910 | 3836 | ||
| 3911 | #define HMAC_SHA3_224_TEST_VECTORS 4 | ||
| 3912 | |||
| 3913 | static struct hash_testvec hmac_sha3_224_tv_template[] = { | 3837 | static struct hash_testvec hmac_sha3_224_tv_template[] = { |
| 3914 | { | 3838 | { |
| 3915 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 3839 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -3999,8 +3923,6 @@ static struct hash_testvec hmac_sha3_224_tv_template[] = { | |||
| 3999 | }, | 3923 | }, |
| 4000 | }; | 3924 | }; |
| 4001 | 3925 | ||
| 4002 | #define HMAC_SHA3_256_TEST_VECTORS 4 | ||
| 4003 | |||
| 4004 | static struct hash_testvec hmac_sha3_256_tv_template[] = { | 3926 | static struct hash_testvec hmac_sha3_256_tv_template[] = { |
| 4005 | { | 3927 | { |
| 4006 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 3928 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -4090,8 +4012,6 @@ static struct hash_testvec hmac_sha3_256_tv_template[] = { | |||
| 4090 | }, | 4012 | }, |
| 4091 | }; | 4013 | }; |
| 4092 | 4014 | ||
| 4093 | #define HMAC_SHA3_384_TEST_VECTORS 4 | ||
| 4094 | |||
| 4095 | static struct hash_testvec hmac_sha3_384_tv_template[] = { | 4015 | static struct hash_testvec hmac_sha3_384_tv_template[] = { |
| 4096 | { | 4016 | { |
| 4097 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 4017 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -4189,8 +4109,6 @@ static struct hash_testvec hmac_sha3_384_tv_template[] = { | |||
| 4189 | }, | 4109 | }, |
| 4190 | }; | 4110 | }; |
| 4191 | 4111 | ||
| 4192 | #define HMAC_SHA3_512_TEST_VECTORS 4 | ||
| 4193 | |||
| 4194 | static struct hash_testvec hmac_sha3_512_tv_template[] = { | 4112 | static struct hash_testvec hmac_sha3_512_tv_template[] = { |
| 4195 | { | 4113 | { |
| 4196 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" | 4114 | .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" |
| @@ -4300,8 +4218,6 @@ static struct hash_testvec hmac_sha3_512_tv_template[] = { | |||
| 4300 | * Poly1305 test vectors from RFC7539 A.3. | 4218 | * Poly1305 test vectors from RFC7539 A.3. |
| 4301 | */ | 4219 | */ |
| 4302 | 4220 | ||
| 4303 | #define POLY1305_TEST_VECTORS 11 | ||
| 4304 | |||
| 4305 | static struct hash_testvec poly1305_tv_template[] = { | 4221 | static struct hash_testvec poly1305_tv_template[] = { |
| 4306 | { /* Test Vector #1 */ | 4222 | { /* Test Vector #1 */ |
| 4307 | .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00" | 4223 | .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00" |
| @@ -4547,19 +4463,6 @@ static struct hash_testvec poly1305_tv_template[] = { | |||
| 4547 | /* | 4463 | /* |
| 4548 | * DES test vectors. | 4464 | * DES test vectors. |
| 4549 | */ | 4465 | */ |
| 4550 | #define DES_ENC_TEST_VECTORS 11 | ||
| 4551 | #define DES_DEC_TEST_VECTORS 5 | ||
| 4552 | #define DES_CBC_ENC_TEST_VECTORS 6 | ||
| 4553 | #define DES_CBC_DEC_TEST_VECTORS 5 | ||
| 4554 | #define DES_CTR_ENC_TEST_VECTORS 2 | ||
| 4555 | #define DES_CTR_DEC_TEST_VECTORS 2 | ||
| 4556 | #define DES3_EDE_ENC_TEST_VECTORS 4 | ||
| 4557 | #define DES3_EDE_DEC_TEST_VECTORS 4 | ||
| 4558 | #define DES3_EDE_CBC_ENC_TEST_VECTORS 2 | ||
| 4559 | #define DES3_EDE_CBC_DEC_TEST_VECTORS 2 | ||
| 4560 | #define DES3_EDE_CTR_ENC_TEST_VECTORS 2 | ||
| 4561 | #define DES3_EDE_CTR_DEC_TEST_VECTORS 2 | ||
| 4562 | |||
| 4563 | static struct cipher_testvec des_enc_tv_template[] = { | 4466 | static struct cipher_testvec des_enc_tv_template[] = { |
| 4564 | { /* From Applied Cryptography */ | 4467 | { /* From Applied Cryptography */ |
| 4565 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", | 4468 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", |
| @@ -6620,13 +6523,6 @@ static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = { | |||
| 6620 | /* | 6523 | /* |
| 6621 | * Blowfish test vectors. | 6524 | * Blowfish test vectors. |
| 6622 | */ | 6525 | */ |
| 6623 | #define BF_ENC_TEST_VECTORS 7 | ||
| 6624 | #define BF_DEC_TEST_VECTORS 7 | ||
| 6625 | #define BF_CBC_ENC_TEST_VECTORS 2 | ||
| 6626 | #define BF_CBC_DEC_TEST_VECTORS 2 | ||
| 6627 | #define BF_CTR_ENC_TEST_VECTORS 2 | ||
| 6628 | #define BF_CTR_DEC_TEST_VECTORS 2 | ||
| 6629 | |||
| 6630 | static struct cipher_testvec bf_enc_tv_template[] = { | 6526 | static struct cipher_testvec bf_enc_tv_template[] = { |
| 6631 | { /* DES test vectors from OpenSSL */ | 6527 | { /* DES test vectors from OpenSSL */ |
| 6632 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00", | 6528 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00", |
| @@ -8152,17 +8048,6 @@ static struct cipher_testvec bf_ctr_dec_tv_template[] = { | |||
| 8152 | /* | 8048 | /* |
| 8153 | * Twofish test vectors. | 8049 | * Twofish test vectors. |
| 8154 | */ | 8050 | */ |
| 8155 | #define TF_ENC_TEST_VECTORS 4 | ||
| 8156 | #define TF_DEC_TEST_VECTORS 4 | ||
| 8157 | #define TF_CBC_ENC_TEST_VECTORS 5 | ||
| 8158 | #define TF_CBC_DEC_TEST_VECTORS 5 | ||
| 8159 | #define TF_CTR_ENC_TEST_VECTORS 2 | ||
| 8160 | #define TF_CTR_DEC_TEST_VECTORS 2 | ||
| 8161 | #define TF_LRW_ENC_TEST_VECTORS 8 | ||
| 8162 | #define TF_LRW_DEC_TEST_VECTORS 8 | ||
| 8163 | #define TF_XTS_ENC_TEST_VECTORS 5 | ||
| 8164 | #define TF_XTS_DEC_TEST_VECTORS 5 | ||
| 8165 | |||
| 8166 | static struct cipher_testvec tf_enc_tv_template[] = { | 8051 | static struct cipher_testvec tf_enc_tv_template[] = { |
| 8167 | { | 8052 | { |
| 8168 | .key = zeroed_string, | 8053 | .key = zeroed_string, |
| @@ -10881,24 +10766,6 @@ static struct cipher_testvec tf_xts_dec_tv_template[] = { | |||
| 10881 | * Serpent test vectors. These are backwards because Serpent writes | 10766 | * Serpent test vectors. These are backwards because Serpent writes |
| 10882 | * octet sequences in right-to-left mode. | 10767 | * octet sequences in right-to-left mode. |
| 10883 | */ | 10768 | */ |
| 10884 | #define SERPENT_ENC_TEST_VECTORS 5 | ||
| 10885 | #define SERPENT_DEC_TEST_VECTORS 5 | ||
| 10886 | |||
| 10887 | #define TNEPRES_ENC_TEST_VECTORS 4 | ||
| 10888 | #define TNEPRES_DEC_TEST_VECTORS 4 | ||
| 10889 | |||
| 10890 | #define SERPENT_CBC_ENC_TEST_VECTORS 1 | ||
| 10891 | #define SERPENT_CBC_DEC_TEST_VECTORS 1 | ||
| 10892 | |||
| 10893 | #define SERPENT_CTR_ENC_TEST_VECTORS 2 | ||
| 10894 | #define SERPENT_CTR_DEC_TEST_VECTORS 2 | ||
| 10895 | |||
| 10896 | #define SERPENT_LRW_ENC_TEST_VECTORS 8 | ||
| 10897 | #define SERPENT_LRW_DEC_TEST_VECTORS 8 | ||
| 10898 | |||
| 10899 | #define SERPENT_XTS_ENC_TEST_VECTORS 5 | ||
| 10900 | #define SERPENT_XTS_DEC_TEST_VECTORS 5 | ||
| 10901 | |||
| 10902 | static struct cipher_testvec serpent_enc_tv_template[] = { | 10769 | static struct cipher_testvec serpent_enc_tv_template[] = { |
| 10903 | { | 10770 | { |
| 10904 | .input = "\x00\x01\x02\x03\x04\x05\x06\x07" | 10771 | .input = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| @@ -13637,17 +13504,6 @@ static struct cipher_testvec serpent_xts_dec_tv_template[] = { | |||
| 13637 | }; | 13504 | }; |
| 13638 | 13505 | ||
| 13639 | /* Cast6 test vectors from RFC 2612 */ | 13506 | /* Cast6 test vectors from RFC 2612 */ |
| 13640 | #define CAST6_ENC_TEST_VECTORS 4 | ||
| 13641 | #define CAST6_DEC_TEST_VECTORS 4 | ||
| 13642 | #define CAST6_CBC_ENC_TEST_VECTORS 1 | ||
| 13643 | #define CAST6_CBC_DEC_TEST_VECTORS 1 | ||
| 13644 | #define CAST6_CTR_ENC_TEST_VECTORS 2 | ||
| 13645 | #define CAST6_CTR_DEC_TEST_VECTORS 2 | ||
| 13646 | #define CAST6_LRW_ENC_TEST_VECTORS 1 | ||
| 13647 | #define CAST6_LRW_DEC_TEST_VECTORS 1 | ||
| 13648 | #define CAST6_XTS_ENC_TEST_VECTORS 1 | ||
| 13649 | #define CAST6_XTS_DEC_TEST_VECTORS 1 | ||
| 13650 | |||
| 13651 | static struct cipher_testvec cast6_enc_tv_template[] = { | 13507 | static struct cipher_testvec cast6_enc_tv_template[] = { |
| 13652 | { | 13508 | { |
| 13653 | .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" | 13509 | .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" |
| @@ -15182,38 +15038,6 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = { | |||
| 15182 | /* | 15038 | /* |
| 15183 | * AES test vectors. | 15039 | * AES test vectors. |
| 15184 | */ | 15040 | */ |
| 15185 | #define AES_ENC_TEST_VECTORS 4 | ||
| 15186 | #define AES_DEC_TEST_VECTORS 4 | ||
| 15187 | #define AES_CBC_ENC_TEST_VECTORS 5 | ||
| 15188 | #define AES_CBC_DEC_TEST_VECTORS 5 | ||
| 15189 | #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 | ||
| 15190 | #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 | ||
| 15191 | #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2 | ||
| 15192 | #define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2 | ||
| 15193 | #define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7 | ||
| 15194 | #define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7 | ||
| 15195 | #define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7 | ||
| 15196 | #define AES_LRW_ENC_TEST_VECTORS 8 | ||
| 15197 | #define AES_LRW_DEC_TEST_VECTORS 8 | ||
| 15198 | #define AES_XTS_ENC_TEST_VECTORS 5 | ||
| 15199 | #define AES_XTS_DEC_TEST_VECTORS 5 | ||
| 15200 | #define AES_CTR_ENC_TEST_VECTORS 5 | ||
| 15201 | #define AES_CTR_DEC_TEST_VECTORS 5 | ||
| 15202 | #define AES_OFB_ENC_TEST_VECTORS 1 | ||
| 15203 | #define AES_OFB_DEC_TEST_VECTORS 1 | ||
| 15204 | #define AES_CTR_3686_ENC_TEST_VECTORS 7 | ||
| 15205 | #define AES_CTR_3686_DEC_TEST_VECTORS 6 | ||
| 15206 | #define AES_GCM_ENC_TEST_VECTORS 9 | ||
| 15207 | #define AES_GCM_DEC_TEST_VECTORS 8 | ||
| 15208 | #define AES_GCM_4106_ENC_TEST_VECTORS 23 | ||
| 15209 | #define AES_GCM_4106_DEC_TEST_VECTORS 23 | ||
| 15210 | #define AES_GCM_4543_ENC_TEST_VECTORS 1 | ||
| 15211 | #define AES_GCM_4543_DEC_TEST_VECTORS 2 | ||
| 15212 | #define AES_CCM_ENC_TEST_VECTORS 8 | ||
| 15213 | #define AES_CCM_DEC_TEST_VECTORS 7 | ||
| 15214 | #define AES_CCM_4309_ENC_TEST_VECTORS 7 | ||
| 15215 | #define AES_CCM_4309_DEC_TEST_VECTORS 10 | ||
| 15216 | |||
| 15217 | static struct cipher_testvec aes_enc_tv_template[] = { | 15041 | static struct cipher_testvec aes_enc_tv_template[] = { |
| 15218 | { /* From FIPS-197 */ | 15042 | { /* From FIPS-197 */ |
| 15219 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | 15043 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| @@ -17069,8 +16893,6 @@ static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { | |||
| 17069 | }, | 16893 | }, |
| 17070 | }; | 16894 | }; |
| 17071 | 16895 | ||
| 17072 | #define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1 | ||
| 17073 | |||
| 17074 | static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { | 16896 | static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { |
| 17075 | { /*Generated with cryptopp*/ | 16897 | { /*Generated with cryptopp*/ |
| 17076 | #ifdef __LITTLE_ENDIAN | 16898 | #ifdef __LITTLE_ENDIAN |
| @@ -17130,8 +16952,6 @@ static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { | |||
| 17130 | }, | 16952 | }, |
| 17131 | }; | 16953 | }; |
| 17132 | 16954 | ||
| 17133 | #define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1 | ||
| 17134 | |||
| 17135 | static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { | 16955 | static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { |
| 17136 | { /*Generated with cryptopp*/ | 16956 | { /*Generated with cryptopp*/ |
| 17137 | #ifdef __LITTLE_ENDIAN | 16957 | #ifdef __LITTLE_ENDIAN |
| @@ -17191,8 +17011,6 @@ static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { | |||
| 17191 | }, | 17011 | }, |
| 17192 | }; | 17012 | }; |
| 17193 | 17013 | ||
| 17194 | #define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1 | ||
| 17195 | |||
| 17196 | static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { | 17014 | static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { |
| 17197 | { /*Generated with cryptopp*/ | 17015 | { /*Generated with cryptopp*/ |
| 17198 | #ifdef __LITTLE_ENDIAN | 17016 | #ifdef __LITTLE_ENDIAN |
| @@ -17254,8 +17072,6 @@ static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { | |||
| 17254 | }, | 17072 | }, |
| 17255 | }; | 17073 | }; |
| 17256 | 17074 | ||
| 17257 | #define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1 | ||
| 17258 | |||
| 17259 | static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { | 17075 | static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { |
| 17260 | { /*Generated with cryptopp*/ | 17076 | { /*Generated with cryptopp*/ |
| 17261 | #ifdef __LITTLE_ENDIAN | 17077 | #ifdef __LITTLE_ENDIAN |
| @@ -17321,8 +17137,6 @@ static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { | |||
| 17321 | }, | 17137 | }, |
| 17322 | }; | 17138 | }; |
| 17323 | 17139 | ||
| 17324 | #define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1 | ||
| 17325 | |||
| 17326 | static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { | 17140 | static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { |
| 17327 | { /*Generated with cryptopp*/ | 17141 | { /*Generated with cryptopp*/ |
| 17328 | #ifdef __LITTLE_ENDIAN | 17142 | #ifdef __LITTLE_ENDIAN |
| @@ -17392,8 +17206,6 @@ static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { | |||
| 17392 | }, | 17206 | }, |
| 17393 | }; | 17207 | }; |
| 17394 | 17208 | ||
| 17395 | #define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
| 17396 | |||
| 17397 | static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { | 17209 | static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { |
| 17398 | { /*Generated with cryptopp*/ | 17210 | { /*Generated with cryptopp*/ |
| 17399 | #ifdef __LITTLE_ENDIAN | 17211 | #ifdef __LITTLE_ENDIAN |
| @@ -17455,8 +17267,6 @@ static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { | |||
| 17455 | }, | 17267 | }, |
| 17456 | }; | 17268 | }; |
| 17457 | 17269 | ||
| 17458 | #define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
| 17459 | |||
| 17460 | static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { | 17270 | static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { |
| 17461 | { /*Generated with cryptopp*/ | 17271 | { /*Generated with cryptopp*/ |
| 17462 | #ifdef __LITTLE_ENDIAN | 17272 | #ifdef __LITTLE_ENDIAN |
| @@ -17518,8 +17328,6 @@ static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { | |||
| 17518 | }, | 17328 | }, |
| 17519 | }; | 17329 | }; |
| 17520 | 17330 | ||
| 17521 | #define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
| 17522 | |||
| 17523 | static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { | 17331 | static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { |
| 17524 | { /*Generated with cryptopp*/ | 17332 | { /*Generated with cryptopp*/ |
| 17525 | #ifdef __LITTLE_ENDIAN | 17333 | #ifdef __LITTLE_ENDIAN |
| @@ -17583,8 +17391,6 @@ static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { | |||
| 17583 | }, | 17391 | }, |
| 17584 | }; | 17392 | }; |
| 17585 | 17393 | ||
| 17586 | #define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
| 17587 | |||
| 17588 | static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { | 17394 | static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { |
| 17589 | { /*Generated with cryptopp*/ | 17395 | { /*Generated with cryptopp*/ |
| 17590 | #ifdef __LITTLE_ENDIAN | 17396 | #ifdef __LITTLE_ENDIAN |
| @@ -17652,8 +17458,6 @@ static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { | |||
| 17652 | }, | 17458 | }, |
| 17653 | }; | 17459 | }; |
| 17654 | 17460 | ||
| 17655 | #define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
| 17656 | |||
| 17657 | static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = { | 17461 | static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = { |
| 17658 | { /*Generated with cryptopp*/ | 17462 | { /*Generated with cryptopp*/ |
| 17659 | #ifdef __LITTLE_ENDIAN | 17463 | #ifdef __LITTLE_ENDIAN |
| @@ -24434,8 +24238,6 @@ static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = { | |||
| 24434 | /* | 24238 | /* |
| 24435 | * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5. | 24239 | * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5. |
| 24436 | */ | 24240 | */ |
| 24437 | #define RFC7539_ENC_TEST_VECTORS 2 | ||
| 24438 | #define RFC7539_DEC_TEST_VECTORS 2 | ||
| 24439 | static struct aead_testvec rfc7539_enc_tv_template[] = { | 24241 | static struct aead_testvec rfc7539_enc_tv_template[] = { |
| 24440 | { | 24242 | { |
| 24441 | .key = "\x80\x81\x82\x83\x84\x85\x86\x87" | 24243 | .key = "\x80\x81\x82\x83\x84\x85\x86\x87" |
| @@ -24703,8 +24505,6 @@ static struct aead_testvec rfc7539_dec_tv_template[] = { | |||
| 24703 | /* | 24505 | /* |
| 24704 | * draft-irtf-cfrg-chacha20-poly1305 | 24506 | * draft-irtf-cfrg-chacha20-poly1305 |
| 24705 | */ | 24507 | */ |
| 24706 | #define RFC7539ESP_DEC_TEST_VECTORS 1 | ||
| 24707 | #define RFC7539ESP_ENC_TEST_VECTORS 1 | ||
| 24708 | static struct aead_testvec rfc7539esp_enc_tv_template[] = { | 24508 | static struct aead_testvec rfc7539esp_enc_tv_template[] = { |
| 24709 | { | 24509 | { |
| 24710 | .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" | 24510 | .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" |
| @@ -24927,8 +24727,6 @@ static struct cipher_testvec aes_kw_dec_tv_template[] = { | |||
| 24927 | * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf | 24727 | * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf |
| 24928 | * Only AES-128 is supported at this time. | 24728 | * Only AES-128 is supported at this time. |
| 24929 | */ | 24729 | */ |
| 24930 | #define ANSI_CPRNG_AES_TEST_VECTORS 6 | ||
| 24931 | |||
| 24932 | static struct cprng_testvec ansi_cprng_aes_tv_template[] = { | 24730 | static struct cprng_testvec ansi_cprng_aes_tv_template[] = { |
| 24933 | { | 24731 | { |
| 24934 | .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42" | 24732 | .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42" |
| @@ -25846,13 +25644,6 @@ static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = { | |||
| 25846 | }; | 25644 | }; |
| 25847 | 25645 | ||
| 25848 | /* Cast5 test vectors from RFC 2144 */ | 25646 | /* Cast5 test vectors from RFC 2144 */ |
| 25849 | #define CAST5_ENC_TEST_VECTORS 4 | ||
| 25850 | #define CAST5_DEC_TEST_VECTORS 4 | ||
| 25851 | #define CAST5_CBC_ENC_TEST_VECTORS 1 | ||
| 25852 | #define CAST5_CBC_DEC_TEST_VECTORS 1 | ||
| 25853 | #define CAST5_CTR_ENC_TEST_VECTORS 2 | ||
| 25854 | #define CAST5_CTR_DEC_TEST_VECTORS 2 | ||
| 25855 | |||
| 25856 | static struct cipher_testvec cast5_enc_tv_template[] = { | 25647 | static struct cipher_testvec cast5_enc_tv_template[] = { |
| 25857 | { | 25648 | { |
| 25858 | .key = "\x01\x23\x45\x67\x12\x34\x56\x78" | 25649 | .key = "\x01\x23\x45\x67\x12\x34\x56\x78" |
| @@ -26756,9 +26547,6 @@ static struct cipher_testvec cast5_ctr_dec_tv_template[] = { | |||
| 26756 | /* | 26547 | /* |
| 26757 | * ARC4 test vectors from OpenSSL | 26548 | * ARC4 test vectors from OpenSSL |
| 26758 | */ | 26549 | */ |
| 26759 | #define ARC4_ENC_TEST_VECTORS 7 | ||
| 26760 | #define ARC4_DEC_TEST_VECTORS 7 | ||
| 26761 | |||
| 26762 | static struct cipher_testvec arc4_enc_tv_template[] = { | 26550 | static struct cipher_testvec arc4_enc_tv_template[] = { |
| 26763 | { | 26551 | { |
| 26764 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", | 26552 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", |
| @@ -26894,9 +26682,6 @@ static struct cipher_testvec arc4_dec_tv_template[] = { | |||
| 26894 | /* | 26682 | /* |
| 26895 | * TEA test vectors | 26683 | * TEA test vectors |
| 26896 | */ | 26684 | */ |
| 26897 | #define TEA_ENC_TEST_VECTORS 4 | ||
| 26898 | #define TEA_DEC_TEST_VECTORS 4 | ||
| 26899 | |||
| 26900 | static struct cipher_testvec tea_enc_tv_template[] = { | 26685 | static struct cipher_testvec tea_enc_tv_template[] = { |
| 26901 | { | 26686 | { |
| 26902 | .key = zeroed_string, | 26687 | .key = zeroed_string, |
| @@ -26986,9 +26771,6 @@ static struct cipher_testvec tea_dec_tv_template[] = { | |||
| 26986 | /* | 26771 | /* |
| 26987 | * XTEA test vectors | 26772 | * XTEA test vectors |
| 26988 | */ | 26773 | */ |
| 26989 | #define XTEA_ENC_TEST_VECTORS 4 | ||
| 26990 | #define XTEA_DEC_TEST_VECTORS 4 | ||
| 26991 | |||
| 26992 | static struct cipher_testvec xtea_enc_tv_template[] = { | 26774 | static struct cipher_testvec xtea_enc_tv_template[] = { |
| 26993 | { | 26775 | { |
| 26994 | .key = zeroed_string, | 26776 | .key = zeroed_string, |
| @@ -27078,9 +26860,6 @@ static struct cipher_testvec xtea_dec_tv_template[] = { | |||
| 27078 | /* | 26860 | /* |
| 27079 | * KHAZAD test vectors. | 26861 | * KHAZAD test vectors. |
| 27080 | */ | 26862 | */ |
| 27081 | #define KHAZAD_ENC_TEST_VECTORS 5 | ||
| 27082 | #define KHAZAD_DEC_TEST_VECTORS 5 | ||
| 27083 | |||
| 27084 | static struct cipher_testvec khazad_enc_tv_template[] = { | 26863 | static struct cipher_testvec khazad_enc_tv_template[] = { |
| 27085 | { | 26864 | { |
| 27086 | .key = "\x80\x00\x00\x00\x00\x00\x00\x00" | 26865 | .key = "\x80\x00\x00\x00\x00\x00\x00\x00" |
| @@ -27177,11 +26956,6 @@ static struct cipher_testvec khazad_dec_tv_template[] = { | |||
| 27177 | * Anubis test vectors. | 26956 | * Anubis test vectors. |
| 27178 | */ | 26957 | */ |
| 27179 | 26958 | ||
| 27180 | #define ANUBIS_ENC_TEST_VECTORS 5 | ||
| 27181 | #define ANUBIS_DEC_TEST_VECTORS 5 | ||
| 27182 | #define ANUBIS_CBC_ENC_TEST_VECTORS 2 | ||
| 27183 | #define ANUBIS_CBC_DEC_TEST_VECTORS 2 | ||
| 27184 | |||
| 27185 | static struct cipher_testvec anubis_enc_tv_template[] = { | 26959 | static struct cipher_testvec anubis_enc_tv_template[] = { |
| 27186 | { | 26960 | { |
| 27187 | .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" | 26961 | .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" |
| @@ -27381,9 +27155,6 @@ static struct cipher_testvec anubis_cbc_dec_tv_template[] = { | |||
| 27381 | /* | 27155 | /* |
| 27382 | * XETA test vectors | 27156 | * XETA test vectors |
| 27383 | */ | 27157 | */ |
| 27384 | #define XETA_ENC_TEST_VECTORS 4 | ||
| 27385 | #define XETA_DEC_TEST_VECTORS 4 | ||
| 27386 | |||
| 27387 | static struct cipher_testvec xeta_enc_tv_template[] = { | 27158 | static struct cipher_testvec xeta_enc_tv_template[] = { |
| 27388 | { | 27159 | { |
| 27389 | .key = zeroed_string, | 27160 | .key = zeroed_string, |
| @@ -27473,9 +27244,6 @@ static struct cipher_testvec xeta_dec_tv_template[] = { | |||
| 27473 | /* | 27244 | /* |
| 27474 | * FCrypt test vectors | 27245 | * FCrypt test vectors |
| 27475 | */ | 27246 | */ |
| 27476 | #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template) | ||
| 27477 | #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template) | ||
| 27478 | |||
| 27479 | static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = { | 27247 | static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = { |
| 27480 | { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ | 27248 | { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ |
| 27481 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00", | 27249 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00", |
| @@ -27601,17 +27369,6 @@ static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = { | |||
| 27601 | /* | 27369 | /* |
| 27602 | * CAMELLIA test vectors. | 27370 | * CAMELLIA test vectors. |
| 27603 | */ | 27371 | */ |
| 27604 | #define CAMELLIA_ENC_TEST_VECTORS 4 | ||
| 27605 | #define CAMELLIA_DEC_TEST_VECTORS 4 | ||
| 27606 | #define CAMELLIA_CBC_ENC_TEST_VECTORS 3 | ||
| 27607 | #define CAMELLIA_CBC_DEC_TEST_VECTORS 3 | ||
| 27608 | #define CAMELLIA_CTR_ENC_TEST_VECTORS 2 | ||
| 27609 | #define CAMELLIA_CTR_DEC_TEST_VECTORS 2 | ||
| 27610 | #define CAMELLIA_LRW_ENC_TEST_VECTORS 8 | ||
| 27611 | #define CAMELLIA_LRW_DEC_TEST_VECTORS 8 | ||
| 27612 | #define CAMELLIA_XTS_ENC_TEST_VECTORS 5 | ||
| 27613 | #define CAMELLIA_XTS_DEC_TEST_VECTORS 5 | ||
| 27614 | |||
| 27615 | static struct cipher_testvec camellia_enc_tv_template[] = { | 27372 | static struct cipher_testvec camellia_enc_tv_template[] = { |
| 27616 | { | 27373 | { |
| 27617 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" | 27374 | .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" |
| @@ -31331,9 +31088,6 @@ static struct cipher_testvec camellia_xts_dec_tv_template[] = { | |||
| 31331 | /* | 31088 | /* |
| 31332 | * SEED test vectors | 31089 | * SEED test vectors |
| 31333 | */ | 31090 | */ |
| 31334 | #define SEED_ENC_TEST_VECTORS 4 | ||
| 31335 | #define SEED_DEC_TEST_VECTORS 4 | ||
| 31336 | |||
| 31337 | static struct cipher_testvec seed_enc_tv_template[] = { | 31091 | static struct cipher_testvec seed_enc_tv_template[] = { |
| 31338 | { | 31092 | { |
| 31339 | .key = zeroed_string, | 31093 | .key = zeroed_string, |
| @@ -31418,7 +31172,6 @@ static struct cipher_testvec seed_dec_tv_template[] = { | |||
| 31418 | } | 31172 | } |
| 31419 | }; | 31173 | }; |
| 31420 | 31174 | ||
| 31421 | #define SALSA20_STREAM_ENC_TEST_VECTORS 5 | ||
| 31422 | static struct cipher_testvec salsa20_stream_enc_tv_template[] = { | 31175 | static struct cipher_testvec salsa20_stream_enc_tv_template[] = { |
| 31423 | /* | 31176 | /* |
| 31424 | * Testvectors from verified.test-vectors submitted to ECRYPT. | 31177 | * Testvectors from verified.test-vectors submitted to ECRYPT. |
| @@ -32588,7 +32341,6 @@ static struct cipher_testvec salsa20_stream_enc_tv_template[] = { | |||
| 32588 | }, | 32341 | }, |
| 32589 | }; | 32342 | }; |
| 32590 | 32343 | ||
| 32591 | #define CHACHA20_ENC_TEST_VECTORS 4 | ||
| 32592 | static struct cipher_testvec chacha20_enc_tv_template[] = { | 32344 | static struct cipher_testvec chacha20_enc_tv_template[] = { |
| 32593 | { /* RFC7539 A.2. Test Vector #1 */ | 32345 | { /* RFC7539 A.2. Test Vector #1 */ |
| 32594 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00" | 32346 | .key = "\x00\x00\x00\x00\x00\x00\x00\x00" |
| @@ -33100,8 +32852,6 @@ static struct cipher_testvec chacha20_enc_tv_template[] = { | |||
| 33100 | /* | 32852 | /* |
| 33101 | * CTS (Cipher Text Stealing) mode tests | 32853 | * CTS (Cipher Text Stealing) mode tests |
| 33102 | */ | 32854 | */ |
| 33103 | #define CTS_MODE_ENC_TEST_VECTORS 6 | ||
| 33104 | #define CTS_MODE_DEC_TEST_VECTORS 6 | ||
| 33105 | static struct cipher_testvec cts_mode_enc_tv_template[] = { | 32855 | static struct cipher_testvec cts_mode_enc_tv_template[] = { |
| 33106 | { /* from rfc3962 */ | 32856 | { /* from rfc3962 */ |
| 33107 | .klen = 16, | 32857 | .klen = 16, |
| @@ -33322,9 +33072,6 @@ struct comp_testvec { | |||
| 33322 | * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL. | 33072 | * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL. |
| 33323 | */ | 33073 | */ |
| 33324 | 33074 | ||
| 33325 | #define DEFLATE_COMP_TEST_VECTORS 2 | ||
| 33326 | #define DEFLATE_DECOMP_TEST_VECTORS 2 | ||
| 33327 | |||
| 33328 | static struct comp_testvec deflate_comp_tv_template[] = { | 33075 | static struct comp_testvec deflate_comp_tv_template[] = { |
| 33329 | { | 33076 | { |
| 33330 | .inlen = 70, | 33077 | .inlen = 70, |
| @@ -33400,9 +33147,6 @@ static struct comp_testvec deflate_decomp_tv_template[] = { | |||
| 33400 | /* | 33147 | /* |
| 33401 | * LZO test vectors (null-terminated strings). | 33148 | * LZO test vectors (null-terminated strings). |
| 33402 | */ | 33149 | */ |
| 33403 | #define LZO_COMP_TEST_VECTORS 2 | ||
| 33404 | #define LZO_DECOMP_TEST_VECTORS 2 | ||
| 33405 | |||
| 33406 | static struct comp_testvec lzo_comp_tv_template[] = { | 33150 | static struct comp_testvec lzo_comp_tv_template[] = { |
| 33407 | { | 33151 | { |
| 33408 | .inlen = 70, | 33152 | .inlen = 70, |
| @@ -33534,8 +33278,6 @@ static struct hash_testvec michael_mic_tv_template[] = { | |||
| 33534 | /* | 33278 | /* |
| 33535 | * CRC32 test vectors | 33279 | * CRC32 test vectors |
| 33536 | */ | 33280 | */ |
| 33537 | #define CRC32_TEST_VECTORS 14 | ||
| 33538 | |||
| 33539 | static struct hash_testvec crc32_tv_template[] = { | 33281 | static struct hash_testvec crc32_tv_template[] = { |
| 33540 | { | 33282 | { |
| 33541 | .key = "\x87\xa9\xcb\xed", | 33283 | .key = "\x87\xa9\xcb\xed", |
| @@ -33968,8 +33710,6 @@ static struct hash_testvec crc32_tv_template[] = { | |||
| 33968 | /* | 33710 | /* |
| 33969 | * CRC32C test vectors | 33711 | * CRC32C test vectors |
| 33970 | */ | 33712 | */ |
| 33971 | #define CRC32C_TEST_VECTORS 15 | ||
| 33972 | |||
| 33973 | static struct hash_testvec crc32c_tv_template[] = { | 33713 | static struct hash_testvec crc32c_tv_template[] = { |
| 33974 | { | 33714 | { |
| 33975 | .psize = 0, | 33715 | .psize = 0, |
| @@ -34406,8 +34146,6 @@ static struct hash_testvec crc32c_tv_template[] = { | |||
| 34406 | /* | 34146 | /* |
| 34407 | * Blakcifn CRC test vectors | 34147 | * Blakcifn CRC test vectors |
| 34408 | */ | 34148 | */ |
| 34409 | #define BFIN_CRC_TEST_VECTORS 6 | ||
| 34410 | |||
| 34411 | static struct hash_testvec bfin_crc_tv_template[] = { | 34149 | static struct hash_testvec bfin_crc_tv_template[] = { |
| 34412 | { | 34150 | { |
| 34413 | .psize = 0, | 34151 | .psize = 0, |
| @@ -34493,9 +34231,6 @@ static struct hash_testvec bfin_crc_tv_template[] = { | |||
| 34493 | 34231 | ||
| 34494 | }; | 34232 | }; |
| 34495 | 34233 | ||
| 34496 | #define LZ4_COMP_TEST_VECTORS 1 | ||
| 34497 | #define LZ4_DECOMP_TEST_VECTORS 1 | ||
| 34498 | |||
| 34499 | static struct comp_testvec lz4_comp_tv_template[] = { | 34234 | static struct comp_testvec lz4_comp_tv_template[] = { |
| 34500 | { | 34235 | { |
| 34501 | .inlen = 70, | 34236 | .inlen = 70, |
| @@ -34526,9 +34261,6 @@ static struct comp_testvec lz4_decomp_tv_template[] = { | |||
| 34526 | }, | 34261 | }, |
| 34527 | }; | 34262 | }; |
| 34528 | 34263 | ||
| 34529 | #define LZ4HC_COMP_TEST_VECTORS 1 | ||
| 34530 | #define LZ4HC_DECOMP_TEST_VECTORS 1 | ||
| 34531 | |||
| 34532 | static struct comp_testvec lz4hc_comp_tv_template[] = { | 34264 | static struct comp_testvec lz4hc_comp_tv_template[] = { |
| 34533 | { | 34265 | { |
| 34534 | .inlen = 70, | 34266 | .inlen = 70, |
