Introduction to libgcrypt

The libgcrypt package contains a general purpose crypto library based on the code used in GnuPG. The library provides a high level interface to cryptographic building blocks using an extendable and flexible API.

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

Package Information

libgcrypt Dependencies




Pth-2.0.7 and texlive-20150521 (or install-tl-unx)

User Notes:

Installation of libgcrypt

Install libgcrypt by running the following commands:

./configure --prefix=/usr &&

Only info documentation is shipped in the package tarball. If you wish to build alternate formats of the documentation, (you must have texlive-20150521 installed to build the PDF and PostScript documentation), then issue the following commands:

make -j1 -C doc pdf ps html &&
makeinfo --html --no-split -o doc/gcrypt_nochunks.html doc/gcrypt.texi &&
makeinfo --plaintext       -o doc/gcrypt.txt           doc/gcrypt.texi

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -dm755   /usr/share/doc/libgcrypt-1.6.4 &&
install -v -m644    README doc/{README.apichanges,fips*,libgcrypt*} \

The shared library needs to be moved to /lib, and as a result the .so file in /usr/lib will need to be recreated. Run the following command as the root user:

mv -v /usr/lib/* /lib
ln -sfv ../../lib/$(readlink /usr/lib/ /usr/lib/

If you built the additional documentation, install it by issuing the following commands as the root user:

install -v -dm755   /usr/share/doc/libgcrypt-1.6.4/html &&
install -v -m644 doc/gcrypt.html/* \
                    /usr/share/doc/libgcrypt-1.6.4/html &&
install -v -m644 doc/gcrypt_nochunks.html \
                    /usr/share/doc/libgcrypt-1.6.4 &&
install -v -m644 doc/gcrypt.{pdf,ps,dvi,txt,texi} \

Command Explanations

--with-capabilities: This option enables libcap2 support.


Installed Programs: dumpsexp, hmac256, libgcrypt-config, and mpicalc
Installed Library:
Installed Directory: /usr/share/doc/libgcrypt-1.6.4

Short Descriptions


is a debug tool for S-expressions.


is a standalone HMAC-SHA-256 implementation used to compute an HMAC-SHA-256 authentication code.


determines the compile and linker flags that should be used to compile and link programs that use libgcrypt.


is a RPN (Reverse Polish Notation) calculator.

contains the cryptographic API functions.

Last updated on 2015-10-07 22:00:22 -0500