Changeset View
Changeset View
Standalone View
Standalone View
head/sys/opencrypto/cryptodev.h
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | |||||
#define CSP_MODE_CIPHER 2 /* Encrypt/decrypt. */ | #define CSP_MODE_CIPHER 2 /* Encrypt/decrypt. */ | ||||
#define CSP_MODE_DIGEST 3 /* Compute/verify digest. */ | #define CSP_MODE_DIGEST 3 /* Compute/verify digest. */ | ||||
#define CSP_MODE_AEAD 4 /* Combined auth/encryption. */ | #define CSP_MODE_AEAD 4 /* Combined auth/encryption. */ | ||||
#define CSP_MODE_ETA 5 /* IPsec style encrypt-then-auth */ | #define CSP_MODE_ETA 5 /* IPsec style encrypt-then-auth */ | ||||
int csp_flags; | int csp_flags; | ||||
#define CSP_F_SEPARATE_OUTPUT 0x0001 /* Requests can use separate output */ | #define CSP_F_SEPARATE_OUTPUT 0x0001 /* Requests can use separate output */ | ||||
#define CSP_F_SEPARATE_AAD 0x0002 /* Requests can use separate AAD */ | |||||
int csp_ivlen; /* IV length in bytes. */ | int csp_ivlen; /* IV length in bytes. */ | ||||
int csp_cipher_alg; | int csp_cipher_alg; | ||||
int csp_cipher_klen; /* Key length in bytes. */ | int csp_cipher_klen; /* Key length in bytes. */ | ||||
const void *csp_cipher_key; | const void *csp_cipher_key; | ||||
int csp_auth_alg; | int csp_auth_alg; | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | #define CRYPTO_F_ASYNC_KEEPORDER 0x0100 /* | ||||
*/ | */ | ||||
#define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ | #define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ | ||||
int crp_op; | int crp_op; | ||||
struct crypto_buffer crp_buf; | struct crypto_buffer crp_buf; | ||||
struct crypto_buffer crp_obuf; | struct crypto_buffer crp_obuf; | ||||
void *crp_aad; /* AAD buffer. */ | |||||
int crp_aad_start; /* Location of AAD. */ | int crp_aad_start; /* Location of AAD. */ | ||||
int crp_aad_length; /* 0 => no AAD. */ | int crp_aad_length; /* 0 => no AAD. */ | ||||
int crp_iv_start; /* Location of IV. IV length is from | int crp_iv_start; /* Location of IV. IV length is from | ||||
* the session. | * the session. | ||||
*/ | */ | ||||
int crp_payload_start; /* Location of ciphertext. */ | int crp_payload_start; /* Location of ciphertext. */ | ||||
int crp_payload_output_start; | int crp_payload_output_start; | ||||
int crp_payload_length; | int crp_payload_length; | ||||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |