Introduction to Nettle

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

This package is known to build and work properly using an LFS-7.7 platform.

Package Information

Nettle Dependencies


OpenSSL-1.0.2 (for examples)

User Notes:

Installation of Nettle

Install Nettle by running the following commands:

./configure --prefix=/usr &&

To test the results, issue: make check.

If you want to disable installing the static library, use this sed:

sed -i '/^install-here/ s/install-static//' Makefile

Now, as the root user:

make install &&
chmod -v 755 /usr/lib/ /usr/lib/ &&
install -v -m755 -d /usr/share/doc/nettle-2.7.1 &&
install -v -m644 nettle.html /usr/share/doc/nettle-2.7.1


Installed Programs: nettle-hash, nettle-lfib-stream, pkcs1-conv and sexp-conv
Installed Libraries: libhogweed.{so,a} and libnettle.{so,a}
Installed Directory: /usr/include/nettle

Short Descriptions


calulates a hash value using a specified algorithm.


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.


converts private and public RSA keys from PKCS #1 format to sexp format.


converts an s-expression to a different encoding.

Last updated on 2015-02-22 14:34:08 -0800