aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2020-06-27 13:02:24 -0700
committerPaul Eggert2020-06-27 13:03:49 -0700
commit5ce5cf643840cd6efd25d987bc5b6f12478c50a6 (patch)
tree48a0f14e8162ee889475f54a21227356885cd330 /doc
parent118c07e02e939c9f52688091509d4bff2a897032 (diff)
downloademacs-5ce5cf643840cd6efd25d987bc5b6f12478c50a6.tar.gz
emacs-5ce5cf643840cd6efd25d987bc5b6f12478c50a6.zip
Use getrandom syscall for nonces
* admin/merge-gnulib (GNULIB_MODULES): Add getrandom. * doc/lispref/text.texi (Format of GnuTLS Cryptography Inputs): Don’t say that iv-auto uses GNUTLS_RND_NONCE. Also, don’t say that it returns the IV’s actual value, as it never has done that. * src/fns.c, src/sysdep.c: Include sys/random.h, for getrandom. * src/fns.c (Fsecure_hash_algorithms): Use getrandom so that this function does not depend on HAVE_GNUTLS3. * src/sysdep.c: Do not include <gnutls/crypto.h>. (random_seed) [HAVE_LRAND48]: Can be long int now. (init_random) [!WINDOWSNT]: Use getrandom syscall instead of opening /dev/urandom, as this works even on GNU/Linux hosts that lack /dev/urandom. Don’t bother with gnutls_rnd as it’s not needed now that we have getrandom.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/text.texi8
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 10e8246a5fa..0c3813ff1d0 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4813,11 +4813,9 @@ When @var{noerror} is non-@code{nil}, this function silently uses
4813@code{raw-text} coding instead. 4813@code{raw-text} coding instead.
4814 4814
4815@item (@code{iv-auto} @var{length}) 4815@item (@code{iv-auto} @var{length})
4816This will generate an IV (Initialization Vector) of the specified 4816This generates a random IV (Initialization Vector) of the specified
4817length using the GnuTLS @code{GNUTLS_RND_NONCE} generator and pass it 4817length and passes it to the function. This ensures that the IV is
4818to the function. This ensures that the IV is unpredictable and 4818unpredictable and unlikely to be reused in the same session.
4819unlikely to be reused in the same session. The actual value of the IV
4820is returned by the function as described below.
4821 4819
4822@end table 4820@end table
4823 4821