summaryrefslogtreecommitdiff
path: root/mpi/mpi-internal.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1997-12-23 17:30:17 +0000
committerWerner Koch <wk@gnupg.org>1997-12-23 17:30:17 +0000
commit845ea7e9fe5573a6a6f83614f4f2345a4e957028 (patch)
treeebc26f8b3ebba3c24a82cac767a04cd2f3088763 /mpi/mpi-internal.h
parent051a55b072253c6580b5d3aa62489c93dba780e4 (diff)
downloadlibgcrypt-845ea7e9fe5573a6a6f83614f4f2345a4e957028.tar.gz
changed configuration stuff, replaced some Makefile.am by distfiles.
Diffstat (limited to 'mpi/mpi-internal.h')
-rw-r--r--mpi/mpi-internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mpi/mpi-internal.h b/mpi/mpi-internal.h
index 93ed688a..f084c7e8 100644
--- a/mpi/mpi-internal.h
+++ b/mpi/mpi-internal.h
@@ -32,6 +32,21 @@
#include "mpi.h"
+/* If KARATSUBA_THRESHOLD is not already defined, define it to a
+ * value which is good on most machines. */
+
+/* tested 4, 16, 32 and 64, where 16 gave the best performance when
+ * checking a 768 and a 1024 bit ElGamal signature.
+ * (wk 22.12.97) */
+#ifndef KARATSUBA_THRESHOLD
+ #define KARATSUBA_THRESHOLD 16
+#endif
+
+/* The code can't handle KARATSUBA_THRESHOLD smaller than 2. */
+#if KARATSUBA_THRESHOLD < 2
+ #undef KARATSUBA_THRESHOLD
+ #define KARATSUBA_THRESHOLD 2
+#endif
typedef mpi_limb_t *mpi_ptr_t; /* pointer to a limb */
@@ -174,6 +189,9 @@ void mpihelp_mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp,
mpi_size_t size);
mpi_limb_t mpihelp_mul( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize,
mpi_ptr_t vp, mpi_size_t vsize);
+void mpih_sqr_n_basecase( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size );
+void mpih_sqr_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size,
+ mpi_ptr_t tspace);
/*-- mpihelp-mul_1.c (or xxx/cpu/*.S) --*/
mpi_limb_t mpihelp_mul_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,