8 struct session_op sess
;
12 #define AES_BLOCK_SIZE 16
14 int aes_gcm_ctx_init(struct cryptodev_ctx
* ctx
, int cfd
, const uint8_t *key
, unsigned int key_size
);
15 void aes_gcm_ctx_deinit();
17 /* Note that encryption assumes that ciphertext has enough size
18 * for the tag to be appended. In decryption the tag is assumed
19 * to be the last bytes of ciphertext.
21 int aes_gcm_encrypt(struct cryptodev_ctx
* ctx
, const void* iv
,
22 const void* auth
, size_t auth_size
,
23 const void* plaintext
, void* ciphertext
, size_t size
);
24 int aes_gcm_decrypt(struct cryptodev_ctx
* ctx
, const void* iv
,
25 const void* auth
, size_t auth_size
,
26 const void* ciphertext
, void* plaintext
, size_t size
);