Hash function GOST R 34.11-94 (gosthash94) in its compression function
uses Russian block cipher (GOST 28147-89, Magma). Start separating block
cipher code from hash function code. For now there is no public
interface for this cipher, it will be added later.
Signed-off-by: Dmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov
---
gosthash94.c | 43 +--
gosthash94.h | 5 +++--
2 files changed, 12 insertions(+), 36 deletions(-)
diff --git a/gosthash94.c b/gosthash94.c
index 954130f741e9..b1ea98736b0d 100644
--- a/gosthash94.c
+++
Russian technical comitee working on standartization of cryptography
algorithms has published the document describing usage of GOST R
34.11-94 hash function with PBKDF2 algorithm (MR 26.2.001-2012).
Add test vectors from that document and a special function implementing
Nettle interface for PBKDF2
GOST hash functions can be used to generate MAC using HMAC algorithm.
Add functions implementing HMAC with GOSTHASH94/GOSTHASH94CP.
Signed-off-by: Dmitry Eremin-Solenikov
---
Makefile.in | 5 +--
hmac-gosthash94.c | 79 +++
hmac.h
Add entries for gosthash94 and gosthash94cp in nettle_hashes array.
Signed-off-by: Dmitry Eremin-Solenikov
---
nettle-meta-hashes.c | 2 ++
testsuite/meta-hash-test.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/nettle-meta-hashes.c b/nettle-meta-hashes.c
index
Hash gosthash94 implements GOST R 34.11-94 standard using S-Box defined
in the standard 'for testing purposes only'. RFC 4357 defines S-Box
(CryptoPro one) for GOST R 34.11-94 hash function that is widely used in
applications. Add separate hash function algorithm (gosthash94cp)
implementing GOST R