crypto: streebog - register Streebog in hash info for IMA
authorVitaly Chikunov <vt@altlinux.org>
Tue, 6 Nov 2018 21:00:02 +0000 (00:00 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Nov 2018 06:09:40 +0000 (14:09 +0800)
Register Streebog hash function in Hash Info arrays to let IMA use
it for its purposes.

Cc: linux-integrity@vger.kernel.org
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/hash_info.c
include/crypto/hash_info.h
include/uapi/linux/hash_info.h

index 7b1e0b188ce6a9caa32d4c903219c0b6fb0f9ee4..1dd095e4b45195f4acf47036ea6725ac1859604b 100644 (file)
@@ -32,6 +32,8 @@ const char *const hash_algo_name[HASH_ALGO__LAST] = {
        [HASH_ALGO_TGR_160]     = "tgr160",
        [HASH_ALGO_TGR_192]     = "tgr192",
        [HASH_ALGO_SM3_256]     = "sm3-256",
+       [HASH_ALGO_STREEBOG_256] = "streebog256",
+       [HASH_ALGO_STREEBOG_512] = "streebog512",
 };
 EXPORT_SYMBOL_GPL(hash_algo_name);
 
@@ -54,5 +56,7 @@ const int hash_digest_size[HASH_ALGO__LAST] = {
        [HASH_ALGO_TGR_160]     = TGR160_DIGEST_SIZE,
        [HASH_ALGO_TGR_192]     = TGR192_DIGEST_SIZE,
        [HASH_ALGO_SM3_256]     = SM3256_DIGEST_SIZE,
+       [HASH_ALGO_STREEBOG_256] = STREEBOG256_DIGEST_SIZE,
+       [HASH_ALGO_STREEBOG_512] = STREEBOG512_DIGEST_SIZE,
 };
 EXPORT_SYMBOL_GPL(hash_digest_size);
index 56f217d41f12e376028ac67e4617633acd76dd21..91786b68dbdbaade4908249888995c074cb99c2d 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <crypto/sha.h>
 #include <crypto/md5.h>
+#include <crypto/streebog.h>
 
 #include <uapi/linux/hash_info.h>
 
index eea5d02c58dead0966ff088ec9cfc02cd25165a7..74a8609fcb4d38e3ac23a1c389f69d6f903bdb27 100644 (file)
@@ -33,6 +33,8 @@ enum hash_algo {
        HASH_ALGO_TGR_160,
        HASH_ALGO_TGR_192,
        HASH_ALGO_SM3_256,
+       HASH_ALGO_STREEBOG_256,
+       HASH_ALGO_STREEBOG_512,
        HASH_ALGO__LAST
 };