This file is indexed.

/usr/share/doc/libkcapi/html/API-kcapi-aead-encrypt.html is in libkcapi-doc 1.0.3-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>kcapi_aead_encrypt</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API User Space Interface Library"><link rel="up" href="ch03s08.html" title="Synchronous AEAD Cipher API - One Shot"><link rel="prev" href="ch03s08.html" title="Synchronous AEAD Cipher API - One Shot"><link rel="next" href="API-kcapi-aead-decrypt.html" title="kcapi_aead_decrypt"></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">kcapi_aead_encrypt</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s08.html">Prev</a> </td><th width="60%" align="center">Synchronous AEAD Cipher API - One Shot</th><td width="20%" align="right"> <a accesskey="n" href="API-kcapi-aead-decrypt.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-kcapi-aead-encrypt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kcapi_aead_encrypt — 
  synchronously encrypt AEAD data (one shot)
 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int32_t <b class="fsfunc">kcapi_aead_encrypt </b>(</code></td><td>struct kcapi_handle * <var class="pdparam">handle</var>, </td></tr><tr><td> </td><td>const uint8_t * <var class="pdparam">in</var>, </td></tr><tr><td> </td><td>uint32_t <var class="pdparam">inlen</var>, </td></tr><tr><td> </td><td>const uint8_t * <var class="pdparam">iv</var>, </td></tr><tr><td> </td><td>uint8_t * <var class="pdparam">out</var>, </td></tr><tr><td> </td><td>uint32_t <var class="pdparam">outlen</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">access</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm2295"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>handle</code></em></span></dt><dd><p>
     [in] cipher handle
    </p></dd><dt><span class="term"><em class="parameter"><code>in</code></em></span></dt><dd><p>
     [in] plaintext data buffer
    </p></dd><dt><span class="term"><em class="parameter"><code>inlen</code></em></span></dt><dd><p>
     [in] length of plaintext buffer
    </p></dd><dt><span class="term"><em class="parameter"><code>iv</code></em></span></dt><dd><p>
     [in] IV to be used for cipher operation
    </p></dd><dt><span class="term"><em class="parameter"><code>out</code></em></span></dt><dd><p>
     [out] data buffer holding cipher text and authentication tag
    </p></dd><dt><span class="term"><em class="parameter"><code>outlen</code></em></span></dt><dd><p>
     [in] length of out buffer
    </p></dd><dt><span class="term"><em class="parameter"><code>access</code></em></span></dt><dd><p>
     [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal
     heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use
     vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)
    </p></dd></dl></div></div><div class="refsect1"><a name="idm2333"></a><h2>Description</h2><p>
   The AEAD cipher operation requires the furnishing of the associated
   authentication data. In case such data is not required, it can be set to
   NULL and length value must be set to zero.
   </p><p>

   It is perfectly legal to use the same buffer as the plaintext and
   ciphertext pointers. That would mean that after the encryption operation,
   the plaintext is overwritten with the ciphertext.
   </p><p>

   The memory should be aligned at the page boundary using
   posix_memalign(sysconf(_SC_PAGESIZE)), If it is not aligned at the page
   boundary, the vmsplice call may not send all data to the kernel.
   </p><p>

   The IV buffer must be exactly <code class="function">kcapi_cipher_ivsize</code> bytes in size.
   </p><p>

   After invoking this function the caller should use
   <code class="function">kcapi_aead_getdata_output</code> to obtain the resulting ciphertext and
   authentication tag references.
</p></div><div class="refsect1"><a name="idm2342"></a><h2>IMPORTANT NOTE</h2><p>
   The kernel will only process
   sysconf(_SC_PAGESIZE) * ALG_MAX_PAGES at one time. Longer input data cannot
   be handled by the kernel.
   </p><p>

   <em class="parameter"><code>return</code></em> number of bytes encrypted upon success;
   a negative errno-style error code if an error occurred
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03s08.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-kcapi-aead-decrypt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Synchronous AEAD Cipher API - One Shot </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">kcapi_aead_decrypt</span></td></tr></table></div></body></html>