aboutsummaryrefslogtreecommitdiff
path: root/random
Commit message (Collapse)AuthorAgeFilesLines
* trans: New random translator.Justus Winter2017-06-0310-2353/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the Hurd included a translator providing /dev/random and /dev/urandom based on a source copy of the random number generator found in classic GnuPG. The new random translator is using the SHAKE128 algorithm from the SHA-3 family as the underlying cryptographic primitive. Being a sponge construction, it allows the extraction of arbitrary amounts of pseudorandom data. It is continuously fed entropy by hashing system state that is hard to predict. * Makefile (prog-subdirs): Remove 'random'. * NEWS: Update. * random/Makefile: Delete file. * random/TODO: Likewise. * random/gnupg-bithelp.h: Likewise. * random/gnupg-glue.h: Likewise. * random/gnupg-random.c: Likewise. * random/gnupg-random.h: Likewise. * random/gnupg-rmd.h: Likewise. * random/gnupg-rmd160.c: Likewise. * random/random.h: Likewise. * sutils/MAKEDEV.sh (random): Create node. (urandom): The new translator is both secure and non-blocking. Create a link from urandom to random for compatibility with Linux. * trans/Makefile (targets): Add 'random'. * trans/random.c: Move the skeleton of the old random translator here, but replace the PRNG with SHAKE128. Remove all dubious attempts of accounting for entropy. Do not block ever.
* Fix indentationSamuel Thibault2017-01-021-23/+23
|
* random: Hash continuous areas in the csprng pool.Justus Winter2016-09-061-10/+9
| | | | | | | | | | | | | | | | | | | * random/gnupg-random.c (mix_pool): Store the first hash at the end of the pool. -- This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG. An attacker who obtains 580 bytes of the random number from the standard RNG can trivially predict the next 20 bytes of output. The bug was found and reported by Felix Dörre and Vladimir Klebanov, Karlsruhe Institute of Technology. A paper describing the problem in detail will shortly be published. This is a port of c6dbfe89 from the GnuPG classic branch. CVE-id: CVE-2016-6313
* Fix message about not being able to request shutdown notificationSamuel Thibault2016-08-301-1/+1
| | | | | | | | It is just a warning, not a fatal error. * libdiskfs/init-startup.c (_diskfs_init_completed): Prefix warning about requesting shutdown nofication with "warning:". * random/random.c (main): Likewise.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
* Add missing libraries to fix link errorsFlavio Cruz2015-12-301-1/+1
| | | | | | | | | | | | | | This fixes several linking problems I had in my recent cross-compilation of the Hurd. I added missing static libraries and also organized some of the targets for more concise rules. * console-client/Makefile: Add libiohelp.a and libihash.a. * daemons/Makefile: Add libihash.a and libshouldbeinlibc.a. * devnode/Makefile: Add iohelp and ihash to HURDLIBS. * random/Makefile: Likewise. * trans/Makefile: Reorder targets alphabetically and add libiohelp.a and libihash.a. * utils/Makefile: Add libihash.a.
* fix compiler warnings in hurd/randomFlavio Cruz2015-12-293-19/+18
| | | | | | | | | random: Fix compiler warnings. * random/gnupg-random.c: Use byte instead of char. * random/gnupg-rmd.h (rmd160_mixblock): Use byte instead of char. * random/gnupg-rmd.c (rmd160_mixblock): Likewise. * random/gnupg-rmd.c: Place #ifdef __HURD__ earlier to avoid warnings.
* random: satisfy arbitrarily-sized readsJustus Winter2015-11-061-11/+30
| | | | * random/random.c (trivfs_S_io_read): Satisfy arbitrarily-sized reads.
* random: use /servers/startup to register for shutdown notificationsJustus Winter2015-11-061-9/+4
| | | | | * random/random.c (arrange_shutdown_notification): Use the new way to contact the startup server.
* random: improve error handlingJustus Winter2015-11-061-9/+13
| | | | | | * random/random.c (arrange_shutdown_notification): Improve error handling. (main): Display warning if arranging the shutdown notification failed.
* random: fix odd formattingJustus Winter2015-11-061-8/+3
| | | | * random/random.c (trivfs_append_args): Fix odd formatting.
* random: fix typoJustus Winter2015-01-041-1/+1
| | | | * random/gnupg-random.c (read_pool): Fix typo in comment.
* misc: Fix typos in comments (found by codespell)Stefan Weil2015-01-031-2/+2
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Revert "random: fix a receiver lookup"Justus Winter2014-11-284-74/+4
| | | | | | | This reverts "8927fbd63e29005ddb9b2c2264046089bf669857". The change mistakenly adds mutators for the `startup' protocol, but the server routine is for the `startup_notify' protocol.
* Prepare the random translator to be merged into the Hurd sourcesJustus Winter2014-06-0912-0/+2412
Move the random translator to its own subdirectory 'random'. This is the last commit to this repository. Development of the random translator will continue in the main Hurd repository.