DPDK  2.2.0
Data Structures | Enumerations | Functions
rte_crypto.h File Reference
#include <rte_mbuf.h>
#include <rte_memory.h>
#include <rte_mempool.h>

Go to the source code of this file.

Data Structures

struct  rte_crypto_key
struct  rte_crypto_cipher_xform
struct  rte_crypto_auth_xform
struct  rte_crypto_xform
struct  rte_crypto_op

Enumerations

enum  rte_crypto_cipher_algorithm {
  RTE_CRYPTO_CIPHER_NULL = 1, RTE_CRYPTO_CIPHER_3DES_CBC, RTE_CRYPTO_CIPHER_3DES_CTR, RTE_CRYPTO_CIPHER_3DES_ECB,
  RTE_CRYPTO_CIPHER_AES_CBC, RTE_CRYPTO_CIPHER_AES_CCM, RTE_CRYPTO_CIPHER_AES_CTR, RTE_CRYPTO_CIPHER_AES_ECB,
  RTE_CRYPTO_CIPHER_AES_F8, RTE_CRYPTO_CIPHER_AES_GCM, RTE_CRYPTO_CIPHER_AES_XTS, RTE_CRYPTO_CIPHER_ARC4,
  RTE_CRYPTO_CIPHER_KASUMI_F8, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, RTE_CRYPTO_CIPHER_ZUC_EEA3
}
enum  rte_crypto_cipher_operation { RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_OP_DECRYPT }
enum  rte_crypto_auth_algorithm {
  RTE_CRYPTO_AUTH_NULL = 1, RTE_CRYPTO_AUTH_AES_CBC_MAC, RTE_CRYPTO_AUTH_AES_CCM, RTE_CRYPTO_AUTH_AES_CMAC,
  RTE_CRYPTO_AUTH_AES_GCM, RTE_CRYPTO_AUTH_AES_GMAC, RTE_CRYPTO_AUTH_AES_XCBC_MAC, RTE_CRYPTO_AUTH_KASUMI_F9,
  RTE_CRYPTO_AUTH_MD5, RTE_CRYPTO_AUTH_MD5_HMAC, RTE_CRYPTO_AUTH_SHA1, RTE_CRYPTO_AUTH_SHA1_HMAC,
  RTE_CRYPTO_AUTH_SHA224, RTE_CRYPTO_AUTH_SHA224_HMAC, RTE_CRYPTO_AUTH_SHA256, RTE_CRYPTO_AUTH_SHA256_HMAC,
  RTE_CRYPTO_AUTH_SHA384, RTE_CRYPTO_AUTH_SHA384_HMAC, RTE_CRYPTO_AUTH_SHA512, RTE_CRYPTO_AUTH_SHA512_HMAC,
  RTE_CRYPTO_AUTH_SNOW3G_UIA2, RTE_CRYPTO_AUTH_ZUC_EIA3
}
enum  rte_crypto_auth_operation { RTE_CRYPTO_AUTH_OP_VERIFY, RTE_CRYPTO_AUTH_OP_GENERATE }
enum  rte_crypto_xform_type { RTE_CRYPTO_XFORM_NOT_SPECIFIED = 0, RTE_CRYPTO_XFORM_AUTH, RTE_CRYPTO_XFORM_CIPHER }
enum  rte_crypto_op_sess_type { RTE_CRYPTO_OP_WITH_SESSION, RTE_CRYPTO_OP_SESSIONLESS }
enum  rte_crypto_op_status {
  RTE_CRYPTO_OP_STATUS_SUCCESS, RTE_CRYPTO_OP_STATUS_NO_SUBMITTED, RTE_CRYPTO_OP_STATUS_ENQUEUED, RTE_CRYPTO_OP_STATUS_AUTH_FAILED,
  RTE_CRYPTO_OP_STATUS_INVALID_ARGS, RTE_CRYPTO_OP_STATUS_ERROR
}

Functions

