1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct aead_alg</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API"><link rel="up" href="ch05s02.html" title="Block Cipher Algorithm Definitions"><link rel="prev" href="API-struct-ablkcipher-alg.html" title="struct ablkcipher_alg"><link rel="next" href="API-struct-blkcipher-alg.html" title="struct blkcipher_alg"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct aead_alg</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-ablkcipher-alg.html">Prev</a> </td><th width="60%" align="center">Block Cipher Algorithm Definitions</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-blkcipher-alg.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-aead-alg"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct aead_alg — 2 AEAD cipher definition 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct aead_alg { 5 int (* setkey) (struct crypto_aead *tfm, const u8 *key,unsigned int keylen); 6 int (* setauthsize) (struct crypto_aead *tfm, unsigned int authsize); 7 int (* encrypt) (struct aead_request *req); 8 int (* decrypt) (struct aead_request *req); 9 int (* givencrypt) (struct aead_givcrypt_request *req); 10 int (* givdecrypt) (struct aead_givcrypt_request *req); 11 const char * geniv; 12 unsigned int ivsize; 13 unsigned int maxauthsize; 14}; </pre></div><div class="refsect1"><a name="idp1097446948"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">setkey</span></dt><dd><p> 15see struct ablkcipher_alg 16 </p></dd><dt><span class="term">setauthsize</span></dt><dd><p> 17Set authentication size for the AEAD transformation. This 18function is used to specify the consumer requested size of the 19authentication tag to be either generated by the transformation 20during encryption or the size of the authentication tag to be 21supplied during the decryption operation. This function is also 22responsible for checking the authentication tag size for 23validity. 24 </p></dd><dt><span class="term">encrypt</span></dt><dd><p> 25see struct ablkcipher_alg 26 </p></dd><dt><span class="term">decrypt</span></dt><dd><p> 27see struct ablkcipher_alg 28 </p></dd><dt><span class="term">givencrypt</span></dt><dd><p> 29see struct ablkcipher_alg 30 </p></dd><dt><span class="term">givdecrypt</span></dt><dd><p> 31see struct ablkcipher_alg 32 </p></dd><dt><span class="term">geniv</span></dt><dd><p> 33see struct ablkcipher_alg 34 </p></dd><dt><span class="term">ivsize</span></dt><dd><p> 35see struct ablkcipher_alg 36 </p></dd><dt><span class="term">maxauthsize</span></dt><dd><p> 37Set the maximum authentication tag size supported by the 38transformation. A transformation may support smaller tag sizes. 39As the authentication tag is a message digest to ensure the 40integrity of the encrypted data, a consumer typically wants the 41largest authentication tag possible as defined by this 42variable. 43 </p></dd></dl></div></div><div class="refsect1"><a name="idp1097454164"></a><h2>Description</h2><p> 44 All fields except <em class="parameter"><code>givencrypt</code></em> , <em class="parameter"><code>givdecrypt</code></em> , <em class="parameter"><code>geniv</code></em> and <em class="parameter"><code>ivsize</code></em> are 45 mandatory and must be filled. 46</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-ablkcipher-alg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch05s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-blkcipher-alg.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct ablkcipher_alg</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct blkcipher_alg</span></td></tr></table></div></body></html> 47