summaryrefslogtreecommitdiff
path: root/mpi/ec-ed25519.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-30 20:32:20 +0200
committerWerner Koch <wk@gnupg.org>2013-09-30 20:45:58 +0200
commita2618c822e666d4121cba29bee3fd50bf70c9743 (patch)
tree0200169df3481fc6f0bfc446e3f5e77e7208a5f5 /mpi/ec-ed25519.c
parentc325adb8f5092b80a626bd3bb5e49cf7f3a29fc8 (diff)
downloadlibgcrypt-a2618c822e666d4121cba29bee3fd50bf70c9743.tar.gz
ecc: Prepare for future Ed25519 optimization.
* mpi/ec-ed25519.c: New but empty file. * mpi/ec-internal.h: New. * mpi/ec.c: Include ec-internal.h. (ec_mod): New. (ec_addm): Use ec_mod. (ec_mulm): Remove commented code. Use ec_mod. (ec_subm): Call simple sub. (ec_pow2): Use ec_mulm. (ec_mul2): New. (dup_point_weierstrass): Use ec_mul2. (dup_point_twistededwards): Add special case for a == -1. Use ec_mul2. (add_points_weierstrass): Use ec_mul2. (add_points_twistededwards): Add special case for a == -1. (_gcry_mpi_ec_curve_point): Ditto. (ec_p_init): Add hack to test Barrett functions. * src/ec-context.h (mpi_ec_ctx_s): Add P_BARRETT. * mpi/mpi-mod.c (_gcry_mpi_mod_barrett): Fix sign problem. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'mpi/ec-ed25519.c')
-rw-r--r--mpi/ec-ed25519.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/mpi/ec-ed25519.c b/mpi/ec-ed25519.c
new file mode 100644
index 00000000..acfe2a69
--- /dev/null
+++ b/mpi/ec-ed25519.c
@@ -0,0 +1,37 @@
+/* ec-ed25519.c - Ed25519 optimized elliptic curve functions
+ * Copyright (C) 2013 g10 Code GmbH
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#include "mpi-internal.h"
+#include "longlong.h"
+#include "g10lib.h"
+#include "context.h"
+#include "ec-context.h"
+
+
+void
+_gcry_mpi_ec_ed25519_mod (gcry_mpi_t a)
+{
+ (void)a;
+
+}