Name

struct aead_alg — AEAD cipher definition

Synopsis

struct aead_alg {
  int (* setkey) (struct crypto_aead *tfm, const u8 *key,unsigned int keylen);
  int (* setauthsize) (struct crypto_aead *tfm, unsigned int authsize);
  int (* encrypt) (struct aead_request *req);
  int (* decrypt) (struct aead_request *req);
  int (* givencrypt) (struct aead_givcrypt_request *req);
  int (* givdecrypt) (struct aead_givcrypt_request *req);
  const char * geniv;
  unsigned int ivsize;
  unsigned int maxauthsize;
};  

Members

setkey

see struct ablkcipher_alg

setauthsize

Set authentication size for the AEAD transformation. This function is used to specify the consumer requested size of the authentication tag to be either generated by the transformation during encryption or the size of the authentication tag to be supplied during the decryption operation. This function is also responsible for checking the authentication tag size for validity.

encrypt

see struct ablkcipher_alg

decrypt

see struct ablkcipher_alg

givencrypt

see struct ablkcipher_alg

givdecrypt

see struct ablkcipher_alg

geniv

see struct ablkcipher_alg

ivsize

see struct ablkcipher_alg

maxauthsize

Set the maximum authentication tag size supported by the transformation. A transformation may support smaller tag sizes. As the authentication tag is a message digest to ensure the integrity of the encrypted data, a consumer typically wants the largest authentication tag possible as defined by this variable.

Description

All fields except givencrypt , givdecrypt , geniv and ivsize are mandatory and must be filled.