summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/TODO16
-rw-r--r--libtommath/bn_mp_radix_size.c4
-rw-r--r--libtommath/bn_mp_read_radix.c4
-rw-r--r--libtommath/tommath.h26
-rw-r--r--libtommath/tommath_superclass.h4
5 files changed, 28 insertions, 26 deletions
diff --git a/libtommath/TODO b/libtommath/TODO
deleted file mode 100644
index deffba1..0000000
--- a/libtommath/TODO
+++ /dev/null
@@ -1,16 +0,0 @@
-things for book in order of importance...
-
-- Fix up pseudo-code [only] for combas that are not consistent with source
-- Start in chapter 3 [basics] and work up...
- - re-write to prose [less abrupt]
- - clean up pseudo code [spacing]
- - more examples where appropriate and figures
-
-Goal:
- - Get sync done by mid January [roughly 8-12 hours work]
- - Finish ch3-6 by end of January [roughly 12-16 hours of work]
- - Finish ch7-end by mid Feb [roughly 20-24 hours of work].
-
-Goal isn't "first edition" but merely cleaner to read.
-
-
diff --git a/libtommath/bn_mp_radix_size.c b/libtommath/bn_mp_radix_size.c
index 29b1d22..3381a6c 100644
--- a/libtommath/bn_mp_radix_size.c
+++ b/libtommath/bn_mp_radix_size.c
@@ -81,3 +81,7 @@ int mp_radix_size (mp_int * a, int radix, int *size)
}
#endif
+
+/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_radix_size.c,v $ */
+/* $Revision: 1.3 $ */
+/* $Date: 2005/09/26 18:27:14 $ */
diff --git a/libtommath/bn_mp_read_radix.c b/libtommath/bn_mp_read_radix.c
index 1e272fb..2a11a36 100644
--- a/libtommath/bn_mp_read_radix.c
+++ b/libtommath/bn_mp_read_radix.c
@@ -83,3 +83,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
return MP_OKAY;
}
#endif
+
+/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_read_radix.c,v $ */
+/* $Revision: 1.3 $ */
+/* $Date: 2005/09/26 18:27:14 $ */
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index ce8591f..bae09ce 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -23,10 +23,13 @@
#include <tommath_class.h>
-#undef MIN
-#define MIN(x,y) ((x)<(y)?(x):(y))
-#undef MAX
-#define MAX(x,y) ((x)>(y)?(x):(y))
+#ifndef MIN
+ #define MIN(x,y) ((x)<(y)?(x):(y))
+#endif
+
+#ifndef MAX
+ #define MAX(x,y) ((x)>(y)?(x):(y))
+#endif
#ifdef __cplusplus
extern "C" {
@@ -112,7 +115,7 @@ extern "C" {
#else
/* prototypes for our heap functions */
extern void *XMALLOC(size_t n);
- extern void *REALLOC(void *p, size_t n);
+ extern void *XREALLOC(void *p, size_t n);
extern void *XCALLOC(size_t n, size_t s);
extern void XFREE(void *p);
#endif
@@ -147,7 +150,6 @@ extern "C" {
/* Primality generation flags */
#define LTM_PRIME_BBS 0x0001 /* BBS style prime */
#define LTM_PRIME_SAFE 0x0002 /* Safe prime (p-1)/2 == prime */
-#define LTM_PRIME_2MSB_OFF 0x0004 /* force 2nd MSB to 0 */
#define LTM_PRIME_2MSB_ON 0x0008 /* force 2nd MSB to 1 */
typedef int mp_err;
@@ -164,7 +166,7 @@ extern int KARATSUBA_MUL_CUTOFF,
/* default precision */
#ifndef MP_PREC
#ifndef MP_LOW_MEM
- #define MP_PREC 64 /* default digits of precision */
+ #define MP_PREC 32 /* default digits of precision */
#else
#define MP_PREC 8 /* default digits of precision */
#endif
@@ -518,13 +520,13 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback
int mp_count_bits(mp_int *a);
int mp_unsigned_bin_size(mp_int *a);
-int mp_read_unsigned_bin(mp_int *a, unsigned char *b, int c);
+int mp_read_unsigned_bin(mp_int *a, const unsigned char *b, int c);
int mp_to_unsigned_bin(mp_int *a, unsigned char *b);
int mp_to_unsigned_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen);
int mp_signed_bin_size(mp_int *a);
-int mp_read_signed_bin(mp_int *a, unsigned char *b, int c);
-int mp_to_signed_bin(mp_int *a, unsigned char *b);
+int mp_read_signed_bin(mp_int *a, const unsigned char *b, int c);
+int mp_to_signed_bin(mp_int *a, unsigned char *b);
int mp_to_signed_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen);
int mp_read_radix(mp_int *a, const char *str, int radix);
@@ -576,3 +578,7 @@ extern const char *mp_s_rmap;
#endif
+
+/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/tommath.h,v $ */
+/* $Revision: 1.3 $ */
+/* $Date: 2005/09/26 18:27:14 $ */
diff --git a/libtommath/tommath_superclass.h b/libtommath/tommath_superclass.h
index e3926df..ffbb8e1 100644
--- a/libtommath/tommath_superclass.h
+++ b/libtommath/tommath_superclass.h
@@ -70,3 +70,7 @@
#endif
#endif
+
+/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/tommath_superclass.h,v $ */
+/* $Revision: 1.3 $ */
+/* $Date: 2005/09/26 18:27:14 $ */