Scroll to navigation

STRUCT AEAD_ALG(9) Programming Interface STRUCT AEAD_ALG(9)

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 (* init) (struct crypto_aead *tfm);
  void (* exit) (struct crypto_aead *tfm);
  const char * geniv;
  unsigned int ivsize;
  unsigned int maxauthsize;
  unsigned int chunksize;
  struct crypto_alg base;
};  

MEMBERS

setkey
see struct skcipher_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 skcipher_alg
decrypt
see struct skcipher_alg
init
Initialize the cryptographic transformation object. This function is used to initialize the cryptographic transformation object. This function is called only once at the instantiation time, right after the transformation context was allocated. In case the cryptographic hardware has some special requirements which need to be handled by software, this function shall check for the precise requirement of the transformation and put any software fallbacks in place.
exit
Deinitialize the cryptographic transformation object. This is a counterpart to init, used to remove various changes set in init.
geniv
see struct skcipher_alg
ivsize
see struct skcipher_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.
chunksize
see struct skcipher_alg
base
Definition of a generic crypto cipher algorithm.

DESCRIPTION

All fields except ivsize is mandatory and must be filled.

AUTHORS

Stephan Mueller <smueller@chronox.de>
Author.
Marek Vasut <marek@denx.de>
Author.

COPYRIGHT

January 2017 Kernel Hackers Manual 4.8.