net/cxgbe: support updating RSS hash configuration and key
[dpdk.git] / drivers / crypto / qat / qat_crypto_capabilities.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4
5 #ifndef _QAT_CRYPTO_CAPABILITIES_H_
6 #define _QAT_CRYPTO_CAPABILITIES_H_
7
8 #define QAT_BASE_GEN1_SYM_CAPABILITIES                                  \
9         {       /* SHA1 HMAC */                                         \
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_HMAC,      \
15                                 .block_size = 64,                       \
16                                 .key_size = {                           \
17                                         .min = 1,                       \
18                                         .max = 64,                      \
19                                         .increment = 1                  \
20                                 },                                      \
21                                 .digest_size = {                        \
22                                         .min = 1,                       \
23                                         .max = 20,                      \
24                                         .increment = 1                  \
25                                 },                                      \
26                                 .iv_size = { 0 }                        \
27                         }, }                                            \
28                 }, }                                                    \
29         },                                                              \
30         {       /* SHA224 HMAC */                                       \
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_HMAC,    \
36                                 .block_size = 64,                       \
37                                 .key_size = {                           \
38                                         .min = 1,                       \
39                                         .max = 64,                      \
40                                         .increment = 1                  \
41                                 },                                      \
42                                 .digest_size = {                        \
43                                         .min = 1,                       \
44                                         .max = 28,                      \
45                                         .increment = 1                  \
46                                 },                                      \
47                                 .iv_size = { 0 }                        \
48                         }, }                                            \
49                 }, }                                                    \
50         },                                                              \
51         {       /* SHA256 HMAC */                                       \
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_HMAC,    \
57                                 .block_size = 64,                       \
58                                 .key_size = {                           \
59                                         .min = 1,                       \
60                                         .max = 64,                      \
61                                         .increment = 1                  \
62                                 },                                      \
63                                 .digest_size = {                        \
64                                         .min = 1,                       \
65                                         .max = 32,                      \
66                                         .increment = 1                  \
67                                 },                                      \
68                                 .iv_size = { 0 }                        \
69                         }, }                                            \
70                 }, }                                                    \
71         },                                                              \
72         {       /* SHA384 HMAC */                                       \
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_HMAC,    \
78                                 .block_size = 128,                      \
79                                 .key_size = {                           \
80                                         .min = 1,                       \
81                                         .max = 128,                     \
82                                         .increment = 1                  \
83                                 },                                      \
84                                 .digest_size = {                        \
85                                         .min = 1,                       \
86                                         .max = 48,                      \
87                                         .increment = 1                  \
88                                 },                                      \
89                                 .iv_size = { 0 }                        \
90                         }, }                                            \
91                 }, }                                                    \
92         },                                                              \
93         {       /* SHA512 HMAC */                                       \
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_HMAC,    \
99                                 .block_size = 128,                      \
100                                 .key_size = {                           \
101                                         .min = 1,                       \
102                                         .max = 128,                     \
103                                         .increment = 1                  \
104                                 },                                      \
105                                 .digest_size = {                        \
106                                         .min = 1,                       \
107                                         .max = 64,                      \
108                                         .increment = 1                  \
109                                 },                                      \
110                                 .iv_size = { 0 }                        \
111                         }, }                                            \
112                 }, }                                                    \
113         },                                                              \
114         {       /* MD5 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_MD5_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 = 16,                      \
129                                         .increment = 1                  \
130                                 },                                      \
131                                 .iv_size = { 0 }                        \
132                         }, }                                            \
133                 }, }                                                    \
134         },                                                              \
135         {       /* AES XCBC MAC */                                      \
136                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
137                 {.sym = {                                               \
138                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
139                         {.auth = {                                      \
140                                 .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,   \
141                                 .block_size = 16,                       \
142                                 .key_size = {                           \
143                                         .min = 16,                      \
144                                         .max = 16,                      \
145                                         .increment = 0                  \
146                                 },                                      \
147                                 .digest_size = {                        \
148                                         .min = 16,                      \
149                                         .max = 16,                      \
150                                         .increment = 0                  \
151                                 },                                      \
152                                 .aad_size = { 0 },                      \
153                                 .iv_size = { 0 }                        \
154                         }, }                                            \
155                 }, }                                                    \
156         },                                                              \
157         {       /* AES CCM */                                           \
158                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
159                 {.sym = {                                               \
160                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,        \
161                         {.aead = {                                      \
162                                 .algo = RTE_CRYPTO_AEAD_AES_CCM,        \
163                                 .block_size = 16,                       \
164                                 .key_size = {                           \
165                                         .min = 16,                      \
166                                         .max = 16,                      \
167                                         .increment = 0                  \
168                                 },                                      \
169                                 .digest_size = {                        \
170                                         .min = 4,                       \
171                                         .max = 16,                      \
172                                         .increment = 2                  \
173                                 },                                      \
174                                 .aad_size = {                           \
175                                         .min = 0,                       \
176                                         .max = 224,                     \
177                                         .increment = 1                  \
178                                 },                                      \
179                                 .iv_size = {                            \
180                                         .min = 7,                       \
181                                         .max = 13,                      \
182                                         .increment = 1                  \
183                                 },                                      \
184                         }, }                                            \
185                 }, }                                                    \
186         },                                                              \
187         {       /* AES GCM */                                           \
188                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
189                 {.sym = {                                               \
190                         .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,        \
191                         {.aead = {                                      \
192                                 .algo = RTE_CRYPTO_AEAD_AES_GCM,        \
193                                 .block_size = 16,                       \
194                                 .key_size = {                           \
195                                         .min = 16,                      \
196                                         .max = 32,                      \
197                                         .increment = 8                  \
198                                 },                                      \
199                                 .digest_size = {                        \
200                                         .min = 8,                       \
201                                         .max = 16,                      \
202                                         .increment = 4                  \
203                                 },                                      \
204                                 .aad_size = {                           \
205                                         .min = 0,                       \
206                                         .max = 240,                     \
207                                         .increment = 1                  \
208                                 },                                      \
209                                 .iv_size = {                            \
210                                         .min = 12,                      \
211                                         .max = 12,                      \
212                                         .increment = 0                  \
213                                 },                                      \
214                         }, }                                            \
215                 }, }                                                    \
216         },                                                              \
217         {       /* AES GMAC (AUTH) */                                   \
218                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
219                 {.sym = {                                               \
220                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
221                         {.auth = {                                      \
222                                 .algo = RTE_CRYPTO_AUTH_AES_GMAC,       \
223                                 .block_size = 16,                       \
224                                 .key_size = {                           \
225                                         .min = 16,                      \
226                                         .max = 32,                      \
227                                         .increment = 8                  \
228                                 },                                      \
229                                 .digest_size = {                        \
230                                         .min = 8,                       \
231                                         .max = 16,                      \
232                                         .increment = 4                  \
233                                 },                                      \
234                                 .iv_size = {                            \
235                                         .min = 12,                      \
236                                         .max = 12,                      \
237                                         .increment = 0                  \
238                                 }                                       \
239                         }, }                                            \
240                 }, }                                                    \
241         },                                                              \
242         {       /* SNOW 3G (UIA2) */                                    \
243                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
244                 {.sym = {                                               \
245                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
246                         {.auth = {                                      \
247                                 .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,    \
248                                 .block_size = 16,                       \
249                                 .key_size = {                           \
250                                         .min = 16,                      \
251                                         .max = 16,                      \
252                                         .increment = 0                  \
253                                 },                                      \
254                                 .digest_size = {                        \
255                                         .min = 4,                       \
256                                         .max = 4,                       \
257                                         .increment = 0                  \
258                                 },                                      \
259                                 .iv_size = {                            \
260                                         .min = 16,                      \
261                                         .max = 16,                      \
262                                         .increment = 0                  \
263                                 }                                       \
264                         }, }                                            \
265                 }, }                                                    \
266         },                                                              \
267         {       /* AES CBC */                                           \
268                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
269                 {.sym = {                                               \
270                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
271                         {.cipher = {                                    \
272                                 .algo = RTE_CRYPTO_CIPHER_AES_CBC,      \
273                                 .block_size = 16,                       \
274                                 .key_size = {                           \
275                                         .min = 16,                      \
276                                         .max = 32,                      \
277                                         .increment = 8                  \
278                                 },                                      \
279                                 .iv_size = {                            \
280                                         .min = 16,                      \
281                                         .max = 16,                      \
282                                         .increment = 0                  \
283                                 }                                       \
284                         }, }                                            \
285                 }, }                                                    \
286         },                                                              \
287         {       /* AES DOCSIS BPI */                                    \
288                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
289                 {.sym = {                                               \
290                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
291                         {.cipher = {                                    \
292                                 .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI,\
293                                 .block_size = 16,                       \
294                                 .key_size = {                           \
295                                         .min = 16,                      \
296                                         .max = 16,                      \
297                                         .increment = 0                  \
298                                 },                                      \
299                                 .iv_size = {                            \
300                                         .min = 16,                      \
301                                         .max = 16,                      \
302                                         .increment = 0                  \
303                                 }                                       \
304                         }, }                                            \
305                 }, }                                                    \
306         },                                                              \
307         {       /* SNOW 3G (UEA2) */                                    \
308                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
309                 {.sym = {                                               \
310                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
311                         {.cipher = {                                    \
312                                 .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,  \
313                                 .block_size = 16,                       \
314                                 .key_size = {                           \
315                                         .min = 16,                      \
316                                         .max = 16,                      \
317                                         .increment = 0                  \
318                                 },                                      \
319                                 .iv_size = {                            \
320                                         .min = 16,                      \
321                                         .max = 16,                      \
322                                         .increment = 0                  \
323                                 }                                       \
324                         }, }                                            \
325                 }, }                                                    \
326         },                                                              \
327         {       /* AES CTR */                                           \
328                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
329                 {.sym = {                                               \
330                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
331                         {.cipher = {                                    \
332                                 .algo = RTE_CRYPTO_CIPHER_AES_CTR,      \
333                                 .block_size = 16,                       \
334                                 .key_size = {                           \
335                                         .min = 16,                      \
336                                         .max = 32,                      \
337                                         .increment = 8                  \
338                                 },                                      \
339                                 .iv_size = {                            \
340                                         .min = 16,                      \
341                                         .max = 16,                      \
342                                         .increment = 0                  \
343                                 }                                       \
344                         }, }                                            \
345                 }, }                                                    \
346         },                                                              \
347         {       /* NULL (AUTH) */                                       \
348                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
349                 {.sym = {                                               \
350                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
351                         {.auth = {                                      \
352                                 .algo = RTE_CRYPTO_AUTH_NULL,           \
353                                 .block_size = 1,                        \
354                                 .key_size = {                           \
355                                         .min = 0,                       \
356                                         .max = 0,                       \
357                                         .increment = 0                  \
358                                 },                                      \
359                                 .digest_size = {                        \
360                                         .min = 0,                       \
361                                         .max = 0,                       \
362                                         .increment = 0                  \
363                                 },                                      \
364                                 .iv_size = { 0 }                        \
365                         }, },                                           \
366                 }, },                                                   \
367         },                                                              \
368         {       /* NULL (CIPHER) */                                     \
369                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
370                 {.sym = {                                               \
371                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
372                         {.cipher = {                                    \
373                                 .algo = RTE_CRYPTO_CIPHER_NULL,         \
374                                 .block_size = 1,                        \
375                                 .key_size = {                           \
376                                         .min = 0,                       \
377                                         .max = 0,                       \
378                                         .increment = 0                  \
379                                 },                                      \
380                                 .iv_size = {                            \
381                                         .min = 0,                       \
382                                         .max = 0,                       \
383                                         .increment = 0                  \
384                                 }                                       \
385                         }, },                                           \
386                 }, }                                                    \
387         },                                                              \
388         {       /* KASUMI (F8) */                                       \
389                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
390                 {.sym = {                                               \
391                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
392                         {.cipher = {                                    \
393                                 .algo = RTE_CRYPTO_CIPHER_KASUMI_F8,    \
394                                 .block_size = 8,                        \
395                                 .key_size = {                           \
396                                         .min = 16,                      \
397                                         .max = 16,                      \
398                                         .increment = 0                  \
399                                 },                                      \
400                                 .iv_size = {                            \
401                                         .min = 8,                       \
402                                         .max = 8,                       \
403                                         .increment = 0                  \
404                                 }                                       \
405                         }, }                                            \
406                 }, }                                                    \
407         },                                                              \
408         {       /* KASUMI (F9) */                                       \
409                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
410                 {.sym = {                                               \
411                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
412                         {.auth = {                                      \
413                                 .algo = RTE_CRYPTO_AUTH_KASUMI_F9,      \
414                                 .block_size = 8,                        \
415                                 .key_size = {                           \
416                                         .min = 16,                      \
417                                         .max = 16,                      \
418                                         .increment = 0                  \
419                                 },                                      \
420                                 .digest_size = {                        \
421                                         .min = 4,                       \
422                                         .max = 4,                       \
423                                         .increment = 0                  \
424                                 },                                      \
425                                 .iv_size = { 0 }                        \
426                         }, }                                            \
427                 }, }                                                    \
428         },                                                              \
429         {       /* 3DES CBC */                                          \
430                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
431                 {.sym = {                                               \
432                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
433                         {.cipher = {                                    \
434                                 .algo = RTE_CRYPTO_CIPHER_3DES_CBC,     \
435                                 .block_size = 8,                        \
436                                 .key_size = {                           \
437                                         .min = 16,                      \
438                                         .max = 24,                      \
439                                         .increment = 8                  \
440                                 },                                      \
441                                 .iv_size = {                            \
442                                         .min = 8,                       \
443                                         .max = 8,                       \
444                                         .increment = 0                  \
445                                 }                                       \
446                         }, }                                            \
447                 }, }                                                    \
448         },                                                              \
449         {       /* 3DES CTR */                                          \
450                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
451                 {.sym = {                                               \
452                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
453                         {.cipher = {                                    \
454                                 .algo = RTE_CRYPTO_CIPHER_3DES_CTR,     \
455                                 .block_size = 8,                        \
456                                 .key_size = {                           \
457                                         .min = 16,                      \
458                                         .max = 24,                      \
459                                         .increment = 8                  \
460                                 },                                      \
461                                 .iv_size = {                            \
462                                         .min = 8,                       \
463                                         .max = 8,                       \
464                                         .increment = 0                  \
465                                 }                                       \
466                         }, }                                            \
467                 }, }                                                    \
468         },                                                              \
469         {       /* DES CBC */                                           \
470                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
471                 {.sym = {                                               \
472                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
473                         {.cipher = {                                    \
474                                 .algo = RTE_CRYPTO_CIPHER_DES_CBC,      \
475                                 .block_size = 8,                        \
476                                 .key_size = {                           \
477                                         .min = 8,                       \
478                                         .max = 8,                       \
479                                         .increment = 0                  \
480                                 },                                      \
481                                 .iv_size = {                            \
482                                         .min = 8,                       \
483                                         .max = 8,                       \
484                                         .increment = 0                  \
485                                 }                                       \
486                         }, }                                            \
487                 }, }                                                    \
488         },                                                              \
489         {       /* DES DOCSISBPI */                                     \
490                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
491                 {.sym = {                                               \
492                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
493                         {.cipher = {                                    \
494                                 .algo = RTE_CRYPTO_CIPHER_DES_DOCSISBPI,\
495                                 .block_size = 8,                        \
496                                 .key_size = {                           \
497                                         .min = 8,                       \
498                                         .max = 8,                       \
499                                         .increment = 0                  \
500                                 },                                      \
501                                 .iv_size = {                            \
502                                         .min = 8,                       \
503                                         .max = 8,                       \
504                                         .increment = 0                  \
505                                 }                                       \
506                         }, }                                            \
507                 }, }                                                    \
508         }
509
510 #define QAT_EXTRA_GEN2_SYM_CAPABILITIES                                 \
511         {       /* ZUC (EEA3) */                                        \
512                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
513                 {.sym = {                                               \
514                         .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,      \
515                         {.cipher = {                                    \
516                                 .algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,     \
517                                 .block_size = 16,                       \
518                                 .key_size = {                           \
519                                         .min = 16,                      \
520                                         .max = 16,                      \
521                                         .increment = 0                  \
522                                 },                                      \
523                                 .iv_size = {                            \
524                                         .min = 16,                      \
525                                         .max = 16,                      \
526                                         .increment = 0                  \
527                                 }                                       \
528                         }, }                                            \
529                 }, }                                                    \
530         },                                                              \
531         {       /* ZUC (EIA3) */                                        \
532                 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,                     \
533                 {.sym = {                                               \
534                         .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,        \
535                         {.auth = {                                      \
536                                 .algo = RTE_CRYPTO_AUTH_ZUC_EIA3,       \
537                                 .block_size = 16,                       \
538                                 .key_size = {                           \
539                                         .min = 16,                      \
540                                         .max = 16,                      \
541                                         .increment = 0                  \
542                                 },                                      \
543                                 .digest_size = {                        \
544                                         .min = 4,                       \
545                                         .max = 4,                       \
546                                         .increment = 0                  \
547                                 },                                      \
548                                 .iv_size = {                            \
549                                         .min = 16,                      \
550                                         .max = 16,                      \
551                                         .increment = 0                  \
552                                 }                                       \
553                         }, }                                            \
554                 }, }                                                    \
555         }
556
557 #endif /* _QAT_CRYPTO_CAPABILITIES_H_ */