Deleted unused function ecc_modp_sub_1.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 23 Aug 2014 20:00:45 +0000 (22:00 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 23 Aug 2014 20:00:45 +0000 (22:00 +0200)
ChangeLog
ecc-internal.h
ecc-modp.c

index ccbae50fd45371fa7a002aa8dd57663b14907dc0..aab10bb1aa776f3fb36f45b8ba650a296db78e15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-08-23  Niels Möller  <nisse@lysator.liu.se>
 
+       * ecc-modp.c (ecc_modp_sub_1): Deleted unused function.
+       * ecc-internal.h: Deleted corresponding declaration.
+
        * examples/nettle-benchmark.c (time_cipher): Fixed memset calls,
        amending the totally broken change from 2014-02-06.
 
index 3d284bd6a234be6577c931d9fb1f78cee94633e8..aae2fba4aea6bb6e77304d36790b481cef2574a0 100644 (file)
@@ -45,7 +45,6 @@
 #define ecc_generic_modq _nettle_ecc_generic_modq
 #define ecc_modp_add _nettle_ecc_modp_add
 #define ecc_modp_sub _nettle_ecc_modp_sub
-#define ecc_modp_sub_1 _nettle_ecc_modp_sub_1
 #define ecc_modp_mul_1 _nettle_ecc_modp_mul_1
 #define ecc_modp_addmul_1 _nettle_ecc_modp_addmul_1
 #define ecc_modp_submul_1 _nettle_ecc_modp_submul_1
@@ -158,10 +157,6 @@ void
 ecc_modp_sub (const struct ecc_curve *ecc, mp_limb_t *rp,
              const mp_limb_t *ap, const mp_limb_t *bp);
 
-void
-ecc_modp_sub_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
-               const mp_limb_t *ap, mp_limb_t b);
-
 void
 ecc_modp_mul_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
                const mp_limb_t *ap, const mp_limb_t b);
index b74fdb8723f39810856d445ebbeceb2b738d7386..2d50cd0d4b0294dfb7354eba03518eac51d17c3e 100644 (file)
@@ -64,22 +64,6 @@ ecc_modp_sub (const struct ecc_curve *ecc, mp_limb_t *rp,
   assert (cy == 0);  
 }
 
-void
-ecc_modp_sub_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
-               const mp_limb_t *ap, mp_limb_t b)
-{
-  mp_size_t i;
-
-  for (i = 0; i < ecc->size; i++)
-    {
-      mp_limb_t cy = ap[i] < b;
-      rp[i] = ap[i] - b;
-      b = cy;
-    }
-  b = cnd_sub_n (b, rp, ecc->Bmodp, ecc->size);
-  assert (b == 0);    
-}
-
 void
 ecc_modp_mul_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
                const mp_limb_t *ap, mp_limb_t b)