CIOCGSESSION command
#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;
The cipher algorithm. See Cryptography device algorithms.
The MAC algorithm. See Cryptography device algorithms.
The cipher key length.
The cipher key.
The MAC key length.
The MAC key.
The session identifier.
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.