Go to file
Zack Weinberg 841785bad1 manual: Revise crypt.texi.
This is a major rewrite of the description of 'crypt', 'getentropy',
and 'getrandom'.

A few highlights of the content changes:

 - Throughout the manual, public headers, and user-visible messages,
   I replaced the term "password" with "passphrase", the term
   "password database" with "user database", and the term
   "encrypt(ion)" with "(one-way) hashing" whenever it was applied to
   passphrases.  I didn't bother making this change in internal code
   or tests.  The use of the term "password" in ruserpass.c survives,
   because that refers to a keyword in netrc files, but it is adjusted
   to make this clearer.

   There is a note in crypt.texi explaining that they were
   traditionally called passwords but single words are not good enough
   anymore, and a note in users.texi explaining that actual passphrase
   hashes are found in a "shadow" database nowadays.

 - There is a new short introduction to the "Cryptographic Functions"
   section, explaining how we do not intend to be a general-purpose
   cryptography library, and cautioning that there _are_, or have
   been, legal restrictions on the use of cryptography in many
   countries, without getting into any kind of detail that we can't
   promise to keep up to date.

 - I added more detail about what a "one-way function" is, and why
   they are used to obscure passphrases for storage.  I removed the
   paragraph saying that systems not connected to a network need no
   user authentication, because that's a pretty rare situation
   nowadays.  (It still says "sometimes it is necessary" to
   authenticate the user, though.)

 - I added documentation for all of the hash functions that glibc
   actually supports, but not for the additional hash functions
   supported by libxcrypt.  If we're going to keep this manual section
   around after the transition is more advanced, it would probably
   make sense to add them then.

 - There is much more detailed discussion of how to generate a salt,
   and the failure behavior for crypt is documented.  (Returning an
   invalid hash on failure is what libxcrypt does; Solar Designer's
   notes say that this was done "for compatibility with old programs
   that assume crypt can never fail".)

 - As far as I can tell, the header 'crypt.h' is entirely a GNU
   invention, and never existed on any other Unix lineage.  The
   function 'crypt', however, was in Issue 1 of the SVID and is now
   in the XSI component of POSIX.  I tried to make all of the
   @standards annotations consistent with this, but I'm not sure I got
   them perfectly right.

 - The genpass.c example has been improved to use getentropy instead
   of the current time to generate the salt, and to use a SHA-256 hash
   instead of MD5. It uses more random bytes than is strictly
   necessary because I didn't want to complicate the code with proper
   base64 encoding.

 - The testpass.c example has three hardwired hashes now, to
   demonstrate that different one-way functions produce different
   hashes for the same input.  It also demonstrates how DES hashing
   only pays attention to the first eight characters of the input.

 - There is new text explaining in more detail how a CSPRNG differs
   from a regular random number generator, and how
   getentropy/getrandom are not exactly a CSPRNG.  I tried not to make
   specific falsifiable claims here.  I also tried to make the
   blocking/cancellation/error behavior of both getentropy and
   getrandom clearer.
2018-06-29 16:53:37 +02:00
argp
assert
benchtests benchtests: Add -f/--functions argument 2018-06-12 09:10:42 -07:00
bits hurd: Fix shmid_ds's shm_segsz field type 2018-06-02 21:52:43 +02:00
catgets
ChangeLog.old
conform Disallow use of DES encryption functions in new programs. 2018-06-29 16:53:18 +02:00
crypt manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
csu Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251) 2018-06-26 13:22:53 -03:00
ctype
debug libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236] 2018-06-01 10:41:03 +02:00
dirent
dlfcn
elf _dl_map_object_deps: Use struct scratch_buffer [BZ #18023] 2018-06-27 17:55:56 +02:00
gmon
gnulib
grp
gshadow
hesiod
htl hurd: Fix missing __pthread_get_cleanup_stack symbol 2018-06-16 10:52:04 +02:00
hurd
iconv
iconvdata localedata: Make IBM273 compatible with ISO-8859-1 [BZ #23290] 2018-06-14 22:34:10 +02:00
include Remove macros extend_alloca, extend_alloca_account [BZ #18023] 2018-06-27 19:20:37 +02:00
inet manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
intl
io Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251) 2018-06-26 13:22:53 -03:00
libio libio: Add tst-vtables, tst-vtables-interposed 2018-06-26 12:31:08 +02:00
locale
localedata ast_ES: Add alternative month names (bug 23140). 2018-06-29 12:36:53 +02:00
login Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251) 2018-06-26 13:22:53 -03:00
mach hurd: Avoid PLT references to syscalls 2018-06-16 02:50:36 +02:00
malloc malloc: Update heap dumping/undumping comments [BZ #23351] 2018-06-29 14:55:15 +02:00
manual manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
math Add a generic significand implementation 2018-06-20 18:15:06 -03:00
mathvec
misc
nis nisplus: Correct pwent parsing issue and resulting build error [BZ #23266] 2018-06-27 21:12:16 +01:00
nptl Remove nptl/sockperf.c. 2018-06-27 17:01:06 +00:00
nptl_db
nscd manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
nss nss_files: Use struct scratch_buffer instead of extend_alloca [BZ #18023] 2018-06-25 19:48:01 +02:00
po
posix manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
pwd manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
resolv Run thread shutdown functions in an explicit order 2018-06-26 15:27:12 +02:00
resource
rt
scripts Fix hardcoded /tmp paths in testing (bug 13888). 2018-06-26 21:48:48 +00:00
setjmp
shadow manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
signal
socket
soft-fp Make powerpc-nofpu __sqrtsf2, __sqrtdf2 compat symbols (bug 18473). 2018-06-01 17:25:12 +00:00
stdio-common Fix hardcoded /tmp paths in testing (bug 13888). 2018-06-26 21:48:48 +00:00
stdlib Disallow use of DES encryption functions in new programs. 2018-06-29 16:53:18 +02:00
streams
string Run thread shutdown functions in an explicit order 2018-06-26 15:27:12 +02:00
sunrpc Disallow use of DES encryption functions in new programs. 2018-06-29 16:53:18 +02:00
support support: Add TEST_NO_SETVBUF 2018-06-26 12:30:50 +02:00
sysdeps getifaddrs: Don't return ifa entries with NULL names [BZ #21812] 2018-06-29 09:44:55 +02:00
sysvipc
termios
time Use _STRUCT_TIMESPEC as guard in <bits/types/struct_timespec.h> [BZ #23349] 2018-06-28 13:12:16 +02:00
timezone
wcsmbs Add tests for sign of NaN returned by strtod (bug 23007). 2018-06-15 17:36:21 +00:00
wctype
.gitattributes
.gitignore
abi-tags
aclocal.m4
ChangeLog manual: Revise crypt.texi. 2018-06-29 16:53:37 +02:00
config.h.in
config.make.in
configure
configure.ac
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL
libc-abis
libof-iterator.mk
LICENSES
MAINTAINERS
Makeconfig
Makefile
Makefile.in
Makerules Run thread shutdown functions in an explicit order 2018-06-26 15:27:12 +02:00
NEWS Disallow use of DES encryption functions in new programs. 2018-06-29 16:53:18 +02:00
o-iterator.mk
README
Rules
shlib-versions
test-skeleton.c
version.h

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arm-*-linux-gnueabi
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see http://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at http://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.