Re: [PATCH] ecc: rename source files with curves data

2019-12-06 Thread Niels Möller
Dmitry Eremin-Solenikov  writes:

> Any feedback on this change?

I think the renaming makes sense, but perhaps best to mere the curve448
changes first.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: [PATCH] ecc: rename source files with curves data

2019-12-05 Thread Dmitry Eremin-Solenikov
Hello,

чт, 5 дек. 2019 г. в 18:45, Dmitry Eremin-Solenikov :
>
> Any feedback on this change?
>
> I'm going to send patches adding 3 256-bit curves and 2 512-bit curves
> with another 256-bit and 512-bit curves waiting some restructuring of
> the code.
> It would be too easy to mix curves w/o this patch.

I'll send v2 rebased on top of curve448 branch.

>
> вс, 24 нояб. 2019 г. в 17:22, :
> >
> > From: Dmitry Eremin-Solenikov 
> >
> > In preparation to adding GOST curves support, rename source files and
> > use curve name as eccdata parameter.

-- 
With best wishes
Dmitry
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: [PATCH] ecc: rename source files with curves data

2019-12-05 Thread Dmitry Eremin-Solenikov
Any feedback on this change?

I'm going to send patches adding 3 256-bit curves and 2 512-bit curves
with another 256-bit and 512-bit curves waiting some restructuring of
the code.
It would be too easy to mix curves w/o this patch.

