Re: Armeb is broken

2020-02-21 Thread Dmitry Baryshkov
Hello, вт, 18 февр. 2020 г. в 13:30, Michael Weiser : > On Tue, Feb 18, 2020 at 02:28:50AM +0300, Андрей Аладьев wrote: > > Hello, please see the following gnutls issue > > https://gitlab.com/gnutls/gnutls/issues/941. > > > Nettle today is working on aarch64, aarch64_be and arm, but broken on arme

Re: Armeb is broken

2020-02-23 Thread Dmitry Baryshkov
If I remember correctly, ARMv5 be was BE-32 -- With best wishes Dmitry вс, 23 февр. 2020 г., 18:45 Michael Weiser : > Hi all, > > On Sat, Feb 22, 2020 at 07:43:18PM +0100, Michael Weiser wrote: > > > > 2. Eliminate use of rev in the armbe code. > > ... I've been looking at the revs and they now

Re: Armeb is broken

2020-02-23 Thread Dmitry Baryshkov
I will check with fresh Yocto build later or tomorrow. -- With best wishes Dmitry вс, 23 февр. 2020 г., 19:08 Dmitry Baryshkov : > If I remember correctly, ARMv5 be was BE-32 > > -- > With best wishes > Dmitry > > вс, 23 февр. 2020 г., 18:45 Michael Weiser : > >>

Re: Armeb is broken

2020-02-24 Thread Dmitry Baryshkov
Hello, вс, 23 февр. 2020 г. в 20:00, Michael Weiser : > > Hi Dmitry, > > On Sun, Feb 23, 2020 at 07:09:43PM +0300, Dmitry Baryshkov wrote: > > > I will check with fresh Yocto build later or tomorrow. > > Thanks! I have checked both armv7vet2b and armv5eb targets with

Re: Armeb is broken

2020-03-02 Thread Dmitry Baryshkov
Hello, пн, 2 мар. 2020 г. в 21:44, Niels Möller : > > I've been offline, skiiing, for a week, and I haven't yet caught up we > email. http://www.lysator.liu.se/~nisse/misc/s%C3%A5nfj%C3%A4llet.jpg > > Michael Weiser writes: > > > Hi Niels, > > > > On Sat, Feb 22, 2020 at 07:58:10AM +0100, Niels M

Re: Nettle-3.6 soon

2020-04-05 Thread Dmitry Baryshkov
Hi, вс, 5 апр. 2020 г. в 21:03, Niels Möller : > > Hi, > > I've updated the NEWS file, and I don't think there are any easy changes > pending. Please let me know ASAP if there's anything missing in NEWS, or > if there are additional changes you think ought to be included before > release. GnuTLS

Re: Nettle-3.6 soon

2020-04-06 Thread Dmitry Baryshkov
Hello, вс, 5 апр. 2020 г. в 23:27, Niels Möller : > Dmitry Baryshkov writes: > > > GnuTLS project would like to ask you to bump libhogweed soname as a > > way to enforce recompilation because of the ecc-internal.h usage. > > I guess that makes sense. It will inconven

Re: Nettle-3.6 soon

2020-04-07 Thread Dmitry Baryshkov
пн, 6 апр. 2020 г. в 20:46, Niels Möller : > > Dmitry Baryshkov writes: > > > вс, 5 апр. 2020 г. в 23:27, Niels Möller : > >> Dmitry Baryshkov writes: > >> > >> > GnuTLS project would like to ask you to bump libhogweed soname as a > >> > w

Re: Nettle-3.6 soon

2020-04-12 Thread Dmitry Baryshkov
nettle-benchmark freezes on Android, because clang optimized away the bench_nothing function. Attached the proposed patch. -- With best wishes Dmitry вс, 5 апр. 2020 г., 21:03 Niels Möller : > Hi, > > I've updated the NEWS file, and I don't think there are any easy changes > pending. Please let

Re: Nettle-3.6 soon

