From 0a5e2524909b5f7be602786da26685ab492bb7d6 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Tue, 7 Jan 2020 01:16:45 +0300 Subject: ecc: rename functions to contain curve names instead of bits Rename curve functions to use curve names instead of just bits. Otherwise function names can easily become confusing after adding other curves. Signed-off-by: Dmitry Eremin-Solenikov --- arm/ecc-secp192r1-modp.asm | 6 +++--- arm/ecc-secp224r1-modp.asm | 6 +++--- arm/ecc-secp256r1-redc.asm | 6 +++--- arm/ecc-secp384r1-modp.asm | 6 +++--- arm/ecc-secp521r1-modp.asm | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'arm') diff --git a/arm/ecc-secp192r1-modp.asm b/arm/ecc-secp192r1-modp.asm index 4680336f..4c596a16 100644 --- a/arm/ecc-secp192r1-modp.asm +++ b/arm/ecc-secp192r1-modp.asm @@ -49,11 +49,11 @@ define(

, ) define(, ) define(, ) - C ecc_192_modp (const struct ecc_modulo *m, mp_limb_t *rp) + C ecc_secp192r1_modp (const struct ecc_modulo *m, mp_limb_t *rp) .text .align 2 -PROLOGUE(_nettle_ecc_192_modp) +PROLOGUE(_nettle_ecc_secp192r1_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_secp192r1_modp) diff --git a/arm/ecc-secp224r1-modp.asm b/arm/ecc-secp224r1-modp.asm index 400b7a81..67089a0c 100644 --- a/arm/ecc-secp224r1-modp.asm +++ b/arm/ecc-secp224r1-modp.asm @@ -48,11 +48,11 @@ define(, ) define(, ) define(, ) - C ecc_224_modp (const struct ecc_modulo *m, mp_limb_t *rp) + C ecc_secp224r1_modp (const struct ecc_modulo *m, mp_limb_t *rp) .text .align 2 -PROLOGUE(_nettle_ecc_224_modp) +PROLOGUE(_nettle_ecc_secp224r1_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_secp224r1_modp) diff --git a/arm/ecc-secp256r1-redc.asm b/arm/ecc-secp256r1-redc.asm index 7b117de4..f8386c39 100644 --- a/arm/ecc-secp256r1-redc.asm +++ b/arm/ecc-secp256r1-redc.asm @@ -48,11 +48,11 @@ define(, ) define(, ) define(, ) - C ecc_256_redc (const struct ecc_modulo *m, mp_limb_t *rp) + C ecc_secp256r1_redc (const struct ecc_modulo *m, mp_limb_t *rp) .text .align 2 -PROLOGUE(_nettle_ecc_256_redc) +PROLOGUE(_nettle_ecc_secp256r1_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_secp256r1_redc) diff --git a/arm/ecc-secp384r1-modp.asm b/arm/ecc-secp384r1-modp.asm index dd9a325b..1983ee68 100644 --- a/arm/ecc-secp384r1-modp.asm +++ b/arm/ecc-secp384r1-modp.asm @@ -46,11 +46,11 @@ define(, ) define(, ) define(, ) - C ecc_384_modp (const struct ecc_modulo *m, mp_limb_t *rp) + C ecc_secp384r1_modp (const struct ecc_modulo *m, mp_limb_t *rp) .text .align 2 -PROLOGUE(_nettle_ecc_384_modp) +PROLOGUE(_nettle_ecc_secp384r1_modp) push {r4,r5,r6,r7,r8,r10,lr} add RP, RP, #80 @@ -267,4 +267,4 @@ PROLOGUE(_nettle_ecc_384_modp) adcs T3, 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_secp384r1_modp) diff --git a/arm/ecc-secp521r1-modp.asm b/arm/ecc-secp521r1-modp.asm index f1196763..6d1759ec 100644 --- a/arm/ecc-secp521r1-modp.asm +++ b/arm/ecc-secp521r1-modp.asm @@ -45,14 +45,14 @@ define(, ) define(, ) define(, ) - C ecc_521_modp (const struct ecc_modulo *m, mp_limb_t *rp) + C ecc_secp521r1_modp (const struct ecc_modulo *m, mp_limb_t *rp) .text .Lc511: .int 511 .align 2 -PROLOGUE(_nettle_ecc_521_modp) +PROLOGUE(_nettle_ecc_secp521r1_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_secp521r1_modp) -- cgit v1.2.1