Commit beb15400 authored by Niels Möller's avatar Niels Möller

Prepare for assembly ecc_25519_modp.

parent 78647916
2014-08-22 Niels Möller <nisse@lysator.liu.se>
* ecc-25519.c [HAVE_NATIVE_ecc_25519_modp]: Use assembly version
if available.
* configure.ac (asm_hogweed_optional_list): Added ecc-25519-modp.asm.
Also add HAVE_NATIVE_ecc_25519_modp to config.h.in.
2014-08-19 Niels Möller <nisse@lysator.liu.se>
* examples/ecc-benchmark.c (bench_curve): Support benchmarking of
......
......@@ -285,7 +285,7 @@ asm_nettle_optional_list="gcm-hash8.asm"
asm_hogweed_optional_list=""
if test "x$enable_public_key" = "xyes" ; then
asm_hogweed_optional_list="ecc-192-modp.asm ecc-224-modp.asm \
ecc-256-redc.asm ecc-384-modp.asm ecc-521-modp.asm"
ecc-25519-modp.asm ecc-256-redc.asm ecc-384-modp.asm ecc-521-modp.asm"
fi
OPT_ASM_NETTLE_SOURCES=""
......@@ -365,6 +365,7 @@ AH_VERBATIM([HAVE_NATIVE],
#undef HAVE_NATIVE_ecc_192_redc
#undef HAVE_NATIVE_ecc_224_modp
#undef HAVE_NATIVE_ecc_224_redc
#undef HAVE_NATIVE_ecc_25519_modp
#undef HAVE_NATIVE_ecc_256_modp
#undef HAVE_NATIVE_ecc_256_redc
#undef HAVE_NATIVE_ecc_384_modp
......
......@@ -41,6 +41,13 @@
#include "ecc-25519.h"
#if HAVE_NATIVE_ecc_25519_modp
#define ecc_25519_modp nettle_ecc_25519_modp
void
ecc_25519_modp (const struct ecc_curve *ecc, mp_limb_t *rp);
#else
#define HIGH_BITS (GMP_NUMB_BITS * ECC_LIMB_SIZE - 255)
#if HIGH_BITS == 0
......@@ -60,6 +67,8 @@ ecc_25519_modp(const struct ecc_curve *ecc UNUSED, mp_limb_t *rp)
+ sec_add_1 (rp, rp, ECC_LIMB_SIZE - 1, 19 * cy);
}
#endif /* HAVE_NATIVE_ecc_25519_modp */
/* Needs 2*ecc->size limbs at rp, and 2*ecc->size additional limbs of
scratch space. No overlap allowed. */
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment