From: Vitaly Chikunov <vt@altlinux.org>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Philippe Ombredanne <pombredanne@nexb.com>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vitaly Chikunov <vt@altlinux.org>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/3] crypto: streebog - register Streebog in hash info for IMA
Date: Wed, 24 Oct 2018 06:23:50 +0300 [thread overview]
Message-ID: <20181024032356.3388-3-vt@altlinux.org> (raw)
In-Reply-To: <20181024032356.3388-1-vt@altlinux.org>
Register Streebog hash function in Hash Info arrays to let IMA use
it for its purposes.
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
crypto/hash_info.c | 4 ++++
include/crypto/hash_info.h | 1 +
include/uapi/linux/hash_info.h | 2 ++
3 files changed, 7 insertions(+)
diff --git a/crypto/hash_info.c b/crypto/hash_info.c
index 7b1e0b188ce6..b0b91eb0973a 100644
--- a/crypto/hash_info.c
+++ b/crypto/hash_info.c
@@ -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_SB256] = "sb256",
+ [HASH_ALGO_SB512] = "sb512",
};
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_SB256] = STREEBOG256_DIGEST_SIZE,
+ [HASH_ALGO_SB512] = STREEBOG512_DIGEST_SIZE,
};
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 @@
#include <crypto/sha.h>
#include <crypto/md5.h>
+#include <crypto/streebog.h>
#include <uapi/linux/hash_info.h>
diff --git a/include/uapi/linux/hash_info.h b/include/uapi/linux/hash_info.h
index eea5d02c58de..5e8b8d952ba0 100644
--- a/include/uapi/linux/hash_info.h
+++ b/include/uapi/linux/hash_info.h
@@ -33,6 +33,8 @@ enum hash_algo {
HASH_ALGO_TGR_160,
HASH_ALGO_TGR_192,
HASH_ALGO_SM3_256,
+ HASH_ALGO_SB256,
+ HASH_ALGO_SB512,
HASH_ALGO__LAST
};
--
2.11.0
next prev parent reply other threads:[~2018-10-24 3:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 3:23 [PATCH v3 0/3] crypto: streebog - add Streebog hash function Vitaly Chikunov
2018-10-24 3:23 ` [PATCH v3 1/3] " Vitaly Chikunov
2018-11-05 13:22 ` Ard Biesheuvel
2018-11-05 14:36 ` Vitaly Chikunov
2018-11-05 18:23 ` Vitaly Chikunov
2018-11-05 18:58 ` Ard Biesheuvel
2018-10-24 3:23 ` Vitaly Chikunov [this message]
2018-11-05 13:23 ` [PATCH v3 2/3] crypto: streebog - register Streebog in hash info for IMA Ard Biesheuvel
2018-10-24 3:23 ` [PATCH v3 3/3] crypto: streebog - add Streebog test vectors Vitaly Chikunov
2018-11-05 13:24 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181024032356.3388-3-vt@altlinux.org \
--to=vt@altlinux.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=kstewart@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).