Re: [PATCH v3 2/3] ecc: prefix optimized ECC function names with underscore

2020-01-10 Thread Dmitry Eremin-Solenikov
пт, 10 янв. 2020 г. в 23:01, Niels Möller :
>
> Dmitry Eremin-Solenikov  writes:
>
> > So did I at the time of writing a patch, finding no actual users of
> > these functions. I think it is fine to drop them without bumping
> > soname.
>
> It seems none disagrees with that. I've merged all three patches to the
> master-updates branch for testing.

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: [PATCH v3 2/3] ecc: prefix optimized ECC function names with underscore

2020-01-10 Thread Niels Möller
Dmitry Eremin-Solenikov  writes:

> So did I at the time of writing a patch, finding no actual users of
> these functions. I think it is fine to drop them without bumping
> soname.

It seems none disagrees with that. I've merged all three patches to the
master-updates branch for testing.

Thanks,
/Niels Möller

-- 
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 v3 2/3] ecc: prefix optimized ECC function names with underscore

2020-01-09 Thread Dmitry Eremin-Solenikov
Hello,

вт, 7 янв. 2020 г. в 23:20, Niels Möller :
>
> dbarysh...@gmail.com writes:
> > From: Dmitry Eremin-Solenikov 
> >
> > There is no need to keep optimized ECC functions in public namespace
> > (nettle_*), move them to internal namespace (_nettle_*).
>
> I agree this rename makes sense.
>
> But it could be considered an ABI break, since we remove symbols with
> version string "HOGWEED_5", matching the soname, and those symbols are
> supposed to be stable as long as the soname is the same.
>
> On the other hand, the symbols are not mentioned in docs or headers, and
> they don't even exist in all configurations. So maybe it's ok to remove
> them without changing the soname? That will break any application
> needing them in libhogweed.so, but that application would break in the
> same way if nettle were reconfigured with --disable-assembler.
>
> I had a try with
> http://codesearch.debian.net/search?q=nettle_ecc_.*modp=0, and
> at least the functions appear unused outside of Nettle.

So did I at the time of writing a patch, finding no actual users of
these functions. I think it is fine to drop them without bumping
soname.

-- 
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 v3 2/3] ecc: prefix optimized ECC function names with underscore

2020-01-07 Thread Niels Möller
dbarysh...@gmail.com writes:

> From: Dmitry Eremin-Solenikov 
>
> There is no need to keep optimized ECC functions in public namespace
> (nettle_*), move them to internal namespace (_nettle_*).

I agree this rename makes sense.

But it could be considered an ABI break, since we remove symbols with
version string "HOGWEED_5", matching the soname, and those symbols are
supposed to be stable as long as the soname is the same.

On the other hand, the symbols are not mentioned in docs or headers, and
they don't even exist in all configurations. So maybe it's ok to remove
them without changing the soname? That will break any application
needing them in libhogweed.so, but that application would break in the
same way if nettle were reconfigured with --disable-assembler.

I had a try with
http://codesearch.debian.net/search?q=nettle_ecc_.*modp=0, and
at least the functions appear unused outside of Nettle.

Opinions?

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


[PATCH v3 2/3] ecc: prefix optimized ECC function names with underscore

2020-01-06 Thread dbaryshkov
From: Dmitry Eremin-Solenikov 

There is no need to keep optimized ECC functions in public namespace
(nettle_*), move them to internal namespace (_nettle_*).

Signed-off-by: Dmitry Eremin-Solenikov 
---
 arm/ecc-secp192r1-modp.asm | 4 ++--
 arm/ecc-secp224r1-modp.asm | 4 ++--
 arm/ecc-secp256r1-redc.asm | 4 ++--
 arm/ecc-secp384r1-modp.asm | 4 ++--
 arm/ecc-secp521r1-modp.asm | 4 ++--
 ecc-curve25519.c   | 2 +-
 ecc-curve448.c | 2 +-
 ecc-secp192r1.c| 2 +-
 ecc-secp224r1.c| 2 +-
 ecc-secp256r1.c| 2 +-
 ecc-secp384r1.c| 2 +-
 ecc-secp521r1.c| 2 +-
 x86_64/ecc-curve25519-modp.asm | 4 ++--
 x86_64/ecc-curve448-modp.asm   | 4 ++--
 x86_64/ecc-secp192r1-modp.asm  | 4 ++--
 x86_64/ecc-secp224r1-modp.asm  | 4 ++--
 x86_64/ecc-secp256r1-redc.asm  | 4 ++--
 x86_64/ecc-secp384r1-modp.asm  | 4 ++--
 x86_64/ecc-secp521r1-modp.asm  | 4 ++--
 19 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/arm/ecc-secp192r1-modp.asm b/arm/ecc-secp192r1-modp.asm
index dbaae2e38922..4680336f1bc7 100644
--- a/arm/ecc-secp192r1-modp.asm
+++ b/arm/ecc-secp192r1-modp.asm
@@ -53,7 +53,7 @@ define(, )
.text
.align 2
 
-PROLOGUE(nettle_ecc_192_modp)
+PROLOGUE(_nettle_ecc_192_modp)
push{r4,r5,r6,r7,r8,r10}
C Reduce two words at a time
add HP, RP, #48
@@ -103,4 +103,4 @@ PROLOGUE(nettle_ecc_192_modp)
 