static void __rte_crypto_op_reset (struct rte_crypto_op *op)
static void rte_crypto_op_attach_session (struct rte_crypto_op *op, struct rte_cryptodev_session *sess)

Detailed Description

RTE Cryptographic Definitions

Defines symmetric cipher and authentication algorithms and modes, as well as supported symmetric crypto operation combinations.

Definition in file rte_crypto.h.

Enumeration Type Documentation

Symmetric Cipher Algorithms

Enumerator:
RTE_CRYPTO_CIPHER_NULL 

NULL cipher algorithm. No mode applies to the NULL algorithm.

RTE_CRYPTO_CIPHER_3DES_CBC 

Triple DES algorithm in CBC mode

RTE_CRYPTO_CIPHER_3DES_CTR 

Triple DES algorithm in CTR mode

RTE_CRYPTO_CIPHER_3DES_ECB 

Triple DES algorithm in ECB mode

RTE_CRYPTO_CIPHER_AES_CBC 

AES algorithm in CBC mode

RTE_CRYPTO_CIPHER_AES_CCM 

AES algorithm in CCM mode. When this cipher algorithm is used the RTE_CRYPTO_AUTH_AES_CCM element of the rte_crypto_hash_algorithm enum MUST be used to set up the related rte_crypto_auth_xform structure in the session context or in the op_params of the crypto operation structure in the case of a session-less crypto operation

RTE_CRYPTO_CIPHER_AES_CTR 

AES algorithm in Counter mode

RTE_CRYPTO_CIPHER_AES_ECB 

AES algorithm in ECB mode

RTE_CRYPTO_CIPHER_AES_F8 

AES algorithm in F8 mode

RTE_CRYPTO_CIPHER_AES_GCM 

AES algorithm in GCM mode. When this cipher algorithm is used the RTE_CRYPTO_AUTH_AES_GCM element of the rte_crypto_auth_algorithm enum MUST be used to set up the related rte_crypto_auth_setup_data structure in the session context or in the op_params of the crypto operation structure in the case of a session-less crypto operation.

RTE_CRYPTO_CIPHER_AES_XTS 

AES algorithm in XTS mode

RTE_CRYPTO_CIPHER_ARC4 

(A)RC4 cipher algorithm

RTE_CRYPTO_CIPHER_KASUMI_F8 

Kasumi algorithm in F8 mode

RTE_CRYPTO_CIPHER_SNOW3G_UEA2 

SNOW3G algorithm in UEA2 mode

RTE_CRYPTO_CIPHER_ZUC_EEA3 

ZUC algorithm in EEA3 mode

Definition at line 54 of file rte_crypto.h.

Symmetric Cipher Direction

Enumerator:
RTE_CRYPTO_CIPHER_OP_ENCRYPT 

Encrypt cipher operation

RTE_CRYPTO_CIPHER_OP_DECRYPT 

Decrypt cipher operation

Definition at line 106 of file rte_crypto.h.

Symmetric Authentication / Hash Algorithms

Enumerator:
RTE_CRYPTO_AUTH_NULL 

NULL hash algorithm.

RTE_CRYPTO_AUTH_AES_CBC_MAC 

AES-CBC-MAC algorithm. Only 128-bit keys are supported.

RTE_CRYPTO_AUTH_AES_CCM 

AES algorithm in CCM mode. This is an authenticated cipher. When this hash algorithm is used, the RTE_CRYPTO_CIPHER_AES_CCM element of the rte_crypto_cipher_algorithm enum MUST be used to set up the related rte_crypto_cipher_setup_data structure in the session context or the corresponding parameter in the crypto operation data structures op_params parameter MUST be set for a session-less crypto operation.

RTE_CRYPTO_AUTH_AES_CMAC 

AES CMAC algorithm.

RTE_CRYPTO_AUTH_AES_GCM 

