]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Deleted ecc_a_to_eh.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 17 Sep 2014 19:12:36 +0000 (21:12 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 17 Sep 2014 19:12:36 +0000 (21:12 +0200)
ChangeLog
Makefile.in
ecc-a-to-eh.c [deleted file]
ecc-internal.h
ecc.h

index 5e59a87a0e2989fc65c8c3d26f47e0b02beeb3ce..7b1e2a3b6cb6e48c935c826feb4ba4b407a702de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2014-09-17  Niels Möller  <nisse@lysator.liu.se>
 
+       * ecc-a-to-eh.c (ecc_a_to_eh_itch, ecc_a_to_eh): Deleted file and
+       functions.
+       * ecc.h: Deleted corresponding declarations.
+       * ecc-internal.h (ECC_A_TO_EH_ITCH): Deleted macro.
+       * Makefile.in (hogweed_SOURCES): Removed ecc-a-to-eh.c.
+
        * testsuite/ecdh-test.c (test_main): Update curve25519 test to use
        Edwards coordinates.
        * testsuite/ecdsa-sign-test.c (test_main): Likewise.
index a35f8ad13357a02246c7954377b1eb16464ae80f..770d55f7fe8f5f714c11acb66cb9757ca5769df7 100644 (file)
@@ -168,7 +168,7 @@ hogweed_SOURCES = sexp.c sexp-format.c \
                  ecc-25519.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-a-to-eh.c ecc-eh-to-a.c \
+                 ecc-eh-to-a.c \
                  ecc-dup-eh.c ecc-add-eh.c ecc-add-ehh.c \
                  ecc-mul-g-eh.c ecc-mul-a-eh.c \
                  ecc-mul-g.c ecc-mul-a.c ecc-hash.c ecc-random.c \
diff --git a/ecc-a-to-eh.c b/ecc-a-to-eh.c
deleted file mode 100644 (file)
index 7f77394..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ecc-a-to-eh.c
-
-   Copyright (C) 2014 Niels Möller
-
-   This file is part of GNU Nettle.
-
-   GNU Nettle is free software: you can redistribute it and/or
-   modify it under the terms of either:
-
-     * the GNU Lesser General Public License as published by the Free
-       Software Foundation; either version 3 of the License, or (at your
-       option) any later version.
-
-   or
-
-     * the GNU General Public License as published by the Free
-       Software Foundation; either version 2 of the License, or (at your
-       option) any later version.
-
-   or both in parallel, as here.
-
-   GNU Nettle is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received copies of the GNU General Public License and
-   the GNU Lesser General Public License along with this program.  If
-   not, see http://www.gnu.org/licenses/.
-*/
-
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "ecc.h"
-#include "ecc-internal.h"
-
-mp_size_t
-ecc_a_to_eh_itch (const struct ecc_curve *ecc)
-{
-  return ECC_A_TO_EH_ITCH (ecc->size);
-}
-
-/* Convert from affine coordinates to homogeneous coordinates on the
-   corresponding Edwards curve. */
-void
-ecc_a_to_eh (const struct ecc_curve *ecc,
-            mp_limb_t *r, const mp_limb_t *p,
-            mp_limb_t *scratch)
-{
-#define xp p
-#define yp (p + ecc->size)
-
-#define up r
-#define vp (r + ecc->size)
-#define wp (r + 2*ecc->size)
-
-  /* u = t x / y
-     v = (x-1) / (x+1)
-
-     or in homogeneous coordinates
-
-     U = t x (x+1)
-     V = (x-1) y
-     W = (x+1) y
-  */
-
-  ecc_modp_mul (ecc, scratch, xp, yp);
-  ecc_modp_add (ecc, wp, scratch, yp);
-  ecc_modp_sub (ecc, vp, scratch, yp);
-
-  ecc_modp_sqr (ecc, scratch, xp);
-  ecc_modp_add (ecc, up, scratch, xp);
-  ecc_modp_mul (ecc, scratch, up, ecc->edwards_root);
-  mpn_copyi (up, scratch, ecc->size);
-}
index ffa6fe2672638338a268803a3b8f013bba9cf919..777ab77e1706e4fef355373ee661187a9be546d1 100644 (file)
@@ -275,7 +275,6 @@ curve25519_eh_to_x (mp_limb_t *xp, const mp_limb_t *p,
 #define ECC_MODINV_ITCH(size) (3*(size))
 #define ECC_J_TO_A_ITCH(size) (5*(size))
 #define ECC_EH_TO_A_ITCH(size) (4*(size))
-#define ECC_A_TO_EH_ITCH(size) (2*(size))
 #define ECC_DUP_JJ_ITCH(size) (5*(size))
 #define ECC_DUP_EH_ITCH(size) (5*(size))
 #define ECC_ADD_JJA_ITCH(size) (6*(size))
diff --git a/ecc.h b/ecc.h
index 0d07ee5d62fc2f070a146abf46f77fa59d29e24c..a003a1ed33ee74a80848079bf46f86763517743c 100644 (file)
--- a/ecc.h
+++ b/ecc.h
@@ -63,8 +63,6 @@ extern "C" {
 #define ecc_j_to_a nettle_ecc_j_to_a
 #define ecc_eh_to_a_itch nettle_ecc_eh_to_a_itch
 #define ecc_eh_to_a nettle_ecc_eh_to_a
-#define ecc_a_to_eh_itch nettle_ecc_a_to_eh_itch
-#define ecc_a_to_eh nettle_ecc_a_to_eh
 #define ecc_dup_jj_itch nettle_ecc_dup_jj_itch
 #define ecc_dup_jj nettle_ecc_dup_jj
 #define ecc_add_jja_itch nettle_ecc_add_jja_itch
@@ -210,13 +208,6 @@ ecc_eh_to_a (const struct ecc_curve *ecc,
             mp_limb_t *r, const mp_limb_t *p,
             mp_limb_t *scratch);
 
-mp_size_t
-ecc_a_to_eh_itch (const struct ecc_curve *ecc);
-void
-ecc_a_to_eh (const struct ecc_curve *ecc,
-            mp_limb_t *r, const mp_limb_t *p,
-            mp_limb_t *scratch);
-
 /* Group operations */
 
 /* Point doubling, with jacobian input and output. Corner cases: