<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY nettle-download-http "http://ftp.gnu.org/gnu/nettle/nettle-&nettle-version;.tar.gz">
  <!ENTITY nettle-download-ftp  "ftp://ftp.gnu.org/gnu/nettle/nettle-&nettle-version;.tar.gz">
  <!ENTITY nettle-md5sum        "003d5147911317931dd453520eb234a5">
  <!ENTITY nettle-size          "1.5 MB">
  <!ENTITY nettle-buildsize     "94 MB">
  <!ENTITY nettle-time          "0.6 SBU">
]>

<sect1 id="nettle" xreflabel="Nettle-&nettle-version;">
  <?dbhtml filename="nettle.html"?>

  <sect1info>
    <othername>$LastChangedBy: pierre $</othername>
    <date>$Date: 2015-02-22 17:34:08 -0500 (Sun, 22 Feb 2015) $</date>
  </sect1info>

  <title>Nettle-&nettle-version;</title>

  <indexterm zone="nettle">
    <primary sortas="a-Nettle">Nettle</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to Nettle</title>

    <para>
      The <application>Nettle</application> package contains the low-level
      cryptographic library that is designed to fit easily in many contexts.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&nettle-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&nettle-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &nettle-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &nettle-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &nettle-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &nettle-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Nettle Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="openssl"/> (for examples)
    </para>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/nettle"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of Nettle</title>

    <para>Install <application>Nettle</application> by running the following
    commands:</para>

<screen><userinput>./configure --prefix=/usr &amp;&amp;
make</userinput></screen>

    <para>
      To test the results, issue: <command>make check</command>.
    </para>

    <para>
      If you want to disable installing the static library, use this sed:
    </para>

<screen><userinput>sed -i '/^install-here/ s/install-static//' Makefile</userinput></screen>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install &amp;&amp;
chmod -v 755 /usr/lib/libhogweed.so.2.5 /usr/lib/libnettle.so.4.7 &amp;&amp;
install -v -m755 -d /usr/share/doc/nettle-&nettle-version; &amp;&amp;
install -v -m644 nettle.html /usr/share/doc/nettle-&nettle-version;</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          nettle-hash, nettle-lfib-stream, pkcs1-conv and sexp-conv
        </seg>
        <seg>
          libhogweed.{so,a} and libnettle.{so,a}
        </seg>
        <seg>
          /usr/include/nettle
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="nettle-hash">
        <term><command>nettle-hash</command></term>
        <listitem>
          <para>
            calulates a hash value using a specified algorithm.
          </para>
          <indexterm zone="nettle nettle-hash">
            <primary sortas="b-nettle-hash">nettle-hash</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="nettle-lfib-stream">
        <term><command>nettle-lfib-stream</command></term>
        <listitem>
          <para>
            outputs a sequence of pseudorandom (non-cryptographic)  bytes, using
            Knuth's lagged fibonacci generator. The stream is useful for testing,
            but should not be used to generate cryptographic keys or anything
            else that needs real randomness.
          </para>
          <indexterm zone="nettle nettle-lfib-stream">
            <primary sortas="b-nettle-lfib-stream">nettle-lfib-stream</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pkcs1-conv">
        <term><command>pkcs1-conv</command></term>
        <listitem>
          <para>
            converts private and public RSA keys from PKCS #1 format to
            sexp format.
          </para>
          <indexterm zone="nettle pkcs1-conv">
            <primary sortas="b-pkcs1-conv">pkcs1-conv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="sexp-conv">
        <term><command>sexp-conv</command></term>
        <listitem>
          <para>
            converts an s-expression to a different encoding.
          </para>
          <indexterm zone="nettle sexp-conv">
            <primary sortas="b-sexp-conv">sexp-conv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
