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