Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates > by-pkgid > e676599e1b67b3b32c0c27009eb121bc > files > 68

botan-doc-1.10.17-1.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Key Derivation Functions &mdash; Botan</title>
    
    <link rel="stylesheet" href="_static/agogo.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.10.17',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Botan" href="index.html" />
    <link rel="next" title="PBKDF Algorithms" href="pbkdf.html" />
    <link rel="prev" title="Secure Memory Containers" href="secmem.html" /> 
  </head>
  <body>
    <div class="header-wrapper">
      <div class="header">
        <h1>Botan</h1>
      </div>
    </div>

    <div class="content-wrapper">
      <div class="content">
        <div class="document">
            
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="key-derivation-functions">
<span id="key-derivation-function"></span><h1>Key Derivation Functions<a class="headerlink" href="#key-derivation-functions" title="Permalink to this headline">¶</a></h1>
<p>Key derivation functions are used to turn some amount of shared secret
material into uniform random keys suitable for use with symmetric
algorithms. An example of an input which is useful for a KDF is a
shared secret created using Diffie-Hellman key agreement.</p>
<dl class="class">
<dt id="KDF">
<em class="property">class </em><tt class="descname">KDF</tt><a class="headerlink" href="#KDF" title="Permalink to this definition">¶</a></dt>
<dd><dl class="function">
<dt id="KDF::derive_key__s.MemoryRegion:byte:CR.ssCRC">
SecureVector&lt;byte&gt; <tt class="descname">derive_key</tt><big>(</big>size_t <em>key_len</em>, const MemoryRegion&lt;byte&gt;&amp; <em>secret</em>, const std::string&amp; <em>salt</em><em>=&quot;&quot;</em><big>)</big><tt class="descclassname"> const</tt><a class="headerlink" href="#KDF::derive_key__s.MemoryRegion:byte:CR.ssCRC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="KDF::derive_key__s.MemoryRegion:byte:CR.MemoryRegion:byte:CRC">
SecureVector&lt;byte&gt; <tt class="descname">derive_key</tt><big>(</big>size_t <em>key_len</em>, const MemoryRegion&lt;byte&gt;&amp; <em>secret</em>, const MemoryRegion&lt;byte&gt;&amp; <em>salt</em><big>)</big><tt class="descclassname"> const</tt><a class="headerlink" href="#KDF::derive_key__s.MemoryRegion:byte:CR.MemoryRegion:byte:CRC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="KDF::derive_key__s.MemoryRegion:byte:CR.byteCP.sC">
SecureVector&lt;byte&gt; <tt class="descname">derive_key</tt><big>(</big>size_t <em>key_len</em>, const MemoryRegion&lt;byte&gt;&amp; <em>secret</em>, const byte* <em>salt</em>, size_t <em>salt_len</em><big>)</big><tt class="descclassname"> const</tt><a class="headerlink" href="#KDF::derive_key__s.MemoryRegion:byte:CR.byteCP.sC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="KDF::derive_key__s.byteCP.s.ssCRC">
SecureVector&lt;byte&gt; <tt class="descname">derive_key</tt><big>(</big>size_t <em>key_len</em>, const byte* <em>secret</em>, size_t <em>secret_len</em>, const std::string&amp; <em>salt</em><big>)</big><tt class="descclassname"> const</tt><a class="headerlink" href="#KDF::derive_key__s.byteCP.s.ssCRC" title="Permalink to this definition">¶</a></dt>
<dd><p>All variations on the same theme. Deterministically creates a
uniform random value from <em>secret</em> and <em>salt</em>. Typically <em>salt</em> is
a lable or identifier, such as a session id.</p>
</dd></dl>

</dd></dl>

<p>You can create a <a class="reference internal" href="#KDF" title="KDF"><tt class="xref cpp cpp-class docutils literal"><span class="pre">KDF</span></tt></a> using</p>
<dl class="function">
<dt id="get_kdf__ssCR">
KDF* <tt class="descname">get_kdf</tt><big>(</big>const std::string&amp; <em>algo_spec</em><big>)</big><a class="headerlink" href="#get_kdf__ssCR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>


          </div>
        </div>
      </div>
        </div>
        <div class="sidebar">
          <h3>Table Of Contents</h3>
          <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Welcome</a></li>
<li class="toctree-l1"><a class="reference internal" href="reading.html">Recommended Reading</a></li>
<li class="toctree-l1"><a class="reference internal" href="building.html">Building The Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="firststep.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="filters.html">Information Flow: Pipes and Filters</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubkey.html">Public Key Cryptography</a></li>
<li class="toctree-l1"><a class="reference internal" href="x509.html">Certificate Handling</a></li>
<li class="toctree-l1"><a class="reference internal" href="ssl.html">SSL and TLS</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigint.html">BigInt</a></li>
<li class="toctree-l1"><a class="reference internal" href="lowlevel.html">The Low-Level Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="secmem.html">Secure Memory Containers</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Key Derivation Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="pbkdf.html">PBKDF Algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="passhash.html">Password Hashing</a></li>
<li class="toctree-l1"><a class="reference internal" href="rng.html">Random Number Generators</a></li>
<li class="toctree-l1"><a class="reference internal" href="fpe.html">Format Preserving Encryption</a></li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python Binding</a></li>
</ul>

          <h3 style="margin-top: 1.5em;">Search</h3>
          <form class="search" action="search.html" method="get">
            <input type="text" name="q" />
            <input type="submit" value="Go" />
            <input type="hidden" name="check_keywords" value="yes" />
            <input type="hidden" name="area" value="default" />
          </form>
          <p class="searchtip" style="font-size: 90%">
            Enter search terms or a module, class or function name.
          </p>
        </div>
        <div class="clearer"></div>
      </div>
    </div>

    <div class="footer-wrapper">
      <div class="footer">
        <div class="left">
          <a href="secmem.html" title="Secure Memory Containers"
             accesskey="P">previous</a> |
          <a href="pbkdf.html" title="PBKDF Algorithms"
             accesskey="N">next</a> |
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a>
            <br/>
            <a href="_sources/kdf.txt"
               rel="nofollow">Show Source</a>
        </div>

        <div class="right">
          
    <div class="footer">
        &copy; Copyright 2000-2011, Jack Lloyd.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
        </div>
        <div class="clearer"></div>
      </div>
    </div>

  </body>
</html>