summaryrefslogtreecommitdiffstats
path: root/Documentation/security/siphash.rst
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-05-02 20:24:25 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-05-08 07:32:17 +0200
commit6b0b0fa2bce61db790efc8070ae6e5696435b0a8 (patch)
treee849f9c027696010b95ebec127d4b4b86196f8f8 /Documentation/security/siphash.rst
parentcrypto: s390/sha1 - prefix the "sha1_" functions (diff)
downloadlinux-6b0b0fa2bce61db790efc8070ae6e5696435b0a8.tar.xz
linux-6b0b0fa2bce61db790efc8070ae6e5696435b0a8.zip
crypto: lib/sha1 - rename "sha" to "sha1"
The library implementation of the SHA-1 compression function is confusingly called just "sha_transform()". Alongside it are some "SHA_" constants and "sha_init()". Presumably these are left over from a time when SHA just meant SHA-1. But now there are also SHA-2 and SHA-3, and moreover SHA-1 is now considered insecure and thus shouldn't be used. Therefore, rename these functions and constants to make it very clear that they are for SHA-1. Also add a comment to make it clear that these shouldn't be used. For the extra-misleadingly named "SHA_MESSAGE_BYTES", rename it to SHA1_BLOCK_SIZE and define it to just '64' rather than '(512/8)' so that it matches the same definition in <crypto/sha.h>. This prepares for merging <linux/cryptohash.h> into <crypto/sha.h>. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'Documentation/security/siphash.rst')
-rw-r--r--Documentation/security/siphash.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/security/siphash.rst b/Documentation/security/siphash.rst
index 4eba68cdf0a1..bd9363025fcb 100644
--- a/Documentation/security/siphash.rst
+++ b/Documentation/security/siphash.rst
@@ -7,7 +7,7 @@ SipHash - a short input PRF
SipHash is a cryptographically secure PRF -- a keyed hash function -- that
performs very well for short inputs, hence the name. It was designed by
cryptographers Daniel J. Bernstein and Jean-Philippe Aumasson. It is intended
-as a replacement for some uses of: `jhash`, `md5_transform`, `sha_transform`,
+as a replacement for some uses of: `jhash`, `md5_transform`, `sha1_transform`,
and so forth.
SipHash takes a secret key filled with randomly generated numbers and either