AES algorithm in GCM mode. When this hash algorithm is used, the RTE_CRYPTO_CIPHER_AES_GCM element of the rte_crypto_cipher_algorithm enum MUST be used to set up the related rte_crypto_cipher_setup_data structure in the session context, or the corresponding parameter in the crypto operation data structures op_params parameter MUST be set for a session-less crypto operation.

RTE_CRYPTO_AUTH_AES_GMAC 

AES GMAC algorithm. When this hash algorithm is used, the RTE_CRYPTO_CIPHER_AES_GCM element of the rte_crypto_cipher_algorithm enum MUST be used to set up the related rte_crypto_cipher_setup_data structure in the session context, or the corresponding parameter in the crypto operation data structures op_params parameter MUST be set for a session-less crypto operation.

RTE_CRYPTO_AUTH_AES_XCBC_MAC 

AES XCBC algorithm.

RTE_CRYPTO_AUTH_KASUMI_F9 

Kasumi algorithm in F9 mode.

RTE_CRYPTO_AUTH_MD5 

MD5 algorithm

RTE_CRYPTO_AUTH_MD5_HMAC 

HMAC using MD5 algorithm

RTE_CRYPTO_AUTH_SHA1 

128 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA1_HMAC 

HMAC using 128 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA224 

224 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA224_HMAC 

HMAC using 224 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA256 

256 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA256_HMAC 

HMAC using 256 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA384 

384 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA384_HMAC 

HMAC using 384 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA512 

512 bit SHA algorithm.

RTE_CRYPTO_AUTH_SHA512_HMAC 

HMAC using 512 bit SHA algorithm.

RTE_CRYPTO_AUTH_SNOW3G_UIA2 

SNOW3G algorithm in UIA2 mode.

RTE_CRYPTO_AUTH_ZUC_EIA3 

ZUC algorithm in EIA3 mode

Definition at line 168 of file rte_crypto.h.

Symmetric Authentication / Hash Operations

Enumerator:
RTE_CRYPTO_AUTH_OP_VERIFY 

Verify authentication digest

RTE_CRYPTO_AUTH_OP_GENERATE 

Generate authentication digest

Definition at line 241 of file rte_crypto.h.

Crypto transformation types

Enumerator:
RTE_CRYPTO_XFORM_NOT_SPECIFIED 

No xform specified

RTE_CRYPTO_XFORM_AUTH 

Authentication xform

RTE_CRYPTO_XFORM_CIPHER 

Cipher xform

Definition at line 309 of file rte_crypto.h.

Crypto operation session type. This is used to specify whether a crypto operation has session structure attached for immutable parameters or if all operation information is included in the operation data structure.

Enumerator:
RTE_CRYPTO_OP_WITH_SESSION 

Session based crypto operation

RTE_CRYPTO_OP_SESSIONLESS 

Session-less crypto operation

Definition at line 341 of file rte_crypto.h.

Status of crypto operation

Enumerator:
RTE_CRYPTO_OP_STATUS_SUCCESS 

Operation completed successfully

RTE_CRYPTO_OP_STATUS_NO_SUBMITTED 

Operation not yet submitted to a cryptodev

RTE_CRYPTO_OP_STATUS_ENQUEUED 

Operation is enqueued on device

RTE_CRYPTO_OP_STATUS_AUTH_FAILED 

Authentication verification failed

RTE_CRYPTO_OP_STATUS_INVALID_ARGS 

Operation failed due to invalid arguments in request

RTE_CRYPTO_OP_STATUS_ERROR 

Error handling operation

Definition at line 347 of file rte_crypto.h.

Function Documentation

static void __rte_crypto_op_reset ( struct rte_crypto_op op)
inlinestatic

Reset the fields of a crypto operation to their default values.

Parameters
opThe crypto operation to be reset.

Definition at line 590 of file rte_crypto.h.

static void rte_crypto_op_attach_session ( struct rte_crypto_op op,
struct rte_cryptodev_session *  sess 
)
inlinestatic

Attach a session to a crypto operation

Examples:
l2fwd-crypto/main.c.

Definition at line 599 of file rte_crypto.h.