summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-14 11:51:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-14 11:51:58 (GMT)
commitb5c43fbc876f3a372f5d83509d70f648ae9d6b88 (patch)
tree90a0ce4df4ed3e6506fd6f8f12b113dee8cb81fc /libtommath
parent3bb9dc0307966417a84b0a63e2e7323a5da6bdbd (diff)
downloadtcl-b5c43fbc876f3a372f5d83509d70f648ae9d6b88.zip
tcl-b5c43fbc876f3a372f5d83509d70f648ae9d6b88.tar.gz
tcl-b5c43fbc876f3a372f5d83509d70f648ae9d6b88.tar.bz2
Import of libtommath 0.40
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/bn_mp_montgomery_setup.c2
-rw-r--r--libtommath/changes.txt4
-rw-r--r--libtommath/etc/drprimes.txt11
-rw-r--r--libtommath/makefile7
-rw-r--r--libtommath/makefile.shared2
5 files changed, 17 insertions, 9 deletions
diff --git a/libtommath/bn_mp_montgomery_setup.c b/libtommath/bn_mp_montgomery_setup.c
index 261a9fb..f082749 100644
--- a/libtommath/bn_mp_montgomery_setup.c
+++ b/libtommath/bn_mp_montgomery_setup.c
@@ -48,7 +48,7 @@ mp_montgomery_setup (mp_int * n, mp_digit * rho)
#endif
/* rho = -1/m mod b */
- *rho = (((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
+ *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
return MP_OKAY;
}
diff --git a/libtommath/changes.txt b/libtommath/changes.txt
index 9498d36..aaaf69f 100644
--- a/libtommath/changes.txt
+++ b/libtommath/changes.txt
@@ -1,3 +1,7 @@
+December 24th, 2006
+v0.40 -- Updated makefile to properly support LIBNAME
+ -- Fixed bug in fast_s_mp_mul_high_digs() which overflowed (line 83), thanks Valgrind!
+
April 4th, 2006
v0.39 -- Jim Wigginton pointed out my Montgomery examples in figures 6.4 and 6.6 were off by one, k should be 9 not 8
-- Bruce Guenter suggested I use --tag=CC for libtool builds where the compiler may think it's C++.
diff --git a/libtommath/etc/drprimes.txt b/libtommath/etc/drprimes.txt
index 2c887ea..7c97f67 100644
--- a/libtommath/etc/drprimes.txt
+++ b/libtommath/etc/drprimes.txt
@@ -1,6 +1,9 @@
-280-bit prime:
-p == 1942668892225729070919461906823518906642406839052139521251812409738904285204940164839
+300-bit prime:
+p == 2037035976334486086268445688409378161051468393665936250636140449354381298610415201576637819
-532-bit prime:
-p == 14059105607947488696282932836518693308967803494693489478439861164411992439598399594747002144074658928593502845729752797260025831423419686528151609940203368691747
+540-bit prime:
+p == 3599131035634557106248430806148785487095757694641533306480604458089470064537190296255232548883112685719936728506816716098566612844395439751206810991770626477344739
+
+780-bit prime:
+p == 6359114106063703798370219984742410466332205126109989319225557147754704702203399726411277962562135973685197744935448875852478791860694279747355800678568677946181447581781401213133886609947027230004277244697462656003655947791725966271167
diff --git a/libtommath/makefile b/libtommath/makefile
index e08a888..9f69678 100644
--- a/libtommath/makefile
+++ b/libtommath/makefile
@@ -3,7 +3,7 @@
#Tom St Denis
#version of library
-VERSION=0.39
+VERSION=0.40
CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare
@@ -40,12 +40,13 @@ else
USER=$(INSTALL_USER)
endif
-default: libtommath.a
-
#default files to install
ifndef LIBNAME
LIBNAME=libtommath.a
endif
+
+default: ${LIBNAME}
+
HEADERS=tommath.h tommath_class.h tommath_superclass.h
#LIBPATH-The directory for libtommath to be installed to.
diff --git a/libtommath/makefile.shared b/libtommath/makefile.shared
index 8522d44..e230fb8 100644
--- a/libtommath/makefile.shared
+++ b/libtommath/makefile.shared
@@ -1,7 +1,7 @@
#Makefile for GCC
#
#Tom St Denis
-VERSION=0:39
+VERSION=0:40
CC = libtool --mode=compile --tag=CC gcc