1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct blkcipher_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-aead-alg.html" title="struct aead_alg"><link rel="next" href="API-struct-cipher-alg.html" title="struct cipher_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 blkcipher_alg</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-aead-alg.html">Prev</a>&#160;</td><th width="60%" align="center">Block Cipher Algorithm Definitions</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-struct-cipher-alg.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-blkcipher-alg"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct blkcipher_alg &#8212; 
2  synchronous block cipher definition
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct blkcipher_alg {
5  int (* setkey) (struct crypto_tfm *tfm, const u8 *key,unsigned int keylen);
6  int (* encrypt) (struct blkcipher_desc *desc,struct scatterlist *dst, struct scatterlist *src,unsigned int nbytes);
7  int (* decrypt) (struct blkcipher_desc *desc,struct scatterlist *dst, struct scatterlist *src,unsigned int nbytes);
8  const char * geniv;
9  unsigned int min_keysize;
10  unsigned int max_keysize;
11  unsigned int ivsize;
12};  </pre></div><div class="refsect1"><a name="idp1097459956"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">setkey</span></dt><dd><p>
13see struct ablkcipher_alg
14      </p></dd><dt><span class="term">encrypt</span></dt><dd><p>
15see struct ablkcipher_alg
16      </p></dd><dt><span class="term">decrypt</span></dt><dd><p>
17see struct ablkcipher_alg
18      </p></dd><dt><span class="term">geniv</span></dt><dd><p>
19see struct ablkcipher_alg
20      </p></dd><dt><span class="term">min_keysize</span></dt><dd><p>
21see struct ablkcipher_alg
22      </p></dd><dt><span class="term">max_keysize</span></dt><dd><p>
23see struct ablkcipher_alg
24      </p></dd><dt><span class="term">ivsize</span></dt><dd><p>
25see struct ablkcipher_alg
26      </p></dd></dl></div></div><div class="refsect1"><a name="idp1097465292"></a><h2>Description</h2><p>
27   All fields except <em class="parameter"><code>geniv</code></em> and <em class="parameter"><code>ivsize</code></em> are mandatory and must be filled.
28</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-aead-alg.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch05s02.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-struct-cipher-alg.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct aead_alg</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">struct cipher_alg</span></td></tr></table></div></body></html>
29