diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2018-11-06 16:00:02 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-16 01:09:40 -0500 |
commit | dfdda82e3b84c13601be09f8351ec4f15a4fbe03 (patch) | |
tree | 5458e5cf20ed2820d6531aecd44f344de767ffd5 | |
parent | fe18957e8e87403a9d4be8e8a62352ef107def99 (diff) |
crypto: streebog - register Streebog in hash info for IMA
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>
-rw-r--r-- | crypto/hash_info.c | 4 | ||||
-rw-r--r-- | include/crypto/hash_info.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/hash_info.h | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/crypto/hash_info.c b/crypto/hash_info.c index 7b1e0b188ce6..1dd095e4b451 100644 --- a/crypto/hash_info.c +++ b/crypto/hash_info.c | |||
@@ -32,6 +32,8 @@ const char *const hash_algo_name[HASH_ALGO__LAST] = { | |||
32 | [HASH_ALGO_TGR_160] = "tgr160", | 32 | [HASH_ALGO_TGR_160] = "tgr160", |
33 | [HASH_ALGO_TGR_192] = "tgr192", | 33 | [HASH_ALGO_TGR_192] = "tgr192", |
34 | [HASH_ALGO_SM3_256] = "sm3-256", | 34 | [HASH_ALGO_SM3_256] = "sm3-256", |
35 | [HASH_ALGO_STREEBOG_256] = "streebog256", | ||
36 | [HASH_ALGO_STREEBOG_512] = "streebog512", | ||
35 | }; | 37 | }; |
36 | EXPORT_SYMBOL_GPL(hash_algo_name); | 38 | EXPORT_SYMBOL_GPL(hash_algo_name); |
37 | 39 | ||
@@ -54,5 +56,7 @@ const int hash_digest_size[HASH_ALGO__LAST] = { | |||
54 | [HASH_ALGO_TGR_160] = TGR160_DIGEST_SIZE, | 56 | [HASH_ALGO_TGR_160] = TGR160_DIGEST_SIZE, |
55 | [HASH_ALGO_TGR_192] = TGR192_DIGEST_SIZE, | 57 | [HASH_ALGO_TGR_192] = TGR192_DIGEST_SIZE, |
56 | [HASH_ALGO_SM3_256] = SM3256_DIGEST_SIZE, | 58 | [HASH_ALGO_SM3_256] = SM3256_DIGEST_SIZE, |
59 | [HASH_ALGO_STREEBOG_256] = STREEBOG256_DIGEST_SIZE, | ||
60 | [HASH_ALGO_STREEBOG_512] = STREEBOG512_DIGEST_SIZE, | ||
57 | }; | 61 | }; |
58 | EXPORT_SYMBOL_GPL(hash_digest_size); | 62 | EXPORT_SYMBOL_GPL(hash_digest_size); |
diff --git a/include/crypto/hash_info.h b/include/crypto/hash_info.h index 56f217d41f12..91786b68dbdb 100644 --- a/include/crypto/hash_info.h +++ b/include/crypto/hash_info.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <crypto/sha.h> | 16 | #include <crypto/sha.h> |
17 | #include <crypto/md5.h> | 17 | #include <crypto/md5.h> |
18 | #include <crypto/streebog.h> | ||
18 | 19 | ||
19 | #include <uapi/linux/hash_info.h> | 20 | #include <uapi/linux/hash_info.h> |
20 | 21 | ||
diff --git a/include/uapi/linux/hash_info.h b/include/uapi/linux/hash_info.h index eea5d02c58de..74a8609fcb4d 100644 --- a/include/uapi/linux/hash_info.h +++ b/include/uapi/linux/hash_info.h | |||
@@ -33,6 +33,8 @@ enum hash_algo { | |||
33 | HASH_ALGO_TGR_160, | 33 | HASH_ALGO_TGR_160, |
34 | HASH_ALGO_TGR_192, | 34 | HASH_ALGO_TGR_192, |
35 | HASH_ALGO_SM3_256, | 35 | HASH_ALGO_SM3_256, |
36 | HASH_ALGO_STREEBOG_256, | ||
37 | HASH_ALGO_STREEBOG_512, | ||
36 | HASH_ALGO__LAST | 38 | HASH_ALGO__LAST |
37 | }; | 39 | }; |
38 | 40 | ||