This chapter describes the internal architecture of Libgcrypt.
Libgcrypt is a function library written in ISO C-90. Any compliant compiler should be able to build Libgcrypt as long as the target is either a POSIX platform or compatible to the API used by Windows NT. Provisions have been take so that the library can be directly used from C++ applications; however building with a C++ compiler is not supported.
Building Libgcrypt is done by using the common
./configure && make
approach. The configure command is included in the source distribution
and as a portable shell script it works on any Unix-alike system. The
result of running the configure script are a C header file
(config.h), customized Makefiles, the setup of symbolic links and
a few other things. After that the make tool builds and optionally
installs the library and the documentation. See the files
INSTALL and README in the source distribution on how to do
Libgcrypt is developed using a Subversion3 repository. Although all released
versions are tagged in this repository, they should not be used to build
production versions of Libgcrypt. Instead released tarballs should be
used. These tarballs are available from several places with the master
copy at ‘
Announcements of new releases are posted to the
email@example.com’ mailing list4.
Libgcrypt consists of several subsystems (see Figure 17.1) and all these subsystems provide a public API; this includes the helper subsystems like the one for S-expressions. The API style depends on the subsystem; in general an open-use-close approach is implemented. The open returns a handle to a context used for all further operations on this handle, several functions may then be used on this handle and a final close function releases all resources associated with the handle.
|• Public-Key Subsystem Architecture:||About public keys.|
|• Symmetric Encryption Subsystem Architecture:||About standard ciphers.|
|• Hashing and MACing Subsystem Architecture:||About hashing.|
|• Multi-Precision-Integer Subsystem Architecture:||About big integers.|
|• Prime-Number-Generator Subsystem Architecture:||About prime numbers.|
|• Random-Number Subsystem Architecture:||About random stuff.|
A version control system available for many platforms
See http://www.gnupg.org/documentation/mailing-lists.en.html for details.