[PATCH 1/5] Add GOST R 34.11 to nettle_hashes

2017-08-05 Thread Dmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov --- nettle-meta-hashes.c | 1 + testsuite/meta-hash-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/nettle-meta-hashes.c b/nettle-meta-hashes.c index 2220968c070b..df6685399dd5 100644 --- a/nettle-meta-hashes.c +++

[PATCH 5/5] Add PBKDF2 support for gosthash94cp

2017-08-05 Thread Dmitry Eremin-Solenikov
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 (http://tc26.ru/methods/containers_v1/Addition_to_PKCS5_v1_0.pdf). Add test vectors from that document and a special

[PATCH 0/5] Improve GOST R 34.11-94 hash function support

2017-08-05 Thread Dmitry Eremin-Solenikov
This in an excerpt from previously sent patch set [PATCH 00/13] GOST cipher/MAC/hash algorithms support This patch series concentrates on gosthash94 support. It adds gosthash94cp -- GOST R 34.11-94 variant using more popular S-Box and implements HMAC and PBKDF2 interfaes for GOST hashing

[PATCH 3/5] Add support for GOSTHASH94CP: GOST R 34.11-94 hash with CryptoPro S-box

2017-08-05 Thread Dmitry Eremin-Solenikov
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

[PATCH 4/5] Add HMAC functions for GOSTHASH94 and GOSTHASH94CP

2017-08-05 Thread Dmitry Eremin-Solenikov
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 | 1 + hmac-gosthash94.c | 79

[PATCH 8/8] Implement Ed448 signature scheme

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno Signed-off-by: Daiki Ueno --- Makefile.in | 4 +- ecc-192.c | 1 + ecc-224.c | 1 + ecc-25519.c | 1 + ecc-256.c | 1 +

[PATCH 5/8] ecc-eh-to-a, eddsa-sign: Parameterize hard-coded value

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno This allows the same code to be reused in curve448 and Ed448. Signed-off-by: Daiki Ueno --- ecc-eh-to-a.c | 2 +- eddsa-sign.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ecc-eh-to-a.c b/ecc-eh-to-a.c index

[PATCH 2/8] eccdata: Emit correct ecc_Bmodq_shifted for curve448

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno In curve448, the bit size of the order is slightly smaller than the one of p's. Adjust ecc_Bmodq_shifted accordingly. Signed-off-by: Daiki Ueno --- eccdata.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH 3/8] eccdata: Redirect ecc_point_out to given stream, instead of stderr

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno Signed-off-by: Daiki Ueno --- eccdata.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eccdata.c b/eccdata.c index 9be9afb5..97a61941 100644 --- a/eccdata.c +++ b/eccdata.c @@ -694,11 +694,11 @@ ecc_point_out

[PATCH 6/8] Implement curve448 primitives

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno This patch adds the necessary primitives for "curve448": namely, addition, doubling, scalar multiplication of the generator or an arbitrary point, inversion, and square root. Although the interface is similar to curve25519, the implementation is slightly

[PATCH 0/8] Implement Curve448 ECDH and Ed448

2017-08-05 Thread Daiki Ueno
Hello, This patch series implements the Curve448 Diffie-Hellman protocol (RFC 7748) and the Ed448 signature scheme (RFC 8032). Although I tried to make it as close as possible to the Curve25519 and Ed25519 implementations, I had to add a few special cases, namely: - for Curve448, eccdata

[PATCH 1/8] ecc-mul-test: Fix mpn_cmp calls

2017-08-05 Thread Daiki Ueno
From: Daiki Ueno Signed-off-by: Daiki Ueno --- testsuite/ecc-mul-a-test.c | 2 +- testsuite/ecc-mul-g-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/ecc-mul-a-test.c b/testsuite/ecc-mul-a-test.c index