Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

101.3. nettle-4.0

Low-level cryptographic library

4.0-1 · LGPL-3.0-or-later OR GPL-2.0-or-later · 0.3 SBU · 1.2 MiB, 86 files · 41_system, 33 of 1047 · ports/core/crypto/nettle

Homepage: https://www.lysator.liu.se/~nisse/nettle/

Nettle is a low-level cryptographic library: hash functions, ciphers, MACs, and, in its companion library libhogweed over gmp, public-key algorithms. It has no protocol of its own; gnutls is built on it, as are dnsmasq’s DNSSEC validation, chrony, openconnect and the FileZilla libraries. The port also installs the small command-line tools nettle-hash, nettle-pbkdf2, sexp-conv, pkcs1-conv and nettle-lfib-stream.

Depends on: gmp.

Required by (9): chrony, dnsmasq, filezilla, fzssh, gnutls, libfilezilla, openconnect, rdfind, viking.

Sources: nettle-4.0.tar.gz (2.5 MiB). Every step kpkg takes applies to this port.

Optional, off in KDOS. These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install nettle'

build.sh:

./configure --prefix=/usr \
	    --libdir=/usr/lib \
	    --disable-static \
	    --disable-openssl \
	    --disable-documentation
make CFLAGS="$CFLAGS"
make CFLAGS="$CFLAGS" DESTDIR=$PKG install

Programs: nettle-hash, nettle-lfib-stream, nettle-pbkdf2, pkcs1-conv, sexp-conv.

Libraries: libhogweed.so, libnettle.so.

Directories: /usr/include/nettle, /usr/share/licenses/nettle.