вс, 24 нояб. 2019 г. в 17:22, :
>
> From: Dmitry Eremin-Solenikov 
>
> In preparation to adding GOST curves support, rename source files and
> use curve name as eccdata parameter.
>
> Signed-off-by: Dmitry Eremin-Solenikov 
> ---
>  .gitignore| 12 ++---
>  Makefile.in   | 45 
>  ...cc-192-modp.asm => ecc-secp192r1-modp.asm} |  0
>  ...cc-224-modp.asm => ecc-secp224r1-modp.asm} |  0
>  ...cc-256-redc.asm => ecc-secp256r1-redc.asm} |  0
>  ...cc-384-modp.asm => ecc-secp384r1-modp.asm} |  0
>  ...cc-521-modp.asm => ecc-secp521r1-modp.asm} |  0
>  configure.ac  |  5 +-
>  ecc-25519.c => ecc-curve25519.c   |  4 +-
>  ecc-192.c => ecc-secp192r1.c  |  4 +-
>  ecc-224.c => ecc-secp224r1.c  |  4 +-
>  ecc-256.c => ecc-secp256r1.c  |  4 +-
>  ecc-384.c => ecc-secp384r1.c  |  4 +-
>  ecc-521.c => ecc-secp521r1.c  |  4 +-
>  eccdata.c | 51 +++
>  ...25519-modp.asm => ecc-curve25519-modp.asm} |  0
>  ...cc-192-modp.asm => ecc-secp192r1-modp.asm} |  0
>  ...cc-224-modp.asm => ecc-secp224r1-modp.asm} |  0
>  ...cc-256-redc.asm => ecc-secp256r1-redc.asm} |  0
>  ...cc-384-modp.asm => ecc-secp384r1-modp.asm} |  0
>  ...cc-521-modp.asm => ecc-secp521r1-modp.asm} |  0
>  21 files changed, 74 insertions(+), 63 deletions(-)
>  rename arm/{ecc-192-modp.asm => ecc-secp192r1-modp.asm} (100%)
>  rename arm/{ecc-224-modp.asm => ecc-secp224r1-modp.asm} (100%)
>  rename arm/{ecc-256-redc.asm => ecc-secp256r1-redc.asm} (100%)
>  rename arm/{ecc-384-modp.asm => ecc-secp384r1-modp.asm} (100%)
>  rename arm/{ecc-521-modp.asm => ecc-secp521r1-modp.asm} (100%)
>  rename ecc-25519.c => ecc-curve25519.c (99%)
>  rename ecc-192.c => ecc-secp192r1.c (98%)
>  rename ecc-224.c => ecc-secp224r1.c (98%)
>  rename ecc-256.c => ecc-secp256r1.c (99%)
>  rename ecc-384.c => ecc-secp384r1.c (99%)
>  rename ecc-521.c => ecc-secp521r1.c (98%)
>  rename x86_64/{ecc-25519-modp.asm => ecc-curve25519-modp.asm} (100%)
>  rename x86_64/{ecc-192-modp.asm => ecc-secp192r1-modp.asm} (100%)
>  rename x86_64/{ecc-224-modp.asm => ecc-secp224r1-modp.asm} (100%)
>  rename x86_64/{ecc-256-redc.asm => ecc-secp256r1-redc.asm} (100%)
>  rename x86_64/{ecc-384-modp.asm => ecc-secp384r1-modp.asm} (100%)
>  rename x86_64/{ecc-521-modp.asm => ecc-secp521r1-modp.asm} (100%)
>
> diff --git a/.gitignore b/.gitignore
> index b79c53f535ff..be10fbe959cc 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -43,12 +43,12 @@ core
>  /keymap.h
>  /parity.h
>  /rotors.h
> -/ecc-192.h
> -/ecc-224.h
> -/ecc-256.h
> -/ecc-384.h
> -/ecc-521.h
> -/ecc-25519.h
> +/ecc-curve25519.h
> +/ecc-secp192r1.h
> +/ecc-secp224r1.h
> +/ecc-secp256r1.h
> +/ecc-secp384r1.h
> +/ecc-secp521r1.h
>  /version.h
>  /nettle.aux
>  /nettle.cp
> diff --git a/Makefile.in b/Makefile.in
> index 9f5b065a706a..89066ec6c3c2 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -174,8 +174,8 @@ hogweed_SOURCES = sexp.c sexp-format.c \
>   gmp-glue.c cnd-copy.c \
>   ecc-mod.c ecc-mod-inv.c \
>   ecc-mod-arith.c ecc-pp1-redc.c ecc-pm1-redc.c \
> - ecc-192.c ecc-224.c ecc-256.c ecc-384.c ecc-521.c \
> - ecc-25519.c \
> + ecc-curve25519.c ecc-secp192r1.c ecc-secp224r1.c \
> + ecc-secp256r1.c ecc-secp384r1.c ecc-secp521r1.c \
>   ecc-size.c ecc-j-to-a.c ecc-a-to-j.c \
>   ecc-dup-jj.c ecc-add-jja.c ecc-add-jjj.c \
>   ecc-eh-to-a.c \
> @@ -345,24 +345,24 @@ des.$(OBJEXT): des.c des.h $(des_headers)
>  # k = 14, c =  7, S = 256, T =  42 ( 28 A + 14 D) 12 KB
>  # k = 11, c =  6, S = 192, T =  44 ( 33 A + 11 D)  9 KB
>  # k = 16, c =  6, S = 128, T =  48 ( 32 A + 16 D)  6 KB
> -ecc-192.h: eccdata.stamp
> -   ./eccdata$(EXEEXT_FOR_BUILD) 192 8 6 $(NUMB_BITS) > $@T && mv $@T $@
> +ecc-secp192r1.h: eccdata.stamp
> +   ./eccdata$(EXEEXT_FOR_BUILD) secp192r1 8 6 $(NUMB_BITS) > $@T && mv 
> $@T $@
>
>  # Some reasonable choices for 224:
>  # k = 16, c =  7, S = 256, T =  48 ( 32 A + 16 D) ~16 KB
>  # k = 10, c =  6, S = 256, T =  50 ( 40 A + 10 D) ~16 KB
>  # k = 13, c =  6, S = 192, T =  52 ( 39 A + 13 D) ~12 KB
>  # k =  9, c =  5, S = 160, T =  54 ( 45 A +  9 D) ~10 KB
> -ecc-224.h: eccdata.stamp
> -   ./eccdata$(EXEEXT_FOR_BUILD) 224 16 7 $(NUMB_BITS) > $@T && mv $@T $@
> +ecc-secp224r1.h: eccdata.stamp
> +   ./eccdata$(EXEEXT_FOR_BUILD) secp224r1 16 7 $(NUMB_BITS) > $@T && mv 
> $@T $@
>
>  # Some reasonable choices for 256:
>  # k =  9, c =  6, S = 320, T =  54 ( 45 A +  9 D)