xref: /dpdk/app/test/test_cryptodev_hash_test_vectors.h (revision 089e5ed727a15da2729cfee9b63533dd120bd04c)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016-2017 Intel Corporation
3  */
4 
5 #ifndef TEST_CRYPTODEV_HASH_TEST_VECTORS_H_
6 #define TEST_CRYPTODEV_HASH_TEST_VECTORS_H_
7 
8 #ifdef RTE_LIBRTE_PMD_AESNI_MB
9 #include <intel-ipsec-mb.h>
10 #endif
11 
12 #if !defined(IMB_VERSION_NUM)
13 #define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
14 #define IMB_VERSION_NUM IMB_VERSION(0, 49, 0)
15 #endif
16 
17 static const uint8_t plaintext_hash[] = {
18 	"What a lousy earth! He wondered how many people "
19 	"were destitute that same night even in his own "
20 	"prosperous country, how many homes were "
21 	"shanties, how many husbands were drunk and "
22 	"wives socked, and how many children were "
23 	"bullied, abused, or abandoned. How many "
24 	"families hungered for food they could not "
25 	"afford to buy? How many hearts were broken? How "
26 	"many suicides would take place that same night, "
27 	"how many people would go insane? How many "
28 	"cockroaches and landlords would triumph? How "
29 	"many winners were losers, successes failures, "
30 	"and rich men poor men? How many wise guys were "
31 	"stupid? How many happy endings were unhappy "
32 	"endings? How many honest men were liars, brave "
33 	"men cowards, loyal men traitors, how many "
34 	"sainted men were corrupt, how many people in "
35 	"positions of trust had sold their souls to "
36 	"bodyguards, how many had never had souls? How "
37 	"many straight-and-narrow paths were crooked "
38 	"paths? How many best families were worst "
39 	"families and how many good people were bad "
40 	"people? When you added them all up and then "
41 	"subtracted, you might be left with only the "
42 	"children, and perhaps with Albert Einstein and "
43 	"an old violinist or sculptor somewhere."
44 };
45 
46 static const struct blockcipher_test_data
47 md5_test_vector = {
48 	.auth_algo = RTE_CRYPTO_AUTH_MD5,
49 	.ciphertext = {
50 		.data = plaintext_hash,
51 		.len = 512
52 	},
53 	.digest = {
54 		.data = {
55 			0xB3, 0xE6, 0xBB, 0x50, 0x41, 0x35, 0x3C, 0x6B,
56 			0x7A, 0xFF, 0xD2, 0x64, 0xAF, 0xD5, 0x1C, 0xB2
57 		},
58 		.len = 16
59 	}
60 };
61 
62 static const struct blockcipher_test_data
63 hmac_md5_test_vector = {
64 	.auth_algo = RTE_CRYPTO_AUTH_MD5_HMAC,
65 	.ciphertext = {
66 		.data = plaintext_hash,
67 		.len = 512
68 	},
69 	.auth_key = {
70 		.data = {
71 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
72 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD
73 		},
74 		.len = 16
75 	},
76 	.digest = {
77 		.data = {
78 			0x50, 0xE8, 0xDE, 0xC5, 0xC1, 0x76, 0xAC, 0xAE,
79 			0x15, 0x4A, 0xF1, 0x7F, 0x7E, 0x04, 0x42, 0x9B
80 		},
81 		.len = 16,
82 		.truncated_len = 12
83 	}
84 };
85 
86 static const struct blockcipher_test_data
87 sha1_test_vector = {
88 	.auth_algo = RTE_CRYPTO_AUTH_SHA1,
89 	.ciphertext = {
90 		.data = plaintext_hash,
91 		.len = 512
92 	},
93 	.digest = {
94 		.data = {
95 			0xA2, 0x8D, 0x40, 0x78, 0xDD, 0x9F, 0xBB, 0xD5,
96 			0x35, 0x62, 0xFB, 0xFA, 0x93, 0xFD, 0x7D, 0x70,
97 			0xA6, 0x7D, 0x45, 0xCA
98 		},
99 		.len = 20,
100 		.truncated_len = 20
101 	}
102 };
103 
104 static const struct blockcipher_test_data
105 hmac_sha1_test_vector = {
106 	.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
107 	.ciphertext = {
108 		.data = plaintext_hash,
109 		.len = 512
110 	},
111 	.auth_key = {
112 		.data = {
113 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
114 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
115 			0xDE, 0xF4, 0xDE, 0xAD
116 		},
117 		.len = 20
118 	},
119 	.digest = {
120 		.data = {
121 			0xC4, 0xB7, 0x0E, 0x6B, 0xDE, 0xD1, 0xE7, 0x77,
122 			0x7E, 0x2E, 0x8F, 0xFC, 0x48, 0x39, 0x46, 0x17,
123 			0x3F, 0x91, 0x64, 0x59
124 		},
125 		.len = 20,
126 		.truncated_len = 12
127 	}
128 };
129 
130 static const struct blockcipher_test_data
131 sha224_test_vector = {
132 	.auth_algo = RTE_CRYPTO_AUTH_SHA224,
133 	.ciphertext = {
134 		.data = plaintext_hash,
135 		.len = 512
136 	},
137 	.digest = {
138 		.data = {
139 			0x91, 0xE7, 0xCD, 0x75, 0x14, 0x9C, 0xA9, 0xE9,
140 			0x2E, 0x46, 0x12, 0x20, 0x22, 0xF9, 0x68, 0x28,
141 			0x39, 0x26, 0xDF, 0xB5, 0x78, 0x62, 0xB2, 0x6E,
142 			0x5E, 0x8F, 0x25, 0x84
143 		},
144 		.len = 28,
145 		.truncated_len = 28
146 	}
147 };
148 
149 static const struct blockcipher_test_data
150 hmac_sha224_test_vector = {
151 	.auth_algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
152 	.ciphertext = {
153 		.data = plaintext_hash,
154 		.len = 512
155 	},
156 	.auth_key = {
157 		.data = {
158 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
159 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
160 			0xDE, 0xF4, 0xDE, 0xAD, 0x26, 0xEB, 0xAB, 0x92,
161 			0xFB, 0xBF, 0xB0, 0x8C
162 		},
163 		.len = 28
164 	},
165 	.digest = {
166 		.data = {
167 			0x70, 0x0F, 0x04, 0x4D, 0x22, 0x02, 0x7D, 0x31,
168 			0x36, 0xDA, 0x77, 0x19, 0xB9, 0x66, 0x37, 0x7B,
169 			0xF1, 0x8A, 0x63, 0xBB, 0x5D, 0x1D, 0xE3, 0x9F,
170 			0x92, 0xF6, 0xAA, 0x19
171 		},
172 		.len = 28,
173 		.truncated_len = 14
174 	}
175 };
176 
177 static const struct blockcipher_test_data
178 sha256_test_vector = {
179 	.auth_algo = RTE_CRYPTO_AUTH_SHA256,
180 	.ciphertext = {
181 		.data = plaintext_hash,
182 		.len = 512
183 	},
184 	.digest = {
185 		.data = {
186 			0x7F, 0xF1, 0x0C, 0xF5, 0x90, 0x97, 0x19, 0x0F,
187 			0x00, 0xE4, 0x83, 0x01, 0xCA, 0x59, 0x00, 0x2E,
188 			0x1F, 0xC7, 0x84, 0xEE, 0x76, 0xA6, 0x39, 0x15,
189 			0x76, 0x2F, 0x87, 0xF9, 0x01, 0x06, 0xF3, 0xB7
190 		},
191 		.len = 32,
192 		.truncated_len = 32
193 	}
194 };
195 
196 static const struct blockcipher_test_data
197 hmac_sha256_test_vector = {
198 	.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
199 	.ciphertext = {
200 		.data = plaintext_hash,
201 		.len = 512
202 	},
203 	.auth_key = {
204 		.data = {
205 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
206 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
207 			0xDE, 0xF4, 0xDE, 0xAD, 0x26, 0xEB, 0xAB, 0x92,
208 			0xFB, 0xBF, 0xB0, 0x8C, 0x29, 0x87, 0x90, 0xAC
209 		},
210 		.len = 32
211 	},
212 	.digest = {
213 		.data = {
214 			0xAF, 0x8F, 0x70, 0x1B, 0x4B, 0xAF, 0x34, 0xCB,
215 			0x02, 0x24, 0x48, 0x45, 0x83, 0x52, 0x8F, 0x22,
216 			0x06, 0x4D, 0x64, 0x09, 0x0A, 0xCC, 0x02, 0x77,
217 			0x71, 0x83, 0x48, 0x71, 0x07, 0x02, 0x25, 0x17
218 		},
219 		.len = 32,
220 		.truncated_len = 16
221 	}
222 };
223 
224 static const struct blockcipher_test_data
225 sha384_test_vector = {
226 	.auth_algo = RTE_CRYPTO_AUTH_SHA384,
227 	.ciphertext = {
228 		.data = plaintext_hash,
229 		.len = 512
230 	},
231 	.digest = {
232 		.data = {
233 			0x1D, 0xE7, 0x3F, 0x55, 0x86, 0xFE, 0x48, 0x9F,
234 			0xAC, 0xC6, 0x85, 0x32, 0xFA, 0x8E, 0xA6, 0x77,
235 			0x25, 0x84, 0xA5, 0x98, 0x8D, 0x0B, 0x80, 0xF4,
236 			0xEB, 0x2C, 0xFB, 0x6C, 0xEA, 0x7B, 0xFD, 0xD5,
237 			0xAD, 0x41, 0xAB, 0x15, 0xB0, 0x03, 0x15, 0xEC,
238 			0x9E, 0x3D, 0xED, 0xCB, 0x80, 0x7B, 0xF4, 0xB6
239 		},
240 		.len = 48,
241 		.truncated_len = 48
242 	}
243 };
244 
245 static const struct blockcipher_test_data
246 hmac_sha384_test_vector = {
247 	.auth_algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
248 	.ciphertext = {
249 		.data = plaintext_hash,
250 		.len = 512
251 	},
252 	.auth_key = {
253 		.data = {
254 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
255 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
256 			0xDE, 0xF4, 0xDE, 0xAD, 0x26, 0xEB, 0xAB, 0x92,
257 			0xFB, 0xBF, 0xB0, 0x8C, 0x29, 0x87, 0x90, 0xAC,
258 			0x39, 0x8B, 0x5C, 0x49, 0x68, 0x1E, 0x3A, 0x05,
259 			0xCC, 0x68, 0x5C, 0x76, 0xCB, 0x3C, 0x71, 0x89
260 		},
261 		.len = 48
262 	},
263 	.digest = {
264 		.data = {
265 			0xE2, 0x83, 0x18, 0x55, 0xB5, 0x8D, 0x94, 0x9B,
266 			0x01, 0xB6, 0xE2, 0x57, 0x7A, 0x62, 0xF5, 0xF4,
267 			0xAB, 0x39, 0xF3, 0x3C, 0x28, 0xA0, 0x0F, 0xCC,
268 			0xEE, 0x1C, 0xF1, 0xF8, 0x69, 0xF1, 0x24, 0x3B,
269 			0x10, 0x90, 0x0A, 0xE3, 0xF0, 0x59, 0xDD, 0xC0,
270 			0x6F, 0xE6, 0x8C, 0x84, 0xD5, 0x03, 0xF8, 0x9E
271 		},
272 		.len = 48,
273 		.truncated_len = 24
274 	}
275 };
276 
277 static const struct blockcipher_test_data
278 sha512_test_vector = {
279 	.auth_algo = RTE_CRYPTO_AUTH_SHA512,
280 	.ciphertext = {
281 		.data = plaintext_hash,
282 		.len = 512
283 	},
284 	.digest = {
285 		.data = {
286 			0xB9, 0xBA, 0x28, 0x48, 0x3C, 0xC2, 0xD3, 0x65,
287 			0x4A, 0xD6, 0x00, 0x1D, 0xCE, 0x61, 0x64, 0x54,
288 			0x45, 0x8C, 0x64, 0x0E, 0xED, 0x0E, 0xD8, 0x1C,
289 			0x72, 0xCE, 0xD2, 0x44, 0x91, 0xC8, 0xEB, 0xC7,
290 			0x99, 0xC5, 0xCA, 0x89, 0x72, 0x64, 0x96, 0x41,
291 			0xC8, 0xEA, 0xB2, 0x4E, 0xD1, 0x21, 0x13, 0x49,
292 			0x64, 0x4E, 0x15, 0x68, 0x12, 0x67, 0x26, 0x0F,
293 			0x2C, 0x3C, 0x83, 0x25, 0x27, 0x86, 0xF0, 0xDB
294 		},
295 		.len = 64,
296 		.truncated_len = 64
297 	}
298 };
299 
300 static const struct blockcipher_test_data
301 hmac_sha512_test_vector = {
302 	.auth_algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
303 	.ciphertext = {
304 		.data = plaintext_hash,
305 		.len = 512
306 	},
307 	.auth_key = {
308 		.data = {
309 			0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
310 			0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
311 			0xDE, 0xF4, 0xDE, 0xAD, 0x26, 0xEB, 0xAB, 0x92,
312 			0xFB, 0xBF, 0xB0, 0x8C, 0x29, 0x87, 0x90, 0xAC,
313 			0x39, 0x8B, 0x5C, 0x49, 0x68, 0x1E, 0x3A, 0x05,
314 			0xCC, 0x68, 0x5C, 0x76, 0xCB, 0x3C, 0x71, 0x89,
315 			0xDE, 0xAA, 0x36, 0x44, 0x98, 0x93, 0x97, 0x1E,
316 			0x6D, 0x53, 0x83, 0x87, 0xB3, 0xB7, 0x56, 0x41
317 		},
318 		.len = 64
319 	},
320 	.digest = {
321 		.data = {
322 			0xB8, 0x0B, 0x35, 0x97, 0x3F, 0x24, 0x3F, 0x05,
323 			0x2A, 0x7F, 0x2F, 0xD8, 0xD7, 0x56, 0x58, 0xAD,
324 			0x6F, 0x8D, 0x1F, 0x4C, 0x30, 0xF9, 0xA8, 0x29,
325 			0x7A, 0xE0, 0x8D, 0x88, 0xF5, 0x2E, 0x94, 0xF5,
326 			0x06, 0xF7, 0x5D, 0x57, 0x32, 0xA8, 0x49, 0x29,
327 			0xEA, 0x6B, 0x6D, 0x95, 0xBD, 0x76, 0xF5, 0x79,
328 			0x97, 0x37, 0x0F, 0xBE, 0xC2, 0x45, 0xA0, 0x87,
329 			0xAF, 0x24, 0x27, 0x0C, 0x78, 0xBA, 0xBE, 0x20
330 		},
331 		.len = 64,
332 		.truncated_len = 32
333 	}
334 };
335 
336 static const struct blockcipher_test_data
337 cmac_test_vector = {
338 	.auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
339 	.ciphertext = {
340 		.data = plaintext_hash,
341 		.len = 512
342 	},
343 	.auth_key = {
344 		.data = {
345 			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
346 			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
347 		},
348 		.len = 16
349 	},
350 	.digest = {
351 		.data = {
352 			0x4C, 0x77, 0x87, 0xA0, 0x78, 0x8E, 0xEA, 0x96,
353 			0xC1, 0xEB, 0x1E, 0x4E, 0x95, 0x8F, 0xED, 0x27
354 		},
355 		.len = 16,
356 		.truncated_len = 16
357 	}
358 };
359 
360 static const struct blockcipher_test_data
361 null_auth_test_vector = {
362 	.auth_algo = RTE_CRYPTO_AUTH_NULL,
363 	.ciphertext = {		/* arbitrary data - shouldn't be used */
364 		.data = plaintext_hash,
365 		.len = 512
366 	},
367 	.auth_key = {		/* arbitrary data - shouldn't be used */
368 		.data = {
369 			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
370 			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
371 		},
372 		.len = 16
373 	},
374 	.digest = {
375 		.data = {
376 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
377 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
378 			0x00, 0x00, 0x00, 0x00
379 		},
380 		.len = 20,
381 		.truncated_len = 12
382 	}
383 };
384 
385 static const struct blockcipher_test_data
386 cmac_test_vector_12 = {
387 	.auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
388 	.ciphertext = {
389 		.data = plaintext_hash,
390 		.len = 512
391 	},
392 	.auth_key = {
393 		.data = {
394 			0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
395 			0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
396 		},
397 		.len = 16
398 	},
399 	.digest = {
400 		.data = {
401 			0x4C, 0x77, 0x87, 0xA0, 0x78, 0x8E, 0xEA, 0x96,
402 			0xC1, 0xEB, 0x1E, 0x4E, 0x95, 0x8F, 0xED, 0x27
403 		},
404 		.len = 12,
405 		.truncated_len = 12
406 	}
407 };
408 
409 static const struct blockcipher_test_case hash_test_cases[] = {
410 	{
411 		.test_descr = "MD5 Digest",
412 		.test_data = &md5_test_vector,
413 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
414 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
415 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
416 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
417 	},
418 	{
419 		.test_descr = "MD5 Digest Verify",
420 		.test_data = &md5_test_vector,
421 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
422 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
423 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
424 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
425 	},
426 	{
427 		.test_descr = "HMAC-MD5 Digest",
428 		.test_data = &hmac_md5_test_vector,
429 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
430 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
431 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
432 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
433 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
434 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
435 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
436 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
437 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
438 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
439 	},
440 	{
441 		.test_descr = "HMAC-MD5 Digest Verify",
442 		.test_data = &hmac_md5_test_vector,
443 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
444 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
445 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
446 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
447 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
448 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
449 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
450 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
451 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
452 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
453 	},
454 	{
455 		.test_descr = "SHA1 Digest",
456 		.test_data = &sha1_test_vector,
457 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
458 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
459 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
460 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
461 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
462 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
463 #endif
464 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
465 	},
466 	{
467 		.test_descr = "SHA1 Digest Verify",
468 		.test_data = &sha1_test_vector,
469 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
470 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
471 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
472 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
473 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
474 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
475 #endif
476 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
477 	},
478 	{
479 		.test_descr = "HMAC-SHA1 Digest",
480 		.test_data = &hmac_sha1_test_vector,
481 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
482 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
483 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
484 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
485 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
486 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
487 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
488 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
489 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
490 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
491 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
492 	},
493 	{
494 		.test_descr = "HMAC-SHA1 Digest Scatter Gather",
495 		.test_data = &hmac_sha1_test_vector,
496 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
497 		.feature_mask = BLOCKCIPHER_TEST_FEATURE_SG,
498 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
499 			    BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
500 			    BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
501 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
502 	},
503 	{
504 		.test_descr = "HMAC-SHA1 Digest Verify",
505 		.test_data = &hmac_sha1_test_vector,
506 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
507 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
508 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
509 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
510 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
511 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
512 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
513 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
514 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
515 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
516 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
517 	},
518 	{
519 		.test_descr = "HMAC-SHA1 Digest Verify Scatter Gather",
520 		.test_data = &hmac_sha1_test_vector,
521 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
522 		.feature_mask = BLOCKCIPHER_TEST_FEATURE_SG,
523 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
524 			    BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
525 			    BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
526 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
527 	},
528 	{
529 		.test_descr = "SHA224 Digest",
530 		.test_data = &sha224_test_vector,
531 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
532 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
533 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
534 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
535 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
536 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
537 #endif
538 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
539 	},
540 	{
541 		.test_descr = "SHA224 Digest Verify",
542 		.test_data = &sha224_test_vector,
543 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
544 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
545 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
546 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
547 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
548 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
549 #endif
550 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
551 	},
552 	{
553 		.test_descr = "HMAC-SHA224 Digest",
554 		.test_data = &hmac_sha224_test_vector,
555 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
556 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
557 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
558 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
559 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
560 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
561 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
562 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
563 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
564 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
565 	},
566 	{
567 		.test_descr = "HMAC-SHA224 Digest Verify",
568 		.test_data = &hmac_sha224_test_vector,
569 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
570 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
571 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
572 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
573 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
574 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
575 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
576 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
577 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
578 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
579 	},
580 	{
581 		.test_descr = "SHA256 Digest",
582 		.test_data = &sha256_test_vector,
583 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
584 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
585 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
586 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
587 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
588 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
589 #endif
590 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
591 	},
592 	{
593 		.test_descr = "SHA256 Digest Verify",
594 		.test_data = &sha256_test_vector,
595 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
596 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
597 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
598 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
599 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
600 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
601 #endif
602 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
603 	},
604 	{
605 		.test_descr = "HMAC-SHA256 Digest",
606 		.test_data = &hmac_sha256_test_vector,
607 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
608 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
609 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
610 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
611 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
612 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
613 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
614 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
615 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
616 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
617 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
618 	},
619 	{
620 		.test_descr = "HMAC-SHA256 Digest Verify",
621 		.test_data = &hmac_sha256_test_vector,
622 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
623 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
624 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
625 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
626 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
627 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
628 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
629 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
630 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
631 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
632 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
633 	},
634 	{
635 		.test_descr = "SHA384 Digest",
636 		.test_data = &sha384_test_vector,
637 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
638 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
639 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
640 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
641 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
642 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
643 #endif
644 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
645 	},
646 	{
647 		.test_descr = "SHA384 Digest Verify",
648 		.test_data = &sha384_test_vector,
649 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
650 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
651 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
652 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
653 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
654 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
655 #endif
656 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
657 	},
658 	{
659 		.test_descr = "HMAC-SHA384 Digest",
660 		.test_data = &hmac_sha384_test_vector,
661 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
662 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
663 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
664 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
665 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
666 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
667 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
668 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
669 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
670 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
671 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
672 	},
673 	{
674 		.test_descr = "HMAC-SHA384 Digest Verify",
675 		.test_data = &hmac_sha384_test_vector,
676 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
677 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
678 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
679 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
680 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
681 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
682 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
683 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
684 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
685 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
686 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
687 	},
688 	{
689 		.test_descr = "SHA512 Digest",
690 		.test_data = &sha512_test_vector,
691 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
692 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
693 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
694 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
695 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
696 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
697 #endif
698 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
699 	},
700 	{
701 		.test_descr = "SHA512 Digest Verify",
702 		.test_data = &sha512_test_vector,
703 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
704 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
705 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
706 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
707 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
708 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
709 #endif
710 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
711 	},
712 	{
713 		.test_descr = "HMAC-SHA512 Digest",
714 		.test_data = &hmac_sha512_test_vector,
715 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
716 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
717 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
718 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
719 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
720 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
721 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
722 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
723 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
724 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
725 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
726 	},
727 	{
728 		.test_descr = "HMAC-SHA512 Digest Verify",
729 		.test_data = &hmac_sha512_test_vector,
730 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
731 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
732 			BLOCKCIPHER_TEST_TARGET_PMD_MB |
733 			BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
734 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
735 			BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
736 			BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
737 			BLOCKCIPHER_TEST_TARGET_PMD_QAT |
738 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
739 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
740 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
741 	},
742 	{
743 		.test_descr = "CMAC Digest 12B",
744 		.test_data = &cmac_test_vector_12,
745 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
746 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
747 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
748 	},
749 	{
750 		.test_descr = "CMAC Digest Verify 12B",
751 		.test_data = &cmac_test_vector_12,
752 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
753 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
754 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
755 	},
756 	{
757 		.test_descr = "CMAC Digest 16B",
758 		.test_data = &cmac_test_vector,
759 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
760 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
761 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
762 	},
763 	{
764 		.test_descr = "CMAC Digest Verify 16B",
765 		.test_data = &cmac_test_vector,
766 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
767 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
768 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
769 	},
770 	{
771 		.test_descr = "NULL algo - auth generate",
772 		.test_data = &null_auth_test_vector,
773 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
774 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_NULL |
775 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
776 	},
777 	{
778 		.test_descr = "NULL algo - auth verify",
779 		.test_data = &null_auth_test_vector,
780 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
781 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_NULL |
782 			BLOCKCIPHER_TEST_TARGET_PMD_QAT
783 	},
784 	{
785 		.test_descr = "NULL algo - auth generate - OOP",
786 		.test_data = &null_auth_test_vector,
787 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
788 		.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
789 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
790 	},
791 	{
792 		.test_descr = "NULL algo - auth verify - OOP",
793 		.test_data = &null_auth_test_vector,
794 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
795 		.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
796 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
797 	},
798 
799 };
800 
801 #endif /* TEST_CRYPTODEV_HASH_TEST_VECTORS_H_ */
802