1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2019 Intel Corporation
5 #ifndef _QAT_SYM_CAPABILITIES_H_
6 #define _QAT_SYM_CAPABILITIES_H_
8 #define QAT_BASE_GEN1_SYM_CAPABILITIES \
10 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
12 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
14 .algo = RTE_CRYPTO_AUTH_SHA1, \
31 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
33 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
35 .algo = RTE_CRYPTO_AUTH_SHA224, \
52 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
54 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
56 .algo = RTE_CRYPTO_AUTH_SHA256, \
73 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
75 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
77 .algo = RTE_CRYPTO_AUTH_SHA384, \
94 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
96 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
98 .algo = RTE_CRYPTO_AUTH_SHA512, \
115 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
117 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
119 .algo = RTE_CRYPTO_AUTH_SHA1_HMAC, \
135 { /* SHA224 HMAC */ \
136 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
138 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
140 .algo = RTE_CRYPTO_AUTH_SHA224_HMAC, \
156 { /* SHA256 HMAC */ \
157 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
159 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
161 .algo = RTE_CRYPTO_AUTH_SHA256_HMAC, \
177 { /* SHA384 HMAC */ \
178 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
180 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
182 .algo = RTE_CRYPTO_AUTH_SHA384_HMAC, \
198 { /* SHA512 HMAC */ \
199 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
201 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
203 .algo = RTE_CRYPTO_AUTH_SHA512_HMAC, \
220 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
222 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
224 .algo = RTE_CRYPTO_AUTH_MD5_HMAC, \
240 { /* AES XCBC MAC */ \
241 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
243 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
245 .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC, \
263 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
265 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
267 .algo = RTE_CRYPTO_AUTH_AES_CMAC, \
283 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
285 .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD, \
287 .algo = RTE_CRYPTO_AEAD_AES_CCM, \
313 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
315 .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD, \
317 .algo = RTE_CRYPTO_AEAD_AES_GCM, \
342 { /* AES GMAC (AUTH) */ \
343 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
345 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
347 .algo = RTE_CRYPTO_AUTH_AES_GMAC, \
367 { /* SNOW 3G (UIA2) */ \
368 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
370 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
372 .algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, \
393 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
395 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
397 .algo = RTE_CRYPTO_CIPHER_AES_CBC, \
413 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
415 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
417 .algo = RTE_CRYPTO_CIPHER_AES_XTS, \
432 { /* AES DOCSIS BPI */ \
433 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
435 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
437 .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI,\
452 { /* SNOW 3G (UEA2) */ \
453 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
455 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
457 .algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, \
473 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
475 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
477 .algo = RTE_CRYPTO_CIPHER_AES_CTR, \
492 { /* NULL (AUTH) */ \
493 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
495 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
497 .algo = RTE_CRYPTO_AUTH_NULL, \
513 { /* NULL (CIPHER) */ \
514 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
516 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
518 .algo = RTE_CRYPTO_CIPHER_NULL, \
533 { /* KASUMI (F8) */ \
534 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
536 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
538 .algo = RTE_CRYPTO_CIPHER_KASUMI_F8, \
553 { /* KASUMI (F9) */ \
554 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
556 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
558 .algo = RTE_CRYPTO_AUTH_KASUMI_F9, \
575 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
577 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
579 .algo = RTE_CRYPTO_CIPHER_3DES_CBC, \
595 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
597 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
599 .algo = RTE_CRYPTO_CIPHER_3DES_CTR, \
615 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
617 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
619 .algo = RTE_CRYPTO_CIPHER_DES_CBC, \
634 { /* DES DOCSISBPI */ \
635 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
637 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
639 .algo = RTE_CRYPTO_CIPHER_DES_DOCSISBPI,\
655 #define QAT_EXTRA_GEN2_SYM_CAPABILITIES \
657 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
659 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
661 .algo = RTE_CRYPTO_CIPHER_ZUC_EEA3, \
677 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
679 .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
681 .algo = RTE_CRYPTO_AUTH_ZUC_EIA3, \
702 #define QAT_EXTRA_GEN3_SYM_CAPABILITIES \
703 { /* Chacha20-Poly1305 */ \
704 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
706 .xform_type = RTE_CRYPTO_SYM_XFORM_AEAD, \
708 .algo = RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \
734 #ifdef RTE_LIBRTE_SECURITY
735 #define QAT_SECURITY_SYM_CAPABILITIES \
736 { /* AES DOCSIS BPI */ \
737 .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, \
739 .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, \
741 .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI,\
757 #define QAT_SECURITY_CAPABILITIES(sym) \
758 [0] = { /* DOCSIS Uplink */ \
759 .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, \
760 .protocol = RTE_SECURITY_PROTOCOL_DOCSIS, \
762 .direction = RTE_SECURITY_DOCSIS_UPLINK \
764 .crypto_capabilities = (sym) \
766 [1] = { /* DOCSIS Downlink */ \
767 .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, \
768 .protocol = RTE_SECURITY_PROTOCOL_DOCSIS, \
770 .direction = RTE_SECURITY_DOCSIS_DOWNLINK \
772 .crypto_capabilities = (sym) \
776 #endif /* _QAT_SYM_CAPABILITIES_H_ */