1 Libgcrypt - The GNU Crypto Library
2 ------------------------------------
5 Copyright (C) 1989,1991-2018 Free Software Foundation, Inc.
6 Copyright (C) 2012-2018 g10 Code GmbH
7 Copyright (C) 2013-2018 Jussi Kivilinna
9 Libgcrypt is free software. See the file AUTHORS for full copying
10 notices, and LICENSES for notices about contributions that require
11 these additional notices to be distributed.
17 Libgcrypt is a general purpose crypto library based on the code
18 used in GnuPG. Libgcrypt depends on the library `libgpg-error',
19 which must be installed correctly before Libgcrypt is to be built.
20 Libgcrypt is distributed under the LGPL, see the section "License"
27 The download canonical location for libgcrypt is:
29 ftp://ftp.gnupg.org/gcrypt/libgcrypt/
31 https://gnupg.org/ftp/gcrypt/libgcrypt/
33 To build libgcrypt you need libgpg-error:
35 ftp://ftp.gnupg.org/gcrypt/libgpg-error/
37 https://gnupg.org/ftp/gcrypt/libgpg-error/
39 You should get the latest versions of course.
41 After building and installing the libgpg-error package, you may
42 continue with Libgcrypt installation as with allmost all GNU
43 packages, you just have to do
50 The "make check" is not required but a good idea to see whether
51 the library works as expected. The check takes some while and
52 prints some benchmarking results. Before doing "make install" you
53 probably need to become root.
55 To build libgcrypt for Microsoft Windows, you need to have the
56 mingw32 cross-building toolchain installed. Instead of running a
57 plain configure you use
59 ./autogen.sh --build-w32
63 By default this command sequences expectsd a libgpg-error
64 installed below $HOME/w32root and installs libgcrypt to that
65 directory too. See the autogen.sh code for details.
67 The documentation is available as an Info file (gcrypt.info). To
68 build documentation in PDF, run this:
78 You may want to join the developer's mailing list
79 gcrypt-devel@gnupg.org by sending mail with a subject of
80 "subscribe" to gcrypt-devel-request@gnupg.org. An archive of this
81 list is available at https://lists.gnupg.org .
86 Here is a list of configure options which are sometimes useful
89 --enable-large-data-tests
90 With this option a "make check" will take really
91 long due to extra checks for the hash algorithms.
94 Enable the integrated malloc checking code. Please
95 note that this feature does not work on all CPUs
96 (e.g. SunOS 5.7 on UltraSparc-2) and might give
100 Do not use assembler modules. It is not possible
101 to use this on some CPU types.
103 --enable-ld-version-script
104 Libgcrypt tries to build a library where internal
105 symbols are not exported. This requires support
106 from ld and is currently enabled for a few OSes.
107 If you know that your ld supports the so called
108 ELF version scripts, you can use this option to
109 force its use. OTOH, if you get error message
110 from the linker, you probably want to use this
111 option to disable the use of version scripts.
112 Note, that you should never ever use an
113 undocumented symbol or one which is prefixed with
116 --enable-ciphers=list
117 --enable-pubkey-ciphers=list
118 --enable-digests=list
119 If not otherwise specified, all algorithms
120 included in the libgcrypt source tree are built.
121 An exception are algorithms, which depend on
122 features not provided by the system, like 64bit
123 data types. With these switches it is possible
124 to select exactly those algorithm modules, which
125 should be built. The algorithms are to be
126 separated by spaces, commas or colons. To view
127 the list used with the current build the program
128 tests/version may be used.
130 --disable-endian-check
131 Don't let configure test for the endianness but
132 try to use the OS provided macros at compile
133 time. This is helpful to create OS X fat binaries.
135 --enable-random-daemon
136 Include support for a global random daemon and
137 build the daemon. This is an experimental feature.
139 --enable-mpi-path=EXTRA_PATH
140 Prepend EXTRA_PATH to list of CPU specific
141 optimizations. For example, if you want to add
142 optimizations forn a Intel Pentium 4 compatible
144 --enable-mpi-path=pentium4/sse2:pentium4/mmx
145 Take care: The generated library may crash on
149 Force the use of the random gathering module
150 NAME. Default is either to use /dev/random or
151 the auto mode. Possible values for NAME are:
152 egd - Use the module which accesses the
153 Entropy Gathering Daemon. See the webpages
154 for more information about it.
155 unix - Use the standard Unix module which does not
156 have a very good performance.
157 linux - Use the module which accesses /dev/random.
158 This is the first choice and the default one
159 for GNU/Linux or *BSD.
160 auto - Compile linux, egd and unix in and
161 automagically select at runtime.
163 --enable-hmac-binary-check
164 Include support to check the binary at runtime
165 against a HMAC checksum. This works only in FIPS
166 mode and on systems providing the dladdr function.
168 --disable-padlock-support
169 Disable support for the PadLock engine of VIA
170 processors. The default is to use PadLock if
171 available. Try this if you get problems with
174 --disable-aesni-support
175 Disable support for the AES-NI instructions of
176 newer Intel CPUs. The default is to use AES-NI
177 if available. Try this if you get problems with
180 --disable-O-flag-munging
181 Some code is too complex for some compilers while
182 in higher optimization modes, thus the compiler
183 invocation is modified to use a lower
184 optimization level. Usually this works very well
185 but on some platforms these rules break the
186 invocation. This option may be used to disable
187 the feature under the assumption that either good
188 CFLAGS are given or the compiler can grok the code.
196 We can't check all assembler files, so if you have problems
197 assembling them (or the program crashes) use --disable-asm with
198 ./configure. If you opt to delete individual replacement files in
199 hopes of using the remaining ones, be aware that the configure
200 scripts may consider several subdirectories to get all available
201 assembler files; be sure to delete the correct ones. Never delete
202 udiv-qrnnd.S in any CPU directory, because there may be no C
203 substitute (in mpi/genereic). Don't forget to delete
204 "config.cache" and run "./config.status --recheck". We got a few
205 reports about problems using versions of gcc earlier than 2.96
206 along with a non-GNU assembler (as). If this applies to your
207 platform, you can either upgrade gcc to a more recent version, or
208 use the GNU assembler.
210 Some make tools are broken - the best solution is to use GNU's
211 make. Try gmake or grab the sources from a GNU archive and
214 Specific problems on some machines:
216 * IBM RS/6000 running AIX
218 Due to a change in gcc (since version 2.8) the MPI stuff may
219 not build. In this case try to run configure using:
220 CFLAGS="-g -O2 -mcpu=powerpc" ./configure
222 * SVR4.2 (ESIX V4.2 cc)
224 Due to problems with the ESIX as(1), you probably want to do:
225 CFLAGS="-O -K pentium" ./configure --disable-asm
229 ./configure ac_cv_sys_symbol_underscore=yes
233 We have reports about failures in the AES module when
234 compiling using gcc (e.g. version 4.1.2) and the option -O3;
235 using -O2 solves the problem.
241 The library is distributed under the terms of the GNU Lesser
242 General Public License (LGPL); see the file COPYING.LIB for the
245 The helper programs as well as the documentation are distributed
246 under the terms of the GNU General Public License (GPL); see the
247 file COPYING for the actual terms.
249 The file LICENSES has notices about contributions that require
250 that these additional notices are distributed.
256 See the file AUTHORS.
258 Commercial grade support for Libgcrypt is available; for a listing
259 of offers see https://www.gnupg.org/service.html .
261 Maintenance and development of Libgcrypt is mostly financed by
262 donations. We currently employ 3 full-time developers, one
263 part-timer, and one contractor. They all work on GnuPG and
264 closely related software like Libgcrypt. Please visit
265 https://gnupg.org/donate/ to see out how you can help.
268 This file is Free Software; as a special exception the authors gives
269 unlimited permission to copy and/or distribute it, with or without
270 modifications, as long as this notice is preserved. For conditions
271 of the whole package, please see the file COPYING. This file is
272 distributed in the hope that it will be useful, but WITHOUT ANY
273 WARRANTY, to the extent permitted by law; without even the implied
274 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.