cryptodev_crypt_op_t

CIOCCRYPT command

Synopsis:

#include <dev/crypto/cryptodev.h>
struct crypt_op {
    uint64_t ses;
    uint16_t op;
    uint16_t flags;
    uint32_t len;
    uint8_t* src;
    uint8_t* dst;
    uint8_t* mac;
    uint8_t* iv;
} cryptodev_crypt_op_t;

Data:

uint64_t ses

The session identifier. See cryptodev_session_op_t.

uint16_t op

COP_ENCRYPT or COP_DECRYPT. See Cryptography device operations.

uint16_t flags

See Cryptography device CIOCCRYPT command flags.

uint32_t len

The input or output data length.

uint8_t* src

The input data buffer.

uint8_t* dst

The output data buffer.

uint8_t* mac

The hash or MAC output buffer.

uint8_t* iv

The initialization vector for the encryption or decryption operation.

Library:

devcr

Description:

This command is used for the following cryptography operations:
  • Ciphers (except AEAD, which is handled by cryptodev_crypt_auth_op_t)
  • Cipher and Message Authenticated Code (MAC) combinations
  • Digests
  • MAC