Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: FIPS 202 SHA-3 register in hash info for IMA

Register FIPS 202 SHA-3 hashes in hash info for IMA and other
users. Sizes 256 and up, as 224 is too weak for any practical
purposes.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dimitri John Ledkov and committed by
Herbert Xu
4b057654 2ee7c1bc

+10
+6
crypto/hash_info.c
··· 29 29 [HASH_ALGO_SM3_256] = "sm3", 30 30 [HASH_ALGO_STREEBOG_256] = "streebog256", 31 31 [HASH_ALGO_STREEBOG_512] = "streebog512", 32 + [HASH_ALGO_SHA3_256] = "sha3-256", 33 + [HASH_ALGO_SHA3_384] = "sha3-384", 34 + [HASH_ALGO_SHA3_512] = "sha3-512", 32 35 }; 33 36 EXPORT_SYMBOL_GPL(hash_algo_name); 34 37 ··· 56 53 [HASH_ALGO_SM3_256] = SM3256_DIGEST_SIZE, 57 54 [HASH_ALGO_STREEBOG_256] = STREEBOG256_DIGEST_SIZE, 58 55 [HASH_ALGO_STREEBOG_512] = STREEBOG512_DIGEST_SIZE, 56 + [HASH_ALGO_SHA3_256] = SHA3_256_DIGEST_SIZE, 57 + [HASH_ALGO_SHA3_384] = SHA3_384_DIGEST_SIZE, 58 + [HASH_ALGO_SHA3_512] = SHA3_512_DIGEST_SIZE, 59 59 }; 60 60 EXPORT_SYMBOL_GPL(hash_digest_size);
+1
include/crypto/hash_info.h
··· 10 10 11 11 #include <crypto/sha1.h> 12 12 #include <crypto/sha2.h> 13 + #include <crypto/sha3.h> 13 14 #include <crypto/md5.h> 14 15 #include <crypto/streebog.h> 15 16
+3
include/uapi/linux/hash_info.h
··· 35 35 HASH_ALGO_SM3_256, 36 36 HASH_ALGO_STREEBOG_256, 37 37 HASH_ALGO_STREEBOG_512, 38 + HASH_ALGO_SHA3_256, 39 + HASH_ALGO_SHA3_384, 40 + HASH_ALGO_SHA3_512, 38 41 HASH_ALGO__LAST 39 42 }; 40 43