Skip to content

Commit fe18957

Browse files
vt-altherbertx
authored andcommitted
crypto: streebog - add Streebog hash function
Add GOST/IETF Streebog hash function (GOST R 34.11-2012, RFC 6986) generic hash transformation. Cc: linux-integrity@vger.kernel.org Signed-off-by: Vitaly Chikunov <vt@altlinux.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent d65ddec commit fe18957

File tree

4 files changed

+1187
-0
lines changed

4 files changed

+1187
-0
lines changed

crypto/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,18 @@ config CRYPTO_SM3
939939
http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
940940
https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
941941

942+
config CRYPTO_STREEBOG
943+
tristate "Streebog Hash Function"
944+
select CRYPTO_HASH
945+
help
946+
Streebog Hash Function (GOST R 34.11-2012, RFC 6986) is one of the Russian
947+
cryptographic standard algorithms (called GOST algorithms).
948+
This setting enables two hash algorithms with 256 and 512 bits output.
949+
950+
References:
951+
https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
952+
https://tools.ietf.org/html/rfc6986
953+
942954
config CRYPTO_TGR192
943955
tristate "Tiger digest algorithms"
944956
select CRYPTO_HASH

crypto/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
7171
obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o
7272
obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o
7373
obj-$(CONFIG_CRYPTO_SM3) += sm3_generic.o
74+
obj-$(CONFIG_CRYPTO_STREEBOG) += streebog_generic.o
7475
obj-$(CONFIG_CRYPTO_WP512) += wp512.o
7576
CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
7677
obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o

0 commit comments

Comments
 (0)