crypto/octeontx2: move capabilities init into probe
[dpdk.git] / drivers / crypto / qat / qat_sym_capabilities.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017-2019 Intel Corporation
3  */
4
5 #ifndef _QAT_SYM_CAPABILITIES_H_
6 #define _QAT_SYM_CAPABILITIES_H_
7
8 #define QAT_BASE_GEN1_SYM_CAPABILITIES                                  \
9         {       /* SHA1 */                                              \
10                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
11                 {.sym = {                                               \
12                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
13                         {.auth = {                                      \
14                                 .algo = RTE_CRYPTO_AUTH_SHA1,           \
15                                 .block_size = 64,                       \
16                                 .key_size = {                           \
17                                         .min = 0,                       \
18                                         .max = 0,                       \
19                                         .increment = 0                  \
20                                 },                                      \
21                                 .digest_size = {                        \
22                                         .min = 1,                       \
23                                         .max = 20,                      \
24                                         .increment = 1                  \
25                                 },                                      \
26                                 .iv_size = { 0 }                        \
27                         }, }                                            \
28                 }, }                                                    \
29         },                                                              \
30         {       /* SHA224 */                                            \
31                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
32                 {.sym = {                                               \
33                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
34                         {.auth = {                                      \
35                                 .algo = RTE_CRYPTO_AUTH_SHA224,         \
36                                 .block_size = 64,                       \
37                                 .key_size = {                           \
38                                         .min = 0,                       \
39                                         .max = 0,                       \
40                                         .increment = 0                  \
41                                 },                                      \
42                                 .digest_size = {                        \
43                                         .min = 1,                       \
44                                         .max = 28,                      \
45                                         .increment = 1                  \
46                                 },                                      \
47                                 .iv_size = { 0 }                        \
48                         }, }                                            \
49                 }, }                                                    \
50         },                                                              \
51         {       /* SHA256 */                                            \
52                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
53                 {.sym = {                                               \
54                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
55                         {.auth = {                                      \
56                                 .algo = RTE_CRYPTO_AUTH_SHA256,         \
57                                 .block_size = 64,                       \
58                                 .key_size = {                           \
59                                         .min = 0,                       \
60                                         .max = 0,                       \
61                                         .increment = 0                  \
62                                 },                                      \
63                                 .digest_size = {                        \
64                                         .min = 1,                       \
65                                         .max = 32,                      \
66                                         .increment = 1                  \
67                                 },                                      \
68                                 .iv_size = { 0 }                        \
69                         }, }                                            \
70                 }, }                                                    \
71         },                                                              \
72         {       /* SHA384 */                                            \
73                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
74                 {.sym = {                                               \
75                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
76                         {.auth = {                                      \
77                                 .algo = RTE_CRYPTO_AUTH_SHA384,         \
78                                 .block_size = 128,                      \
79                                 .key_size = {                           \
80                                         .min = 0,                       \
81                                         .max = 0,                       \
82                                         .increment = 0                  \
83                                 },                                      \
84                                 .digest_size = {                        \
85                                         .min = 1,                       \
86                                         .max = 48,                      \
87                                         .increment = 1                  \
88                                 },                                      \
89                                 .iv_size = { 0 }                        \
90                         }, }                                            \
91                 }, }                                                    \
92         },                                                              \
93         {       /* SHA512 */                                            \
94                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
95                 {.sym = {                                               \
96                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
97                         {.auth = {                                      \
98                                 .algo = RTE_CRYPTO_AUTH_SHA512,         \
99                                 .block_size = 128,                      \
100                                 .key_size = {                           \
101                                         .min = 0,                       \
102                                         .max = 0,                       \
103                                         .increment = 0                  \
104                                 },                                      \
105                                 .digest_size = {                        \
106                                         .min = 1,                       \
107                                         .max = 64,                      \
108                                         .increment = 1                  \
109                                 },                                      \
110                                 .iv_size = { 0 }                        \
111                         }, }                                            \
112                 }, }                                                    \
113         },                                                              \
114         {       /* SHA1 HMAC */                                         \
115                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
116                 {.sym = {                                               \
117                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
118                         {.auth = {                                      \
119                                 .algo = RTE_CRYPTO_AUTH_SHA1_HMAC,      \
120                                 .block_size = 64,                       \
121                                 .key_size = {                           \
122                                         .min = 1,                       \
123                                         .max = 64,                      \
124                                         .increment = 1                  \
125                                 },                                      \
126                                 .digest_size = {                        \
127                                         .min = 1,                       \
128                                         .max = 20,                      \
129                                         .increment = 1                  \
130                                 },                                      \
131                                 .iv_size = { 0 }                        \
132                         }, }                                            \
133                 }, }                                                    \
134         },                                                              \
135         {       /* SHA224 HMAC */                                       \
136                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
137                 {.sym = {                                               \
138                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
139                         {.auth = {                                      \
140                                 .algo = RTE_CRYPTO_AUTH_SHA224_HMAC,    \
141                                 .block_size = 64,                       \
142                                 .key_size = {                           \
143                                         .min = 1,                       \
144                                         .max = 64,                      \
145                                         .increment = 1                  \
146                                 },                                      \
147                                 .digest_size = {                        \
148                                         .min = 1,                       \
149                                         .max = 28,                      \
150                                         .increment = 1                  \
151                                 },                                      \
152                                 .iv_size = { 0 }                        \
153                         }, }                                            \
154                 }, }                                                    \
155         },                                                              \
156         {       /* SHA256 HMAC */                                       \
157                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
158                 {.sym = {                                               \
159                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
160                         {.auth = {                                      \
161                                 .algo = RTE_CRYPTO_AUTH_SHA256_HMAC,    \
162                                 .block_size = 64,                       \
163                                 .key_size = {                           \
164                                         .min = 1,                       \
165                                         .max = 64,                      \
166                                         .increment = 1                  \
167                                 },                                      \
168                                 .digest_size = {                        \
169                                         .min = 1,                       \
170                                         .max = 32,                      \
171                                         .increment = 1                  \
172                                 },                                      \
173                                 .iv_size = { 0 }                        \
174                         }, }                                            \
175                 }, }                                                    \
176         },                                                              \
177         {       /* SHA384 HMAC */                                       \
178                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
179                 {.sym = {                                               \
180                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
181                         {.auth = {                                      \
182                                 .algo = RTE_CRYPTO_AUTH_SHA384_HMAC,    \
183                                 .block_size = 128,                      \
184                                 .key_size = {                           \
185                                         .min = 1,                       \
186                                         .max = 128,                     \
187                                         .increment = 1                  \
188                                 },                                      \
189                                 .digest_size = {                        \
190                                         .min = 1,                       \
191                                         .max = 48,                      \
192                                         .increment = 1                  \
193                                 },                                      \
194                                 .iv_size = { 0 }                        \
195                         }, }                                            \
196                 }, }                                                    \
197         },                                                              \
198         {       /* SHA512 HMAC */                                       \
199                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
200                 {.sym = {                                               \
201                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
202                         {.auth = {                                      \
203                                 .algo = RTE_CRYPTO_AUTH_SHA512_HMAC,    \
204                                 .block_size = 128,                      \
205                                 .key_size = {                           \
206                                         .min = 1,                       \
207                                         .max = 128,                     \
208                                         .increment = 1                  \
209                                 },                                      \
210                                 .digest_size = {                        \
211                                         .min = 1,                       \
212                                         .max = 64,                      \
213                                         .increment = 1                  \
214                                 },                                      \
215                                 .iv_size = { 0 }                        \
216                         }, }                                            \
217                 }, }                                                    \
218         },                                                              \
219         {       /* MD5 HMAC */                                          \
220                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
221                 {.sym = {                                               \
222                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
223                         {.auth = {                                      \
224                                 .algo = RTE_CRYPTO_AUTH_MD5_HMAC,       \
225                                 .block_size = 64,                       \
226                                 .key_size = {                           \
227                                         .min = 1,                       \
228                                         .max = 64,                      \
229                                         .increment = 1                  \
230                                 },                                      \
231                                 .digest_size = {                        \
232                                         .min = 1,                       \
233                                         .max = 16,                      \
234                                         .increment = 1                  \
235                                 },                                      \
236                                 .iv_size = { 0 }                        \
237                         }, }                                            \
238                 }, }                                                    \
239         },                                                              \
240         {       /* AES XCBC MAC */                                      \
241                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
242                 {.sym = {                                               \
243                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
244                         {.auth = {                                      \
245                                 .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,   \
246                                 .block_size = 16,                       \
247                                 .key_size = {                           \
248                                         .min = 16,                      \
249                                         .max = 16,                      \
250                                         .increment = 0                  \
251                                 },                                      \
252                                 .digest_size = {                        \
253                                         .min = 12,                      \
254                                         .max = 12,                      \
255                                         .increment = 0                  \
256                                 },                                      \
257                                 .aad_size = { 0 },                      \
258                                 .iv_size = { 0 }                        \
259                         }, }                                            \
260                 }, }                                                    \
261         },                                                              \
262         {       /* AES CMAC */                                          \
263                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
264                 {.sym = {                                               \
265                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
266                         {.auth = {                                      \
267                                 .algo = RTE_CRYPTO_AUTH_AES_CMAC,       \
268                                 .block_size = 16,                       \
269                                 .key_size = {                           \
270                                         .min = 16,                      \
271                                         .max = 16,                      \
272                                         .increment = 0                  \
273                                 },                                      \
274                                 .digest_size = {                        \
275                                         .min = 4,                       \
276                                         .max = 16,                      \
277                                         .increment = 4                  \
278                                 }                                       \
279                         }, }                                            \
280                 }, }                                                    \
281         },                                                              \
282         {       /* AES CCM */                                           \
283                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
284                 {.sym = {                                               \
285                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,        \
286                         {.aead = {                                      \
287                                 .algo = RTE_CRYPTO_AEAD_AES_CCM,        \
288                                 .block_size = 16,                       \
289                                 .key_size = {                           \
290                                         .min = 16,                      \
291                                         .max = 16,                      \
292                                         .increment = 0                  \
293                                 },                                      \
294                                 .digest_size = {                        \
295                                         .min = 4,                       \
296                                         .max = 16,                      \
297                                         .increment = 2                  \
298                                 },                                      \
299                                 .aad_size = {                           \
300                                         .min = 0,                       \
301                                         .max = 224,                     \
302                                         .increment = 1                  \
303                                 },                                      \
304                                 .iv_size = {                            \
305                                         .min = 7,                       \
306                                         .max = 13,                      \
307                                         .increment = 1                  \
308                                 },                                      \
309                         }, }                                            \
310                 }, }                                                    \
311         },                                                              \
312         {       /* AES GCM */                                           \
313                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
314                 {.sym = {                                               \
315                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,        \
316                         {.aead = {                                      \
317                                 .algo = RTE_CRYPTO_AEAD_AES_GCM,        \
318                                 .block_size = 16,                       \
319                                 .key_size = {                           \
320                                         .min = 16,                      \
321                                         .max = 32,                      \
322                                         .increment = 8                  \
323                                 },                                      \
324                                 .digest_size = {                        \
325                                         .min = 8,                       \
326                                         .max = 16,                      \
327                                         .increment = 4                  \
328                                 },                                      \
329                                 .aad_size = {                           \
330                                         .min = 0,                       \
331                                         .max = 240,                     \
332                                         .increment = 1                  \
333                                 },                                      \
334                                 .iv_size = {                            \
335                                         .min = 0,                       \
336                                         .max = 12,                      \
337                                         .increment = 12                 \
338                                 },                                      \
339                         }, }                                            \
340                 }, }                                                    \
341         },                                                              \
342         {       /* AES GMAC (AUTH) */                                   \
343                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
344                 {.sym = {                                               \
345                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
346                         {.auth = {                                      \
347                                 .algo = RTE_CRYPTO_AUTH_AES_GMAC,       \
348                                 .block_size = 16,                       \
349                                 .key_size = {                           \
350                                         .min = 16,                      \
351                                         .max = 32,                      \
352                                         .increment = 8                  \
353                                 },                                      \
354                                 .digest_size = {                        \
355                                         .min = 8,                       \
356                                         .max = 16,                      \
357                                         .increment = 4                  \
358                                 },                                      \
359                                 .iv_size = {                            \
360                                         .min = 0,                       \
361                                         .max = 12,                      \
362                                         .increment = 12                 \
363                                 }                                       \
364                         }, }                                            \
365                 }, }                                                    \
366         },                                                              \
367         {       /* SNOW 3G (UIA2) */                                    \
368                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
369                 {.sym = {                                               \
370                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
371                         {.auth = {                                      \
372                                 .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,    \
373                                 .block_size = 16,                       \
374                                 .key_size = {                           \
375                                         .min = 16,                      \
376                                         .max = 16,                      \
377                                         .increment = 0                  \
378                                 },                                      \
379                                 .digest_size = {                        \
380                                         .min = 4,                       \
381                                         .max = 4,                       \
382                                         .increment = 0                  \
383                                 },                                      \
384                                 .iv_size = {                            \
385                                         .min = 16,                      \
386                                         .max = 16,                      \
387                                         .increment = 0                  \
388                                 }                                       \
389                         }, }                                            \
390                 }, }                                                    \
391         },                                                              \
392         {       /* AES CBC */                                           \
393                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
394                 {.sym = {                                               \
395                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
396                         {.cipher = {                                    \
397                                 .algo = RTE_CRYPTO_CIPHER_AES_CBC,      \
398                                 .block_size = 16,                       \
399                                 .key_size = {                           \
400                                         .min = 16,                      \
401                                         .max = 32,                      \
402                                         .increment = 8                  \
403                                 },                                      \
404                                 .iv_size = {                            \
405                                         .min = 16,                      \
406                                         .max = 16,                      \
407                                         .increment = 0                  \
408                                 }                                       \
409                         }, }                                            \
410                 }, }                                                    \
411         },                                                              \
412         {       /* AES XTS */                                   \
413                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
414                 {.sym = {                                               \
415                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
416                         {.cipher = {                                    \
417                                 .algo = RTE_CRYPTO_CIPHER_AES_XTS,      \
418                                 .block_size = 16,                       \
419                                 .key_size = {                           \
420                                         .min = 32,                      \
421                                         .max = 64,                      \
422                                         .increment = 32                 \
423                                 },                                      \
424                                 .iv_size = {                            \
425                                         .min = 16,                      \
426                                         .max = 16,                      \
427                                         .increment = 0                  \
428                                 }                                       \
429                         }, }                                            \
430                 }, }                                                    \
431         },                                                              \
432         {       /* AES DOCSIS BPI */                                    \
433                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
434                 {.sym = {                                               \
435                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
436                         {.cipher = {                                    \
437                                 .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI,\
438                                 .block_size = 16,                       \
439                                 .key_size = {                           \
440                                         .min = 16,                      \
441                                         .max = 32,                      \
442                                         .increment = 16                 \
443                                 },                                      \
444                                 .iv_size = {                            \
445                                         .min = 16,                      \
446                                         .max = 16,                      \
447                                         .increment = 0                  \
448                                 }                                       \
449                         }, }                                            \
450                 }, }                                                    \
451         },                                                              \
452         {       /* SNOW 3G (UEA2) */                                    \
453                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
454                 {.sym = {                                               \
455                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
456                         {.cipher = {                                    \
457                                 .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,  \
458                                 .block_size = 16,                       \
459                                 .key_size = {                           \
460                                         .min = 16,                      \
461                                         .max = 16,                      \
462                                         .increment = 0                  \
463                                 },                                      \
464                                 .iv_size = {                            \
465                                         .min = 16,                      \
466                                         .max = 16,                      \
467                                         .increment = 0                  \
468                                 }                                       \
469                         }, }                                            \
470                 }, }                                                    \
471         },                                                              \
472         {       /* AES CTR */                                           \
473                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
474                 {.sym = {                                               \
475                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
476                         {.cipher = {                                    \
477                                 .algo = RTE_CRYPTO_CIPHER_AES_CTR,      \
478                                 .block_size = 16,                       \
479                                 .key_size = {                           \
480                                         .min = 16,                      \
481                                         .max = 32,                      \
482                                         .increment = 8                  \
483                                 },                                      \
484                                 .iv_size = {                            \
485                                         .min = 16,                      \
486                                         .max = 16,                      \
487                                         .increment = 0                  \
488                                 }                                       \
489                         }, }                                            \
490                 }, }                                                    \
491         },                                                              \
492         {       /* NULL (AUTH) */                                       \
493                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
494                 {.sym = {                                               \
495                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
496                         {.auth = {                                      \
497                                 .algo = RTE_CRYPTO_AUTH_NULL,           \
498                                 .block_size = 1,                        \
499                                 .key_size = {                           \
500                                         .min = 0,                       \
501                                         .max = 0,                       \
502                                         .increment = 0                  \
503                                 },                                      \
504                                 .digest_size = {                        \
505                                         .min = 0,                       \
506                                         .max = 0,                       \
507                                         .increment = 0                  \
508                                 },                                      \
509                                 .iv_size = { 0 }                        \
510                         }, },                                           \
511                 }, },                                                   \
512         },                                                              \
513         {       /* NULL (CIPHER) */                                     \
514                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
515                 {.sym = {                                               \
516                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
517                         {.cipher = {                                    \
518                                 .algo = RTE_CRYPTO_CIPHER_NULL,         \
519                                 .block_size = 1,                        \
520                                 .key_size = {                           \
521                                         .min = 0,                       \
522                                         .max = 0,                       \
523                                         .increment = 0                  \
524                                 },                                      \
525                                 .iv_size = {                            \
526                                         .min = 0,                       \
527                                         .max = 0,                       \
528                                         .increment = 0                  \
529                                 }                                       \
530                         }, },                                           \
531                 }, }                                                    \
532         },                                                              \
533         {       /* KASUMI (F8) */                                       \
534                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
535                 {.sym = {                                               \
536                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
537                         {.cipher = {                                    \
538                                 .algo = RTE_CRYPTO_CIPHER_KASUMI_F8,    \
539                                 .block_size = 8,                        \
540                                 .key_size = {                           \
541                                         .min = 16,                      \
542                                         .max = 16,                      \
543                                         .increment = 0                  \
544                                 },                                      \
545                                 .iv_size = {                            \
546                                         .min = 8,                       \
547                                         .max = 8,                       \
548                                         .increment = 0                  \
549                                 }                                       \
550                         }, }                                            \
551                 }, }                                                    \
552         },                                                              \
553         {       /* KASUMI (F9) */                                       \
554                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
555                 {.sym = {                                               \
556                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
557                         {.auth = {                                      \
558                                 .algo = RTE_CRYPTO_AUTH_KASUMI_F9,      \
559                                 .block_size = 8,                        \
560                                 .key_size = {                           \
561                                         .min = 16,                      \
562                                         .max = 16,                      \
563                                         .increment = 0                  \
564                                 },                                      \
565                                 .digest_size = {                        \
566                                         .min = 4,                       \
567                                         .max = 4,                       \
568                                         .increment = 0                  \
569                                 },                                      \
570                                 .iv_size = { 0 }                        \
571                         }, }                                            \
572                 }, }                                                    \
573         },                                                              \
574         {       /* 3DES CBC */                                          \
575                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
576                 {.sym = {                                               \
577                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
578                         {.cipher = {                                    \
579                                 .algo = RTE_CRYPTO_CIPHER_3DES_CBC,     \
580                                 .block_size = 8,                        \
581                                 .key_size = {                           \
582                                         .min = 8,                       \
583                                         .max = 24,                      \
584                                         .increment = 8                  \
585                                 },                                      \
586                                 .iv_size = {                            \
587                                         .min = 8,                       \
588                                         .max = 8,                       \
589                                         .increment = 0                  \
590                                 }                                       \
591                         }, }                                            \
592                 }, }                                                    \
593         },                                                              \
594         {       /* 3DES CTR */                                          \
595                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
596                 {.sym = {                                               \
597                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
598                         {.cipher = {                                    \
599                                 .algo = RTE_CRYPTO_CIPHER_3DES_CTR,     \
600                                 .block_size = 8,                        \
601                                 .key_size = {                           \
602                                         .min = 16,                      \
603                                         .max = 24,                      \
604                                         .increment = 8                  \
605                                 },                                      \
606                                 .iv_size = {                            \
607                                         .min = 8,                       \
608                                         .max = 8,                       \
609                                         .increment = 0                  \
610                                 }                                       \
611                         }, }                                            \
612                 }, }                                                    \
613         },                                                              \
614         {       /* DES CBC */                                           \
615                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
616                 {.sym = {                                               \
617                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
618                         {.cipher = {                                    \
619                                 .algo = RTE_CRYPTO_CIPHER_DES_CBC,      \
620                                 .block_size = 8,                        \
621                                 .key_size = {                           \
622                                         .min = 8,                       \
623                                         .max = 8,                       \
624                                         .increment = 0                  \
625                                 },                                      \
626                                 .iv_size = {                            \
627                                         .min = 8,                       \
628                                         .max = 8,                       \
629                                         .increment = 0                  \
630                                 }                                       \
631                         }, }                                            \
632                 }, }                                                    \
633         },                                                              \
634         {       /* DES DOCSISBPI */                                     \
635                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
636                 {.sym = {                                               \
637                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
638                         {.cipher = {                                    \
639                                 .algo = RTE_CRYPTO_CIPHER_DES_DOCSISBPI,\
640                                 .block_size = 8,                        \
641                                 .key_size = {                           \
642                                         .min = 8,                       \
643                                         .max = 8,                       \
644                                         .increment = 0                  \
645                                 },                                      \
646                                 .iv_size = {                            \
647                                         .min = 8,                       \
648                                         .max = 8,                       \
649                                         .increment = 0                  \
650                                 }                                       \
651                         }, }                                            \
652                 }, }                                                    \
653         }
654
655 #define QAT_EXTRA_GEN2_SYM_CAPABILITIES                                 \
656         {       /* ZUC (EEA3) */                                        \
657                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
658                 {.sym = {                                               \
659                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
660                         {.cipher = {                                    \
661                                 .algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,     \
662                                 .block_size = 16,                       \
663                                 .key_size = {                           \
664                                         .min = 16,                      \
665                                         .max = 16,                      \
666                                         .increment = 0                  \
667                                 },                                      \
668                                 .iv_size = {                            \
669                                         .min = 16,                      \
670                                         .max = 16,                      \
671                                         .increment = 0                  \
672                                 }                                       \
673                         }, }                                            \
674                 }, }                                                    \
675         },                                                              \
676         {       /* ZUC (EIA3) */                                        \
677                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
678                 {.sym = {                                               \
679                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
680                         {.auth = {                                      \
681                                 .algo = RTE_CRYPTO_AUTH_ZUC_EIA3,       \
682                                 .block_size = 16,                       \
683                                 .key_size = {                           \
684                                         .min = 16,                      \
685                                         .max = 16,                      \
686                                         .increment = 0                  \
687                                 },                                      \
688                                 .digest_size = {                        \
689                                         .min = 4,                       \
690                                         .max = 4,                       \
691                                         .increment = 0                  \
692                                 },                                      \
693                                 .iv_size = {                            \
694                                         .min = 16,                      \
695                                         .max = 16,                      \
696                                         .increment = 0                  \
697                                 }                                       \
698                         }, }                                            \
699                 }, }                                                    \
700         }
701
702 #define QAT_EXTRA_GEN3_SYM_CAPABILITIES                                 \
703         {       /* Chacha20-Poly1305 */                                 \
704         .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
705                 {.sym = {                                               \
706                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,        \
707                         {.aead = {                                      \
708                                 .algo = RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \
709                                 .block_size = 64,                       \
710                                 .key_size = {                           \
711                                         .min = 32,                      \
712                                         .max = 32,                      \
713                                         .increment = 0                  \
714                                 },                                      \
715                                 .digest_size = {                        \
716                                         .min = 16,                      \
717                                         .max = 16,                      \
718                                         .increment = 0                  \
719                                 },                                      \
720                                 .aad_size = {                           \
721                                         .min = 0,                       \
722                                         .max = 240,                     \
723                                         .increment = 1                  \
724                                 },                                      \
725                                 .iv_size = {                            \
726                                         .min = 12,                      \
727                                         .max = 12,                      \
728                                         .increment = 0                  \
729                                 },                                      \
730                         }, }                                            \
731                 }, }                                                    \
732         }
733
734 #ifdef RTE_LIBRTE_SECURITY
735 #define QAT_SECURITY_SYM_CAPABILITIES                                   \
736         {       /* AES DOCSIS BPI */                                    \
737                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
738                 {.sym = {                                               \
739                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
740                         {.cipher = {                                    \
741                                 .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI,\
742                                 .block_size = 16,                       \
743                                 .key_size = {                           \
744                                         .min = 16,                      \
745                                         .max = 32,                      \
746                                         .increment = 16                 \
747                                 },                                      \
748                                 .iv_size = {                            \
749                                         .min = 16,                      \
750                                         .max = 16,                      \
751                                         .increment = 0                  \
752                                 }                                       \
753                         }, }                                            \
754                 }, }                                                    \
755         }
756
757 #define QAT_SECURITY_CAPABILITIES(sym)                                  \
758         [0] = { /* DOCSIS Uplink */                                     \
759                 .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,  \
760                 .protocol = RTE_SECURITY_PROTOCOL_DOCSIS,               \
761                 .docsis = {                                             \
762                         .direction = RTE_SECURITY_DOCSIS_UPLINK         \
763                 },                                                      \
764                 .crypto_capabilities = (sym)                            \
765         },                                                              \
766         [1] = { /* DOCSIS Downlink */                                   \
767                 .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,  \
768                 .protocol = RTE_SECURITY_PROTOCOL_DOCSIS,               \
769                 .docsis = {                                             \
770                         .direction = RTE_SECURITY_DOCSIS_DOWNLINK       \
771                 },                                                      \
772                 .crypto_capabilities = (sym)                            \
773         }
774 #endif
775
776 #endif /* _QAT_SYM_CAPABILITIES_H_ */