cryptodev_session_op_t

Updated: April 19, 2023

CIOCGSESSION command

Synopsis:

#include <dev/crypto/cryptodev.h>
struct session_op {
    uint32_t cipher;
    uint32_t mac;
    uint32_t keylen;
    uint8_t* key;
    uint32_t mackeylen;
    uint8_t* mackey;
    uint64_t ses;
} cryptodev_session_op_t;

Data:

uint32_t cipher

The cipher algorithm. See Cryptography device algorithms.

uint32_t mac

The MAC algorithm. See Cryptography device algorithms.

uint32_t keylen

The cipher key length.

uint8_t* key

The cipher key.

uint32_t mackeylen

The MAC key length.

uint8_t* mackey

The MAC key.

uint64_t ses

The session identifier.

Library:

devcr

Description:

This command is used to initiate a session with devcrypto by specifying the algorithm a client wants to use.

If devcrypto doesn't support this algorithm, the ioctl() call returns -1 and errno is set to ENOTSUP. Any other error means that the cryptography device encountered another error internally.

Only specific combinations of MAC and ciphers are valid.