diff options
author | Pablo de Lara <pablo.de.lara.guarch@intel.com> | 2016-06-20 15:40:04 +0100 |
---|---|---|
committer | Thomas Monjalon <thomas.monjalon@6wind.com> | 2016-06-20 22:25:32 +0200 |
commit | 2773c86d061a11a920a00d96fe98634956782250 (patch) | |
tree | 046067420be82ee73c3fbc32d8202e66c0ca7b72 /examples | |
parent | ce3eee49fe3a1df3625e2b94415d4889b65b4443 (diff) | |
download | dpdk-2773c86d061a11a920a00d96fe98634956782250.zip dpdk-2773c86d061a11a920a00d96fe98634956782250.tar.gz dpdk-2773c86d061a11a920a00d96fe98634956782250.tar.xz |
crypto/kasumi: add driver for KASUMI library
Added new SW PMD which makes use of the libsso_kasumi SW library,
which provides wireless algorithms KASUMI F8 and F9
in software.
This PMD supports cipher-only, hash-only and chained operations
("cipher then hash" and "hash then cipher") of the following
algorithms:
- RTE_CRYPTO_SYM_CIPHER_KASUMI_F8
- RTE_CRYPTO_SYM_AUTH_KASUMI_F9
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/l2fwd-crypto/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index e539559..8dc616d 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -349,6 +349,7 @@ fill_supported_algorithm_tables(void) strcpy(supported_auth_algo[RTE_CRYPTO_AUTH_SHA384_HMAC], "SHA384_HMAC"); strcpy(supported_auth_algo[RTE_CRYPTO_AUTH_SHA512_HMAC], "SHA512_HMAC"); strcpy(supported_auth_algo[RTE_CRYPTO_AUTH_SNOW3G_UIA2], "SNOW3G_UIA2"); + strcpy(supported_auth_algo[RTE_CRYPTO_AUTH_KASUMI_F9], "KASUMI_F9"); for (i = 0; i < RTE_CRYPTO_CIPHER_LIST_END; i++) strcpy(supported_cipher_algo[i], "NOT_SUPPORTED"); @@ -358,6 +359,7 @@ fill_supported_algorithm_tables(void) strcpy(supported_cipher_algo[RTE_CRYPTO_CIPHER_AES_GCM], "AES_GCM"); strcpy(supported_cipher_algo[RTE_CRYPTO_CIPHER_NULL], "NULL"); strcpy(supported_cipher_algo[RTE_CRYPTO_CIPHER_SNOW3G_UEA2], "SNOW3G_UEA2"); + strcpy(supported_cipher_algo[RTE_CRYPTO_CIPHER_KASUMI_F8], "KASUMI_F8"); } @@ -466,8 +468,9 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m, rte_pktmbuf_pkt_len(m) - cparams->digest_length); op->sym->auth.digest.length = cparams->digest_length; - /* For SNOW3G algorithms, offset/length must be in bits */ - if (cparams->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2) { + /* For SNOW3G/KASUMI algorithms, offset/length must be in bits */ + if (cparams->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 || + cparams->auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9) { op->sym->auth.data.offset = ipdata_offset << 3; op->sym->auth.data.length = data_len << 3; } else { @@ -488,7 +491,8 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m, op->sym->cipher.iv.length = cparams->iv.length; /* For SNOW3G algorithms, offset/length must be in bits */ - if (cparams->cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2) { + if (cparams->cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 || + cparams->cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8) { op->sym->cipher.data.offset = ipdata_offset << 3; if (cparams->do_hash && cparams->hash_verify) /* Do not cipher the hash tag */ |