2020-04-12 Thread Dmitry Baryshkov
Hello, вс, 12 апр. 2020 г. в 20:23, Andreas Metzler : > > On 2020-04-12 Niels Möller wrote: > > Andreas Metzler writes: > > >> According to objdump -R GnuTLS uses internal symbols of both libhogweed > >> and libnettle (e.g. _nettle_mpn_set_base256_le@HOGWEED_INTERNAL_5_0 and > >> _nettle_write_

Re: Nettle-3.6 soon

2020-04-13 Thread Dmitry Baryshkov
Hello, пн, 13 апр. 2020 г. в 09:52, Niels Möller : > > Dmitry Baryshkov writes: > > >> for x86_64-linux-gnu gnutls builds against nettle 3.5 and 3.6 (the > >> latter patched to bump nettle soname, too). I am not an expert in this > >> area - I think this ge

Re: Nettle-3.6 soon

2020-04-13 Thread Dmitry Baryshkov
Hello, пн, 13 апр. 2020 г. в 13:24, Niels Möller : > > Dmitry Baryshkov writes: > > > I remember your answer about not delaying the release. > > We can wait a few days to understand the references to NETTLE_INTERNAL. > But if there's no other easy fix, I'll ju

Re: Nettle-3.6 soon

2020-04-13 Thread Dmitry Baryshkov
пн, 13 апр. 2020 г. в 15:08, Niels Möller : > >> I'm not sure I understand the implications. Getting it in would let > >> GnuTLS drop some of the references to HOGWEED_INTERNAL, is that what you > >> mean with simplify, or something different? But all of them? And it > >> doesn't look like it would

Re: Nettle-3.6 soon

2020-04-13 Thread Dmitry Baryshkov
Hello, вс, 12 апр. 2020 г. в 21:37, Niels Möller : > > 001d48f8 R_X86_64_JUMP_SLOT > > _nettle_poly1305_block@NETTLE_INTERNAL_7_0 > > The last is non-trivial, and it seems it is declared in the installed > header poly1305.h (which is a mistake; other internal declarations were > moved t

[PATCH] poly1305: make internal symbols internal

2020-04-13 Thread Dmitry Baryshkov
Make low-level poly1305 functions that were marked as "internal" in public header file really internal. Change their prefix from nettle to _nettle. Signed-off-by: Dmitry Baryshkov --- chacha-poly1305.c| 5 +++-- poly1305-aes.c | 5 +++-- poly1305-

Re: [PATCH] poly1305: make internal symbols internal

2020-04-14 Thread Dmitry Baryshkov
Hello, вт, 14 апр. 2020 г. в 08:19, Niels Möller : > > Dmitry Baryshkov writes: > > > Make low-level poly1305 functions that were marked as "internal" in > > public header file really internal. Change their prefix from nettle to > > _nettle. > > Th

[PATCH v2] poly1305: make internal symbols internal

2020-04-14 Thread Dmitry Baryshkov
Make low-level poly1305 functions that were marked as "internal" in public header file really internal. Change their prefix from nettle to _nettle. Signed-off-by: Dmitry Baryshkov --- chacha-poly1305.c| 5 +-- poly1305-aes.c | 5 +-- poly1305-internal.c

Re: [PATCH] Implement GOST VKO key derivation algorithm

2020-04-14 Thread Dmitry Baryshkov
вт, 14 апр. 2020 г. в 21:45, Niels Möller : > > Hi, at last I've had a closer look at this patch you posted mid > February. > > dbarysh...@gmail.com writes: > > > +int > > +gostdsa_vko(const struct ecc_scalar *key, > > + const struct ecc_point *pub, > > + size_t ukm_length, const ui

Re: [PATCH] Implement GOST VKO key derivation algorithm

2020-04-14 Thread Dmitry Baryshkov
Hello, вт, 14 апр. 2020 г. в 21:45, Niels Möller : > > Hi, at last I've had a closer look at this patch you posted mid > February. On the second consideration this patch depends on https://git.lysator.liu.se/nettle/nettle/-/merge_requests/6, which also was never reviewed. So let's drop it for now

[PATCH] ecc-random: don't apply bitwise operation to boolean arguments

2020-04-14 Thread Dmitry Baryshkov
ecdsa_in_range applies bitwise and to int and boolean arguments, which can result in unpredictable behaviour. Use logical and instead. Signed-off-by: Dmitry Baryshkov --- ecc-random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecc-random.c b/ecc-random.c index

Re: Nettle-3.6 soon

2020-04-15 Thread Dmitry Baryshkov
пн, 13 апр. 2020 г. в 18:11, Dmitry Baryshkov : > > Hello, > > вс, 12 апр. 2020 г. в 21:37, Niels Möller : > > > > 001d48f8 R_X86_64_JUMP_SLOT > > > _nettle_poly1305_block@NETTLE_INTERNAL_7_0 > > > > The last is non-trivial, and it see

[PATCH v2] Implement GOST VKO key derivation algorithm

2020-04-17 Thread Dmitry Baryshkov
From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Baryshkov --- Makefile.in | 2 +- gostdsa-vko.c| 94 gostdsa.h| 7 +++ testsuite/.gitignore | 1 + testsuite/.test-rules.make | 3

Re: [PATCH v2] Implement GOST VKO key derivation algorithm

2020-04-19 Thread Dmitry Baryshkov
Hello, вс, 19 апр. 2020 г. в 17:13, Niels Möller : > > Dmitry Baryshkov writes: > > > From: Dmitry Eremin-Solenikov > > Thanks for the update and explanation. > > > +/* > > + * Shared key derivation/key agreement for GOST DSA algorithm. > > + * It is de

[PATCH v3] Implement GOST VKO key derivation algorithm

2020-04-21 Thread Dmitry Baryshkov
From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Baryshkov --- Makefile.in | 2 +- gostdsa-vko.c| 96 gostdsa.h| 7 +++ nettle.texinfo | 15 ++ testsuite/.gitignore | 1

Re: [PATCH v3] Implement GOST VKO key derivation algorithm

2020-04-21 Thread Dmitry Baryshkov
вт, 21 апр. 2020 г. в 19:42, Niels Möller : > > Merged patch onto the master-updates branch. Thank you! -- With best wishes Dmitry ___ nettle-bugs mailing list nettle-bugs@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Re: ANNOUNCE: Nettle-3.6

2020-05-04 Thread Dmitry Baryshkov
or SHAKE256 (SHA3 variant with arbitrary output > size). Contributed by Daiki Ueno. > > * Support for SIV-CMAC (Synthetic Initialization Vector) mode, > contributed by Nikos Mavrogiannopoulos. > > * Support for CMAC64, contributed by Dmitry Ba

Re: ANNOUNCE: Nettle-3.6

2020-05-04 Thread Dmitry Baryshkov
Thank you! -- With best wishes Dmitry пн, 4 мая 2020 г., 20:24 Niels Möller : > Dmitry Baryshkov writes: > > > I just wanted to point that git tree was not updated for the release. > > Thanks for telling me! Should be up to date now. > > I think the way it happened,

Re: [PATCH] gitlab-ci: reenable GOST compilation

2020-05-08 Thread Dmitry Baryshkov
вт, 11 февр. 2020 г. в 22:58, : > > From: Dmitry Baryshkov > > GnuTLS is now compatible again with Nettle master branch. Remove > --disable-gost. Is there a chance to get this applied? We have corresponding test in GnuTLS CI, but it would be nice to have it on both sides.

Re: [PATCH 1/2] Change ecc_mod_*mul_1 to be per-module callbacks

2020-05-08 Thread Dmitry Baryshkov
Hello, вс, 16 февр. 2020 г. в 00:00, : > > From: Dmitry Baryshkov > > GOST curves will require different "fixups" for fast (mul X mod p) > operations. Move these operations to ecc_modulo structure and call them > via function pointer. These two patches were pos

[PATCH 1/2] Implement GOST R 34.11-2012 (Streebog) hash function

2020-05-22 Thread Dmitry Baryshkov
+ &nettle_gosthash94cp, &nettle_streebog256, + &nettle_streebog512, NULL }; diff --git a/hmac-streebog-meta.c b/hmac-streebog-meta.c new file mode 100644 index ..d6028307aa5a --- /dev/null +++ b/hmac-streebog-meta.c @@ -0,0 +1,56 @@ +/* hmac-streebog-meta.c +

[PATCH 2/2] test/gostdsa-vko: add hashed test vectors from RFC 7836

2020-05-22 Thread Dmitry Baryshkov
It was not possible to check gostdsa_vko test vectors with the outputs from RFC 7836 because Nettle lacked Streebog hash function. Now as the function is supported, add full test vectors. Signed-off-by: Dmitry Baryshkov --- testsuite/gostdsa-vko-test.c | 45

[PATCH v2 4/8] hmac: add support for streebog256/512 hash function

2020-06-02 Thread Dmitry Baryshkov
Add support for calculating HMAC using Streebog hash functions. Signed-off-by: Dmitry Baryshkov --- Makefile.in | 4 +-- hmac-streebog-meta.c | 56 ++ hmac-streebog.c | 73 +++ hmac.h

[PATCH v2 6/8] nettle-benchmark: bench Streebog hashes

2020-06-02 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- examples/nettle-benchmark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c index 69e34bfd7c9e..1ca277dd0651 100644 --- a/examples/nettle-benchmark.c +++ b/examples/nettle

[PATCH v2 5/8] fixup! Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-02 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- nettle-meta-hashes.c | 2 ++ nettle-meta.h | 2 ++ testsuite/meta-hash-test.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/nettle-meta-hashes.c b/nettle-meta-hashes.c index 27b576cdc58c..8e96dd414d23 100644 --- a/nettle-meta

[PATCH v2 3/8] nettle.texinfo: add documentation for Streebog hash function

2020-06-02 Thread Dmitry Baryshkov
Add documentation describing Streebog hash function and it's API. Signed-off-by: Dmitry Baryshkov --- nettle.texinfo | 72 ++ 1 file changed, 72 insertions(+) diff --git a/nettle.texinfo b/nettle.texinfo index 995d5de80813..2425b4f9d331 1

[PATCH v2 2/8] testsuite: add test for Streebog hash function

2020-06-02 Thread Dmitry Baryshkov
Add a testuite for Streebog hash function. Test vectors are based on RFC 6986. Signed-off-by: Dmitry Baryshkov --- testsuite/.gitignore | 1 + testsuite/Makefile.in | 2 +- testsuite/streebog-test.c | 90 +++ 3 files changed, 92 insertions(+), 1

[PATCH v2 8/8] test/gostdsa-vko: add hashed test vectors from RFC 7836

2020-06-02 Thread Dmitry Baryshkov
It was not possible to check gostdsa_vko test vectors with the outputs from RFC 7836 because Nettle lacked Streebog hash function. Now as the function is supported, add full test vectors. Signed-off-by: Dmitry Baryshkov --- testsuite/gostdsa-vko-test.c | 45

[PATCH v2 7/8] pbkdf2-test: add PBKDF2 tests using Streebog HMAC function

2020-06-02 Thread Dmitry Baryshkov
Add test vectors from R 50.1.111-2016 to verify using HMAC-STREEBOG in PBKDF2 function. Signed-off-by: Dmitry Baryshkov --- testsuite/pbkdf2-test.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/testsuite/pbkdf2-test.c b/testsuite/pbkdf2

[PATCH v2 1/8] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-02 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- Makefile.in |3 +- streebog-meta.c | 44 ++ streebog.c | 1334 +++ streebog.h | 99 4 files changed, 1479 insertions(+), 1 deletion(-) create mode 100644 streebog-meta.c create mode

Re: [PATCH 1/2] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-02 Thread Dmitry Baryshkov
Hello, вс, 31 мая 2020 г. в 11:11, Niels Möller : > > Dmitry Baryshkov writes: > > > From: Dmitry Eremin-Solenikov > > This is a bit too large to be easy to review in one go. Could you split > it into a patch with the streebog hash and basic tests only, and hmac >

Re: [PATCH v2 1/8] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-04 Thread Dmitry Baryshkov
Hello, чт, 4 июн. 2020 г. в 20:59, Niels Möller : > > Thanks for splitting this out for review. Looks pretty good, a few minor > comments below. > > Dmitry Baryshkov writes: > > > --- /dev/null > > +++ b/streebog.c > > @@ -0,0 +1,1334 @@ > > +/* stre

[PATCH v3] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-04 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- Makefile.in |3 +- streebog-meta.c | 44 ++ streebog.c | 1317 +++ streebog.h | 99 4 files changed, 1462 insertions(+), 1 deletion(-) create mode 100644 streebog-meta.c create mode

[PATCH] streebog: add to nettle-meta and nettle-meta-hashes

2020-06-05 Thread Dmitry Baryshkov
Add nettle_streebog256 and nettle_streebog512 to nettle meta interface. Signed-off-by: Dmitry Baryshkov --- nettle-meta-hashes.c | 2 ++ nettle-meta.h | 2 ++ testsuite/meta-hash-test.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/nettle-meta-hashes.c b/nettle-meta

Re: [PATCH v3] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-05 Thread Dmitry Baryshkov
Hello, пт, 5 июн. 2020 г. в 08:46, Niels Möller : > > Dmitry Baryshkov writes: > > > Signed-off-by: Dmitry Baryshkov > > --- > > Makefile.in |3 +- > > streebog-meta.c | 44 ++ > > streebog.c | 1317

Re: [PATCH v3] Implement GOST R 34.11-2012 (Streebog) hash function

2020-06-07 Thread Dmitry Baryshkov
Hello, сб, 6 июн. 2020 г. в 18:38, Niels Möller : > > Dmitry Baryshkov writes: > > > I've sent the fixup. I'm fine with it being squashed into this patch. > > Done. I've merged this patch and the test patch to master-updates now. I noticed that gnutls build f

Re: [PATCH v2 3/8] nettle.texinfo: add documentation for Streebog hash function

2020-06-14 Thread Dmitry Baryshkov
Hello, вт, 9 июн. 2020 г. в 19:53, Niels Möller : > > Dmitry Baryshkov writes: > > > Add documentation describing Streebog hash function and it's API. > > Is there any consensus on the cryptographic strength and general quality > of streebog? I wonder if it re

[PATCH v2 1/2] gost28147: move params to separate source file

2020-06-14 Thread Dmitry Baryshkov
Move big tables to separate source file. Signed-off-by: Dmitry Baryshkov --- Makefile.in| 2 +- gost28147-params.c | 571 + gost28147.c| 535 -- 3 files changed, 572 insertions(+), 536

[PATCH v2 2/2] Add GOST 28147-89 ECB encryption and decryption support

2020-06-14 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- Makefile.in| 2 +- gost28147-params.c | 11 + gost28147.c| 86 ++ gost28147.h| 85 + testsuite/Makefile.in | 2

Re: [PATCH v2 8/8] test/gostdsa-vko: add hashed test vectors from RFC 7836

2020-06-27 Thread Dmitry Baryshkov
сб, 20 июн. 2020 г. в 11:38, Niels Möller : > > Dmitry Baryshkov writes: > > > It was not possible to check gostdsa_vko test vectors with the outputs > > from RFC 7836 because Nettle lacked Streebog hash function. Now as the > > function is supported, add full test v

Re: [PATCH v2 3/8] nettle.texinfo: add documentation for Streebog hash function

2020-06-30 Thread Dmitry Baryshkov
Hello, вт, 30 июн. 2020 г. в 14:04, Niels Möller : > > Dmitry Baryshkov writes: > > > I wouldn't call it legacy (since it is an actual standard). What about > > adding the "Other hash functions" section? It can further receive > > algorithms such as