1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Linux Kernel Crypto API</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API"><link rel="next" href="Intro.html" title="Chapter&#160;1.&#160;Kernel Crypto API Interface Specification"></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">Linux Kernel Crypto API</th></tr><tr><td width="20%" align="left">&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="Intro.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a name="KernelCryptoAPI"></a>Linux Kernel Crypto API</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Stephan</span> <span class="surname">Mueller</span></h3><div class="affiliation"><div class="address"><p><br>
2&#160;&#160;&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:smueller@chronox.de">smueller@chronox.de</a>&gt;</code><br>
3&#160;&#160;&#160;&#160;&#160;</p></div></div></div><div class="author"><h3 class="author"><span class="firstname">Marek</span> <span class="surname">Vasut</span></h3><div class="affiliation"><div class="address"><p><br>
4&#160;&#160;&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:marek@denx.de">marek@denx.de</a>&gt;</code><br>
5&#160;&#160;&#160;&#160;&#160;</p></div></div></div></div></div><div><p class="copyright">Copyright &#169; 2014 Stephan Mueller</p></div><div><div class="legalnotice"><a name="idp1096764372"></a><p>
6     This documentation is free software; you can redistribute
7     it and/or modify it under the terms of the GNU General Public
8     License as published by the Free Software Foundation; either
9     version 2 of the License, or (at your option) any later
10     version.
11   </p><p>
12     This program is distributed in the hope that it will be
13     useful, but WITHOUT ANY WARRANTY; without even the implied
14     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15     See the GNU General Public License for more details.
16   </p><p>
17     You should have received a copy of the GNU General Public
18     License along with this program; if not, write to the Free
19     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20     MA 02111-1307 USA
21   </p><p>
22     For more details see the file COPYING in the source
23     distribution of Linux.
24   </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="Intro.html">1. Kernel Crypto API Interface Specification</a></span></dt><dd><dl><dt><span class="sect1"><a href="Intro.html#idp1096767556">Introduction</a></span></dt><dt><span class="sect1"><a href="ch01s02.html">Terminology</a></span></dt></dl></dd><dt><span class="chapter"><a href="Architecture.html">2. Kernel Crypto API Architecture</a></span></dt><dd><dl><dt><span class="sect1"><a href="Architecture.html#idp1094533588">Cipher algorithm types</a></span></dt><dt><span class="sect1"><a href="ch02s02.html">Ciphers And Templates</a></span></dt><dt><span class="sect1"><a href="ch02s03.html">Synchronous And Asynchronous Operation</a></span></dt><dt><span class="sect1"><a href="ch02s04.html">Crypto API Cipher References And Priority</a></span></dt><dt><span class="sect1"><a href="ch02s05.html">Key Sizes</a></span></dt><dt><span class="sect1"><a href="ch02s06.html">Cipher Allocation Type And Masks</a></span></dt><dt><span class="sect1"><a href="ch02s07.html">Internal Structure of Kernel Crypto API</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s07.html#idp1094420740">Generic AEAD Cipher Structure</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#idp1094433436">Generic Block Cipher Structure</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#idp1094434500">Generic Keyed Message Digest Structure</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="Development.html">3. Developing Cipher Algorithms</a></span></dt><dd><dl><dt><span class="sect1"><a href="Development.html#idp1094439628">Registering And Unregistering Transformation</a></span></dt><dt><span class="sect1"><a href="ch03s02.html">Single-Block Symmetric Ciphers [CIPHER]</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s02.html#idp1094347492">Registration specifics</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#idp1094348476">Cipher Definition With struct cipher_alg</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">Multi-Block Ciphers [BLKCIPHER] [ABLKCIPHER]</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#idp1094352900">Registration Specifics</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#idp1097333636">Cipher Definition With struct blkcipher_alg and ablkcipher_alg</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#idp1097334796">Specifics Of Asynchronous Multi-Block Cipher</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">Hashing [HASH]</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s04.html#idp1097336588">Registering And Unregistering The Transformation</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#idp1097338788">Cipher Definition With struct shash_alg and ahash_alg</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#idp1097344228">Specifics Of Asynchronous HASH Transformation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="User.html">4. User Space Interface</a></span></dt><dd><dl><dt><span class="sect1"><a href="User.html#idp1097345644">Introduction</a></span></dt><dt><span class="sect1"><a href="ch04s02.html">User Space API General Remarks</a></span></dt><dt><span class="sect1"><a href="ch04s03.html">In-place Cipher operation</a></span></dt><dt><span class="sect1"><a href="ch04s04.html">Message Digest API</a></span></dt><dt><span class="sect1"><a href="ch04s05.html">Symmetric Cipher API</a></span></dt><dt><span class="sect1"><a href="ch04s06.html">AEAD Cipher API</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s06.html#idp1097375068">AEAD Memory Structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s07.html">Random Number Generator API</a></span></dt><dt><span class="sect1"><a href="ch04s08.html">Zero-Copy Interface</a></span></dt><dt><span class="sect1"><a href="ch04s09.html">Setsockopt Interface</a></span></dt><dt><span class="sect1"><a href="ch04s10.html">User space API example</a></span></dt></dl></dd><dt><span class="chapter"><a href="API.html">5. Programming Interface</a></span></dt><dd><dl><dt><span class="sect1"><a href="API.html#idp1097391772">Block Cipher Context Data Structures</a></span></dt><dt><span class="sect1"><a href="ch05s02.html">Block Cipher Algorithm Definitions</a></span></dt><dt><span class="sect1"><a href="ch05s03.html">Asynchronous Block Cipher API</a></span></dt><dt><span class="sect1"><a href="ch05s04.html">Asynchronous Cipher Request Handle</a></span></dt><dt><span class="sect1"><a href="ch05s05.html">Authenticated Encryption With Associated Data (AEAD) Cipher API</a></span></dt><dt><span class="sect1"><a href="ch05s06.html">Asynchronous AEAD Request Handle</a></span></dt><dt><span class="sect1"><a href="ch05s07.html">Synchronous Block Cipher API</a></span></dt><dt><span class="sect1"><a href="ch05s08.html">Single Block Cipher API</a></span></dt><dt><span class="sect1"><a href="ch05s09.html">Synchronous Message Digest API</a></span></dt><dt><span class="sect1"><a href="ch05s10.html">Message Digest Algorithm Definitions</a></span></dt><dt><span class="sect1"><a href="ch05s11.html">Asynchronous Message Digest API</a></span></dt><dt><span class="sect1"><a href="ch05s12.html">Asynchronous Hash Request Handle</a></span></dt><dt><span class="sect1"><a href="ch05s13.html">Synchronous Message Digest API</a></span></dt><dt><span class="sect1"><a href="ch05s14.html">Crypto API Random Number API</a></span></dt></dl></dd><dt><span class="chapter"><a href="Code.html">6. Code Examples</a></span></dt><dd><dl><dt><span class="sect1"><a href="Code.html#idp1098420372">Code Example For Asynchronous Block Cipher Operation</a></span></dt><dt><span class="sect1"><a href="ch06s02.html">Code Example For Synchronous Block Cipher Operation</a></span></dt><dt><span class="sect1"><a href="ch06s03.html">Code Example For Use of Operational State Memory With SHASH</a></span></dt><dt><span class="sect1"><a href="ch06s04.html">Code Example For Random Number Generator Usage</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="Intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right" valign="top">&#160;Chapter&#160;1.&#160;Kernel Crypto API Interface Specification</td></tr></table></div></body></html>
25