Debian Codegraph @

grub-core/lib/libgcrypt/README

raw
1 Libgcrypt - The GNU Crypto Library
2 ------------------------------------
3 Version 1.11
4
5 Copyright (C) 1989,1991-2018 Free Software Foundation, Inc.
6 Copyright (C) 2012-2024 g10 Code GmbH
7 Copyright (C) 2013-2024 Jussi Kivilinna
8
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.
12
13
14 Overview
15 --------
16
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"
21 below for details.
22
23
24 Build Instructions
25 ------------------
26
27 The download canonical location for libgcrypt is:
28
29 https://gnupg.org/ftp/gcrypt/libgcrypt/
30
31 To build libgcrypt you need libgpg-error:
32
33 https://gnupg.org/ftp/gcrypt/libgpg-error/
34
35 You should get the latest versions of course.
36
37 After building and installing the libgpg-error package, you may
38 continue with Libgcrypt installation as with allmost all GNU
39 packages, you just have to do
40
41 ./configure
42 make
43 make check
44 make install
45
46 The "make check" is not required but a good idea to see whether
47 the library works as expected. The check takes some while and
48 prints some benchmarking results. Before doing "make install" you
49 probably need to become root.
50
51 To build libgcrypt for Microsoft Windows, you need to have the
52 mingw32 cross-building toolchain installed. Instead of running a
53 plain configure you use
54
55 ./autogen.sh --build-w32
56 make
57 make install
58
59 By default this command sequences expectsd a libgpg-error
60 installed below $HOME/w32root and installs libgcrypt to that
61 directory too. See the autogen.sh code for details.
62
63 The documentation is available as an Info file (gcrypt.info). To
64 build documentation in PDF, run this:
65
66 cd doc
67 make pdf
68
69
70
71 Mailing List
72 ------------
73
74 You may want to join the developer's mailing list
75 [email protected] by sending mail with a subject of
76 "subscribe" to [email protected]. An archive of this
77 list is available at https://lists.gnupg.org .
78
79
80 Configure options
81 -----------------
82 Here is a list of configure options which are sometimes useful
83 for installation.
84
85 --enable-large-data-tests
86 With this option a "make check" will take really
87 long due to extra checks for the hash algorithms.
88
89 --disable-asm
90 Do not use assembler modules. It is not possible
91 to use this on some CPU types.
92
93 --enable-ld-version-script
94 Libgcrypt tries to build a library where internal
95 symbols are not exported. This requires support
96 from ld and is currently enabled for a few OSes.
97 If you know that your ld supports the so called
98 ELF version scripts, you can use this option to
99 force its use. OTOH, if you get error message
100 from the linker, you probably want to use this
101 option to disable the use of version scripts.
102 Note, that you should never ever use an
103 undocumented symbol or one which is prefixed with
104 an underscore.
105
106 --enable-ciphers=list
107 --enable-pubkey-ciphers=list
108 --enable-digests=list
109 If not otherwise specified, all algorithms
110 included in the libgcrypt source tree are built.
111 An exception are algorithms, which depend on
112 features not provided by the system, like 64bit
113 data types. With these switches it is possible
114 to select exactly those algorithm modules, which
115 should be built. The algorithms are to be
116 separated by spaces, commas or colons. To view
117 the list used with the current build the program
118 tests/version may be used.
119
120 --disable-endian-check
121 Don't let configure test for the endianness but
122 try to use the OS provided macros at compile
123 time. This is helpful to create OS X fat binaries.
124
125 --enable-random-daemon
126 Include support for a global random daemon and
127 build the daemon. This is an experimental feature.
128
129 --enable-mpi-path=EXTRA_PATH
130 Prepend EXTRA_PATH to list of CPU specific
131 optimizations. For example, if you want to add
132 optimizations forn a Intel Pentium 4 compatible
133 CPU, you may use
134 --enable-mpi-path=pentium4/sse2:pentium4/mmx
135 Take care: The generated library may crash on
136 non-compatible CPUs.
137
138 --enable-random=NAME
139 Force the use of the random gathering module
140 NAME. Default is either to use /dev/random or
141 the auto mode. Possible values for NAME are:
142 egd - Use the module which accesses the
143 Entropy Gathering Daemon. See the webpages
144 for more information about it.
145 unix - Use the standard Unix module which does not
146 have a very good performance.
147 linux - Use the module which accesses /dev/random.
148 This is the first choice and the default one
149 for GNU/Linux or *BSD.
150 auto - Compile linux, egd and unix in and
151 automagically select at runtime.
152
153 --enable-hmac-binary-check
154 Include support to check the binary at runtime
155 against a HMAC checksum. This works only in FIPS
156 mode on systems providing the dladdr function and using
157 the ELF binary format.
158
159 --with-fips-module-version=version
160 Specify a string used as a module version for FIPS
161 certification purposes.
162
163 --disable-padlock-support
164 Disable support for the PadLock engine of VIA
165 processors. The default is to use PadLock if
166 available. Try this if you get problems with
167 assembler code.
168
169 --disable-aesni-support
170 Disable support for the AES-NI instructions of
171 newer Intel CPUs. The default is to use AES-NI
172 if available. Try this if you get problems with
173 assembler code.
174
175 --disable-O-flag-munging
176 Some code is too complex for some compilers while
177 in higher optimization modes, thus the compiler
178 invocation is modified to use a lower
179 optimization level. Usually this works very well
180 but on some platforms these rules break the
181 invocation. This option may be used to disable
182 the feature under the assumption that either good
183 CFLAGS are given or the compiler can grok the code.
184
185
186
187
188 Build Problems
189 --------------
190
191 If you have a problem with a a certain release, please first check
192 the Release-info URL given in the NEWS file.
193
194 We can't check all assembler files, so if you have problems
195 assembling them (or the program crashes) use --disable-asm with
196 ./configure. If you opt to delete individual replacement files in
197 hopes of using the remaining ones, be aware that the configure
198 scripts may consider several subdirectories to get all available
199 assembler files; be sure to delete the correct ones. Never delete
200 udiv-qrnnd.S in any CPU directory, because there may be no C
201 substitute (in mpi/genereic). Don't forget to delete
202 "config.cache" and run "./config.status --recheck". We got a few
203 reports about problems using versions of gcc earlier than 2.96
204 along with a non-GNU assembler (as). If this applies to your
205 platform, you can either upgrade gcc to a more recent version, or
206 use the GNU assembler.
207
208 Some make tools are broken - the best solution is to use GNU's
209 make. Try gmake or grab the sources from a GNU archive and
210 install them.
211
212 Specific problems on some machines:
213
214 * AArch64 (GCC 11.1 and 11.2)
215
216 Because of the bug in GCC (fixed in 11.3), with the option
217 -O3, vectorization results wrong code for the function
218 buf_eq_const. Please use -O2 or -fno-tree-loop-vectorize.
219
220 * IBM RS/6000 running AIX
221
222 Due to a change in gcc (since version 2.8) the MPI stuff may
223 not build. In this case try to run configure using:
224 CFLAGS="-g -O2 -mcpu=powerpc" ./configure
225
226 * SVR4.2 (ESIX V4.2 cc)
227
228 Due to problems with the ESIX as(1), you probably want to do:
229 CFLAGS="-O -K pentium" ./configure --disable-asm
230
231 * SunOS 4.1.4
232
233 ./configure ac_cv_sys_symbol_underscore=yes
234
235 * Sparc64 CPUs
236
237 We have reports about failures in the AES module when
238 compiling using gcc (e.g. version 4.1.2) and the option -O3;
239 using -O2 solves the problem.
240
241
242 License
243 -------
244
245 The library is distributed under the terms of the GNU Lesser
246 General Public License (LGPL); see the file COPYING.LIB for the
247 actual terms.
248
249 The helper programs as well as the documentation are distributed
250 under the terms of the GNU General Public License (GPL); see the
251 file COPYING for the actual terms.
252
253 The file LICENSES has notices about contributions that require
254 that these additional notices are distributed.
255
256
257 Contact
258 -------
259
260 See the file AUTHORS.
261
262 Commercial grade support for Libgcrypt is available; for a listing
263 of offers see https://www.gnupg.org/service.html .
264
265 Since 2001 maintenance and development of Libgcrypt is done by g10
266 Code GmbH and was mostly financed by donations; since 2022 a raise
267 in revenues from support contracts allows to fully finance the
268 development without resorting to donations. Many thanks to our
269 paid developers for their work and also a big thank you to Jussi
270 Kivilinna for all of his performance work.
271
272 This file is Free Software; as a special exception the authors gives
273 unlimited permission to copy and/or distribute it, with or without
274 modifications, as long as this notice is preserved. For conditions
275 of the whole package, please see the file COPYING. This file is
276 distributed in the hope that it will be useful, but WITHOUT ANY
277 WARRANTY, to the extent permitted by law; without even the implied
278 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.