Re: TMP_DECL_ALIGN (was: Re: [PATCH v2 1/2] Implement PSS encoding functions)

2018-02-19 Thread Nikos Mavrogiannopoulos
On Sun, 2018-02-18 at 22:30 +0100, Niels Möller wrote: > ni...@lysator.liu.se (Niels Möller) writes: > > > For now, I think I'll fix this, and add a TMP_ALIGN_DECL, > > TMP_ALIGN_ALLOC. > > Below patch seems to work. Other options? > > Regards, > /Niels > > diff --git a/nettle-internal.h

Re: [PATCH v2 1/2] Implement PSS encoding functions

2018-02-19 Thread Nikos Mavrogiannopoulos
On Sat, 2018-02-17 at 23:55 +0100, Niels Möller wrote: > ni...@lysator.liu.se (Niels Möller) writes: > > > Daiki Ueno writes: > > > > > I have incorporated the suggested changes here: > > > https://gitlab.com/dueno/nettle/commits/wip/dueno/rsa-padding > > > > Thanks! > > > >

TMP_DECL_ALIGN (was: Re: [PATCH v2 1/2] Implement PSS encoding functions)

2018-02-18 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > For now, I think I'll fix this, and add a TMP_ALIGN_DECL, > TMP_ALIGN_ALLOC. Below patch seems to work. Other options? Regards, /Niels diff --git a/nettle-internal.h b/nettle-internal.h index 38c8d2a8..b109e944 100644 --- a/nettle-internal.h +++

Re: [PATCH v2 1/2] Implement PSS encoding functions

2018-02-18 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > In testsuite/Makefile.in, pss-mgf1-test.c is listed in > TS_NETTLE_SOURCES. Should be moved to TS_HOGWEED_SOURCES, to not get > link failured in builds without hogweed. Right? Moved now. > Both pss_mgf1 and pss_encode_mgf1 allocate the hash context

Re: [PATCH v2 1/2] Implement PSS encoding functions

2018-02-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Daiki Ueno writes: > >> I have incorporated the suggested changes here: >> https://gitlab.com/dueno/nettle/commits/wip/dueno/rsa-padding > > Thanks! > > I've added these changes on a branch merge-pss in the main repo, > together with

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-04-09 Thread Niels Möller
Daiki Ueno writes: >> I'd suggest >> >> VALGRIND_MAKE_MEM_DEFINED(m, sizeof(*m)); >> VALGRIND_MAKE_MEM_DEFINED(m->_mp_d, sizeof(mp_limb_t) * mpz_size(m)); >> >> The first is a bit tricky since the mpz_t is a typedef:ed array, I hope >> I got it right. > > Fixed, thanks for

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-04-04 Thread Niels Möller
Daiki Ueno writes: > I have incorporated the suggested changes here: > https://gitlab.com/dueno/nettle/commits/wip/dueno/rsa-padding Thanks! I've added these changes on a branch merge-pss in the main repo, together with some smaller post-merge cleanups. I'm considering renaming

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-03-20 Thread Daiki Ueno
Hello, ni...@lysator.liu.se (Niels Möller) writes: > I hope you're ok if we do this piecewise. Here are comments on some on > the pieces. Sure, I really appreciate that :-) I have incorporated the suggested changes here: https://gitlab.com/dueno/nettle/commits/wip/dueno/rsa-padding If you

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-03-18 Thread Niels Möller
Daiki Ueno writes: > ni...@lysator.liu.se (Niels Möller) writes: > > Thank you for the detailed comments. Please find attached the updated > patches. I hope you're ok if we do this piecewise. Here are comments on some on the pieces. >>> + mgf1.h \ >> >> mgf1.h is intended as

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-03-17 Thread Daiki Ueno
ni...@lysator.liu.se (Niels Möller) writes: Thank you for the detailed comments. Please find attached the updated patches. >> + mgf1.h \ > > mgf1.h is intended as a public, rather than internal, header? Maybe > rename to pss-mgf1.h, unless you foresee some non-pss use for it. RSA-OAEP

Re: [PATCH v2 1/2] Implement PSS encoding functions

2017-03-12 Thread Niels Möller
Daiki Ueno writes: > From: Daiki Ueno Comments and questions on patch 1/2: > index 135542f..035074c 100644 > --- a/Makefile.in > +++ b/Makefile.in > @@ -110,6 +110,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \ >md2.c md2-meta.c

[PATCH v2 1/2] Implement PSS encoding functions

2017-03-02 Thread Daiki Ueno
From: Daiki Ueno Signed-off-by: Daiki Ueno --- There was an obvious buffer overrun in mgf1-test.c, which should be fixed in this version. --- Makefile.in| 5 +- mgf1-sha256.c | 47 +++ mgf1-sha384.c | 47