pop {r4,r5,r6,r7,r8,r10}
bx  lr
-EPILOGUE(nettle_ecc_192_modp)
+EPILOGUE(_nettle_ecc_192_modp)
diff --git a/arm/ecc-secp224r1-modp.asm b/arm/ecc-secp224r1-modp.asm
index 2c86755a7c9a..400b7a815c2c 100644
--- a/arm/ecc-secp224r1-modp.asm
+++ b/arm/ecc-secp224r1-modp.asm
@@ -52,7 +52,7 @@ define(, )
.text
.align 2
 
-PROLOGUE(nettle_ecc_224_modp)
+PROLOGUE(_nettle_ecc_224_modp)
push{r4,r5,r6,r7,r8,r10,r11,lr}
 
add L2, RP, #28
@@ -121,4 +121,4 @@ PROLOGUE(nettle_ecc_224_modp)
stmdb   RP, {T0,T1,T2,T3,T4,T5,T6}
 
pop {r4,r5,r6,r7,r8,r10,r11,pc}
-EPILOGUE(nettle_ecc_224_modp)
+EPILOGUE(_nettle_ecc_224_modp)
diff --git a/arm/ecc-secp256r1-redc.asm b/arm/ecc-secp256r1-redc.asm
index 9c20062a44e4..7b117de43fbc 100644
--- a/arm/ecc-secp256r1-redc.asm
+++ b/arm/ecc-secp256r1-redc.asm
@@ -52,7 +52,7 @@ define(, )
.text
.align 2
 
-PROLOGUE(nettle_ecc_256_redc)
+PROLOGUE(_nettle_ecc_256_redc)
push{r4,r5,r6,r7,r8,r10,r11,lr}
 
ldm RP!, {T0,T1,T2,T3,T4,T5,T6,T7}
@@ -170,4 +170,4 @@ PROLOGUE(nettle_ecc_256_redc)
stm RP, {T0,T1,T2,T3,T4,T5,T6,T7}
 
pop {r4,r5,r6,r7,r8,r10,r11,pc}
-EPILOGUE(nettle_ecc_256_redc)
+EPILOGUE(_nettle_ecc_256_redc)
diff --git a/arm/ecc-secp384r1-modp.asm b/arm/ecc-secp384r1-modp.asm
index dbedbdf8d32e..dd9a325b09de 100644
--- a/arm/ecc-secp384r1-modp.asm
+++ b/arm/ecc-secp384r1-modp.asm
@@ -50,7 +50,7 @@ define(, )
.text
.align 2
 
-PROLOGUE(nettle_ecc_384_modp)
+PROLOGUE(_nettle_ecc_384_modp)
push{r4,r5,r6,r7,r8,r10,lr}
 
add RP, RP, #80
@@ -267,4 +267,4 @@ PROLOGUE(nettle_ecc_384_modp)
adcsT3, T3, H
stm RP!, {T0,T1,T2,T3}  C 8-11
pop {r4,r5,r6,r7,r8,r10,pc}
-EPILOGUE(nettle_ecc_384_modp)
+EPILOGUE(_nettle_ecc_384_modp)
diff --git a/arm/ecc-secp521r1-modp.asm b/arm/ecc-secp521r1-modp.asm
index 2b4f79192a2e..f11967634689 100644
--- a/arm/ecc-secp521r1-modp.asm
+++ b/arm/ecc-secp521r1-modp.asm
@@ -52,7 +52,7 @@ define(, )
 
.align 2
 
-PROLOGUE(nettle_ecc_521_modp)
+PROLOGUE(_nettle_ecc_521_modp)
push{r4,r5,r6,r7,r8,lr}
 
C Use that B^17 = 2^23 (mod p)
@@ -124,4 +124,4 @@ PROLOGUE(nettle_ecc_521_modp)
stm RP, {T0,T1,T2,F0,F1,F2,F3,H}C 9-16
 
pop {r4,r5,r6,r7,r8,pc}
-EPILOGUE(nettle_ecc_521_modp)
+EPILOGUE(_nettle_ecc_521_modp)
diff --git a/ecc-curve25519.c b/ecc-curve25519.c
index 73d72765dce8..65843a57ee5a 100644
--- a/ecc-curve25519.c
+++ b/ecc-curve25519.c
@@ -48,7 +48,7 @@
 
 #if HAVE_NATIVE_ecc_25519_modp
 
-#define ecc_25519_modp nettle_ecc_25519_modp
+#define ecc_25519_modp _nettle_ecc_25519_modp
 void
 ecc_25519_modp (const struct ecc_modulo *m, mp_limb_t *rp);
 #else
diff --git a/ecc-curve448.c b/ecc-curve448.c
index 7020e3e8f6aa..981dc53f279e 100644
--- a/ecc-curve448.c
+++ b/ecc-curve448.c
@@ -46,7 +46,7 @@
 #include "ecc-curve448.h"
 
 #if HAVE_NATIVE_ecc_curve448_modp
-#define ecc_448_modp nettle_ecc_curve448_modp
+#define ecc_448_modp _nettle_ecc_curve448_modp
 void
 ecc_448_modp (const struct ecc_modulo *m, mp_limb_t *rp);
 #elif GMP_NUMB_BITS == 64
diff --git a/ecc-secp192r1.c b/ecc-secp192r1.c
index 858a1b7554ce..15f5f1fa4c04 100644
--- a/ecc-secp192r1.c
+++ b/ecc-secp192r1.c
@@ -50,7 +50,7 @@
 
 #if HAVE_NATIVE_ecc_192_modp
 
-#define ecc_192_modp nettle_ecc_192_modp
+#define ecc_192_modp _nettle_ecc_192_modp
 void
 ecc_192_modp (const struct