Skip to content

crypto: streebog - add Streebog hash function

Vitaly Chikunov linux-crypto linux-integrity lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 2 repliesIn review
  2. v33 patches 6 repliesSuperseded
  3. v22 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches1 replySuperseded

Changes in v4 from the cover letter

- Remove not needed includes, and register, inline, const, ULL, and __aligned specifiers.
- Covert define macros into functions.
- Use block size define instead of a number.
- Rename algorithm names sb256, sb512 to streebog256, streebog512.
- Rename bufsize to a more meaningful name (fillsize).
- Prefix all static functions names with streebog_.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3crypto: streebog - add Streebog hash functioncrypto/Kconfig crypto/Makefile crypto/streebog_generic.c +1 more+1187 -01 reply
2/3crypto: streebog - register Streebog in hash info for IMAcrypto/hash_info.c include/crypto/hash_info.h include/uapi/linux/hash_info.h+7 -00 replies
3/3crypto: streebog - add Streebog test vectorscrypto/tcrypt.c crypto/testmgr.c crypto/testmgr.h+177 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMimi ZoharArd Biesheuvel
1/3R-b
2/3R-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] crypto: streebog - add Streebog hash function

Add GOST/IETF Streebog hash function (GOST R 34.11-2012, RFC 6986) generic hash transformation with appropriate testmgr and tcrypt tests and vectors.

Streebog Hash Function (GOST R 34.11-2012, RFC 6986) is one of the Russian cryptographic standard algorithms (called GOST algorithms).

Intended user is the IMA subsystem, which does not need any particular patching besides adding the hash names into Hash Info arrays, this is also done in this patchset.

References:
https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
https://tools.ietf.org/html/rfc6986

Tested using testmgr and tcrypt on (LE) x86_64, arm, arm64, and (BE) s390x in qemu.

Changes from v1:
- Fix of big-endian problem in add512.
- More architectures are tested, including big-endian and 32-bit.

Changes from v2:
- Register hash in Hash Info for use by IMA.
- Add hmac() tests.

Changes from v3:
- Remove not needed includes, and register, inline, const, ULL, and __aligned specifiers.
- Covert define macros into functions.
- Use block size define instead of a number.
- Rename algorithm names sb256, sb512 to streebog256, streebog512.
- Rename bufsize to a more meaningful name (fillsize).
- Prefix all static functions names with streebog_.

Vitaly Chikunov (3):
crypto: streebog - add Streebog hash function
crypto: streebog - register Streebog in hash info for IMA
crypto: streebog - add Streebog test vectors

 crypto/Kconfig                 |   12 +
 crypto/Makefile                |    1 +
 crypto/hash_info.c             |    4 +
 crypto/streebog_generic.c      | 1140 ++++++++++++++++++++++++++++++++++++++++
 crypto/tcrypt.c                |   37 ++
 crypto/testmgr.c               |   24 +
 crypto/testmgr.h               |  116 ++++
 include/crypto/hash_info.h     |    1 +
 include/crypto/streebog.h      |   34 ++
 include/uapi/linux/hash_info.h |    2 +
 10 files changed, 1371 insertions(+)
 create mode 100644 crypto/streebog_generic.c
 create mode 100644 include/crypto/streebog.h
Signature · 1 line
2.11.0