142
|
1 October 29th, 2004
|
|
2 v0.32 -- Added "makefile.shared" for shared object support
|
|
3 -- Added more to the build options/configs in the manual
|
|
4 -- Started the Depends framework, wrote dep.pl to scan deps and
|
|
5 produce "callgraph.txt" ;-)
|
|
6 -- Wrote SC_RSA_1 which will enable close to the minimum required to perform
|
|
7 RSA on 32-bit [or 64-bit] platforms with LibTomCrypt
|
|
8 -- Merged in the small/slower mp_div replacement. You can now toggle which
|
|
9 you want to use as your mp_div() at build time. Saves roughly 8KB or so.
|
|
10 -- Renamed a few files and changed some comments to make depends system work better.
|
|
11 (No changes to function names)
|
|
12 -- Merged in new Combas that perform 2 reads per inner loop instead of the older
|
|
13 3reads/2writes per inner loop of the old code. Really though if you want speed
|
|
14 learn to use TomsFastMath ;-)
|
|
15
|
|
16 August 9th, 2004
|
|
17 v0.31 -- "profiled" builds now :-) new timings for Intel Northwoods
|
|
18 -- Added "pretty" build target
|
|
19 -- Update mp_init() to actually assign 0's instead of relying on calloc()
|
|
20 -- "Wolfgang Ehrhardt" <[email protected]> found a bug in mp_mul() where if
|
|
21 you multiply a negative by zero you get negative zero as the result. Oops.
|
|
22 -- J Harper from PeerSec let me toy with his AMD64 and I got 60-bit digits working properly
|
|
23 [this also means that I fixed a bug where if sizeof(int) < sizeof(mp_digit) it would bug]
|
|
24
|
2
|
25 April 11th, 2004
|
|
26 v0.30 -- Added "mp_toradix_n" which stores upto "n-1" least significant digits of an mp_int
|
|
27 -- Johan Lindh sent a patch so MSVC wouldn't whine about redefining malloc [in weird dll modes]
|
|
28 -- Henrik Goldman spotted a missing OPT_CAST in mp_fwrite()
|
|
29 -- Tuned tommath.h so that when MP_LOW_MEM is defined MP_PREC shall be reduced.
|
|
30 [I also allow MP_PREC to be externally defined now]
|
|
31 -- Sped up mp_cnt_lsb() by using a 4x4 table [e.g. 4x speedup]
|
|
32 -- Added mp_prime_random_ex() which is a more versatile prime generator accurate to
|
|
33 exact bit lengths (unlike the deprecated but still available mp_prime_random() which
|
|
34 is only accurate to byte lengths). See the new LTM_PRIME_* flags ;-)
|
|
35 -- Alex Polushin contributed an optimized mp_sqrt() as well as mp_get_int() and mp_is_square().
|
|
36 I've cleaned them all up to be a little more consistent [along with one bug fix] for this release.
|
|
37 -- Added mp_init_set and mp_init_set_int to initialize and set small constants with one function
|
|
38 call.
|
|
39 -- Removed /etclib directory [um LibTomPoly deprecates this].
|
|
40 -- Fixed mp_mod() so the sign of the result agrees with the sign of the modulus.
|
|
41 ++ N.B. My semester is almost up so expect updates to the textbook to be posted to the libtomcrypt.org
|
|
42 website.
|
|
43
|
|
44 Jan 25th, 2004
|
|
45 v0.29 ++ Note: "Henrik" from the v0.28 changelog refers to Henrik Goldman ;-)
|
|
46 -- Added fix to mp_shrink to prevent a realloc when used == 0 [e.g. realloc zero bytes???]
|
|
47 -- Made the mp_prime_rabin_miller_trials() function internal table smaller and also
|
|
48 set the minimum number of tests to two (sounds a bit safer).
|
|
49 -- Added a mp_exteuclid() which computes the extended euclidean algorithm.
|
|
50 -- Fixed a memory leak in s_mp_exptmod() [called when Barrett reduction is to be used] which would arise
|
|
51 if a multiplication or subsequent reduction failed [would not free the temp result].
|
|
52 -- Made an API change to mp_radix_size(). It now returns an error code and stores the required size
|
|
53 through an "int star" passed to it.
|
|
54
|
|
55 Dec 24th, 2003
|
|
56 v0.28 -- Henrik Goldman suggested I add casts to the montomgery code [stores into mu...] so compilers wouldn't
|
|
57 spew [erroneous] diagnostics... fixed.
|
|
58 -- Henrik Goldman also spotted two typos. One in mp_radix_size() and another in mp_toradix().
|
|
59 -- Added fix to mp_shrink() to avoid a memory leak.
|
|
60 -- Added mp_prime_random() which requires a callback to make truly random primes of a given nature
|
|
61 (idea from chat with Niels Ferguson at Crypto'03)
|
|
62 -- Picked up a second wind. I'm filled with Gooo. Mission Gooo!
|
|
63 -- Removed divisions from mp_reduce_is_2k()
|
|
64 -- Sped up mp_div_d() [general case] to use only one division per digit instead of two.
|
|
65 -- Added the heap macros from LTC to LTM. Now you can easily [by editing four lines of tommath.h]
|
|
66 change the name of the heap functions used in LTM [also compatible with LTC via MPI mode]
|
|
67 -- Added bn_prime_rabin_miller_trials() which gives the number of Rabin-Miller trials to achieve
|
|
68 a failure rate of less than 2^-96
|
|
69 -- fixed bug in fast_mp_invmod(). The initial testing logic was wrong. An invalid input is not when
|
|
70 "a" and "b" are even it's when "b" is even [the algo is for odd moduli only].
|
|
71 -- Started a new manual [finally]. It is incomplete and will be finished as time goes on. I had to stop
|
|
72 adding full demos around half way in chapter three so I could at least get a good portion of the
|
|
73 manual done. If you really need help using the library you can always email me!
|
|
74 -- My Textbook is now included as part of the package [all Public Domain]
|
|
75
|
|
76 Sept 19th, 2003
|
|
77 v0.27 -- Removed changes.txt~ which was made by accident since "kate" decided it was
|
|
78 a good time to re-enable backups... [kde is fun!]
|
|
79 -- In mp_grow() "a->dp" is not overwritten by realloc call [re: memory leak]
|
|
80 Now if mp_grow() fails the mp_int is still valid and can be cleared via
|
|
81 mp_clear() to reclaim the memory.
|
|
82 -- Henrik Goldman found a buffer overflow bug in mp_add_d(). Fixed.
|
|
83 -- Cleaned up mp_mul_d() to be much easier to read and follow.
|
|
84
|
|
85 Aug 29th, 2003
|
|
86 v0.26 -- Fixed typo that caused warning with GCC 3.2
|
|
87 -- Martin Marcel noticed a bug in mp_neg() that allowed negative zeroes.
|
|
88 Also, Martin is the fellow who noted the bugs in mp_gcd() of 0.24/0.25.
|
|
89 -- Martin Marcel noticed an optimization [and slight bug] in mp_lcm().
|
|
90 -- Added fix to mp_read_unsigned_bin to prevent a buffer overflow.
|
|
91 -- Beefed up the comments in the baseline multipliers [and montgomery]
|
|
92 -- Added "mont" demo to the makefile.msvc in etc/
|
|
93 -- Optimized sign compares in mp_cmp from 4 to 2 cases.
|
|
94
|
|
95 Aug 4th, 2003
|
|
96 v0.25 -- Fix to mp_gcd again... oops (0,-a) == (-a, 0) == a
|
|
97 -- Fix to mp_clear which didn't reset the sign [Greg Rose]
|
|
98 -- Added mp_error_to_string() to convert return codes to strings. [Greg Rose]
|
|
99 -- Optimized fast_mp_invmod() to do the test for invalid inputs [both even]
|
|
100 first so temps don't have to be initialized if it's going to fail.
|
|
101 -- Optimized mp_gcd() by removing mp_div_2d calls for when one of the inputs
|
|
102 is odd.
|
|
103 -- Tons of new comments, some indentation fixups, etc.
|
|
104 -- mp_jacobi() returns MP_VAL if the modulus is less than or equal to zero.
|
|
105 -- fixed two typos in the header of each file :-)
|
|
106 -- LibTomMath is officially Public Domain [see LICENSE]
|
|
107
|
|
108 July 15th, 2003
|
|
109 v0.24 -- Optimized mp_add_d and mp_sub_d to not allocate temporary variables
|
|
110 -- Fixed mp_gcd() so the gcd of 0,0 is 0. Allows the gcd operation to be chained
|
|
111 e.g. (0,0,a) == a [instead of 1]
|
|
112 -- Should be one of the last release for a while. Working on LibTomMath book now.
|
|
113 -- optimized the pprime demo [/etc/pprime.c] to first make a huge table of single
|
|
114 digit primes then it reads them randomly instead of randomly choosing/testing single
|
|
115 digit primes.
|
|
116
|
|
117 July 12th, 2003
|
|
118 v0.23 -- Optimized mp_prime_next_prime() to not use mp_mod [via is_divisible()] in each
|
|
119 iteration. Instead now a smaller table is kept of the residues which can be updated
|
|
120 without division.
|
|
121 -- Fixed a bug in next_prime() where an input of zero would be treated as odd and
|
|
122 have two added to it [to move to the next odd].
|
|
123 -- fixed a bug in prime_fermat() and prime_miller_rabin() which allowed the base
|
|
124 to be negative, zero or one. Normally the test is only valid if the base is
|
|
125 greater than one.
|
|
126 -- changed the next_prime() prototype to accept a new parameter "bbs_style" which
|
|
127 will find the next prime congruent to 3 mod 4. The default [bbs_style==0] will
|
|
128 make primes which are either congruent to 1 or 3 mod 4.
|
|
129 -- fixed mp_read_unsigned_bin() so that it doesn't include both code for
|
|
130 the case DIGIT_BIT < 8 and >= 8
|
|
131 -- optimized div_d() to easy out on division by 1 [or if a == 0] and use
|
|
132 logical shifts if the divisor is a power of two.
|
|
133 -- the default DIGIT_BIT type was not int for non-default builds. Fixed.
|
|
134
|
|
135 July 2nd, 2003
|
|
136 v0.22 -- Fixed up mp_invmod so the result is properly in range now [was always congruent to the inverse...]
|
|
137 -- Fixed up s_mp_exptmod and mp_exptmod_fast so the lower half of the pre-computed table isn't allocated
|
|
138 which makes the algorithm use half as much ram.
|
|
139 -- Fixed the install script not to make the book :-) [which isn't included anyways]
|
|
140 -- added mp_cnt_lsb() which counts how many of the lsbs are zero
|
|
141 -- optimized mp_gcd() to use the new mp_cnt_lsb() to replace multiple divisions by two by a single division.
|
|
142 -- applied similar optimization to mp_prime_miller_rabin().
|
|
143 -- Fixed a bug in both mp_invmod() and fast_mp_invmod() which tested for odd
|
|
144 via "mp_iseven() == 0" which is not valid [since zero is not even either].
|
|
145
|
|
146 June 19th, 2003
|
|
147 v0.21 -- Fixed bug in mp_mul_d which would not handle sign correctly [would not always forward it]
|
|
148 -- Removed the #line lines from gen.pl [was in violation of ISO C]
|
|
149
|
|
150 June 8th, 2003
|
|
151 v0.20 -- Removed the book from the package. Added the TDCAL license document.
|
|
152 -- This release is officially pure-bred TDCAL again [last officially TDCAL based release was v0.16]
|
|
153
|
|
154 June 6th, 2003
|
|
155 v0.19 -- Fixed a bug in mp_montgomery_reduce() which was introduced when I tweaked mp_rshd() in the previous release.
|
|
156 Essentially the digits were not trimmed before the compare which cause a subtraction to occur all the time.
|
|
157 -- Fixed up etc/tune.c a bit to stop testing new cutoffs after 16 failures [to find more optimal points].
|
|
158 Brute force ho!
|
|
159
|
|
160
|
|
161 May 29th, 2003
|
|
162 v0.18 -- Fixed a bug in s_mp_sqr which would handle carries properly just not very elegantly.
|
|
163 (e.g. correct result, just bad looking code)
|
|
164 -- Fixed bug in mp_sqr which still had a 512 constant instead of MP_WARRAY
|
|
165 -- Added Toom-Cook multipliers [needs tuning!]
|
|
166 -- Added efficient divide by 3 algorithm mp_div_3
|
|
167 -- Re-wrote mp_div_d to be faster than calling mp_div
|
|
168 -- Added in a donated BCC makefile and a single page LTM poster ([email protected])
|
|
169 -- Added mp_reduce_2k which reduces an input modulo n = 2**p - k for any single digit k
|
|
170 -- Made the exptmod system be aware of the 2k reduction algorithms.
|
|
171 -- Rewrote mp_dr_reduce to be smaller, simpler and easier to understand.
|
|
172
|
|
173 May 17th, 2003
|
|
174 v0.17 -- Benjamin Goldberg submitted optimized mp_add and mp_sub routines. A new gen.pl as well
|
|
175 as several smaller suggestions. Thanks!
|
|
176 -- removed call to mp_cmp in inner loop of mp_div and put mp_cmp_mag in its place :-)
|
|
177 -- Fixed bug in mp_exptmod that would cause it to fail for odd moduli when DIGIT_BIT != 28
|
|
178 -- mp_exptmod now also returns errors if the modulus is negative and will handle negative exponents
|
|
179 -- mp_prime_is_prime will now return true if the input is one of the primes in the prime table
|
|
180 -- Damian M Gryski ([email protected]) found a index out of bounds error in the
|
|
181 mp_fast_s_mp_mul_high_digs function which didn't come up before. (fixed)
|
|
182 -- Refactored the DR reduction code so there is only one function per file.
|
|
183 -- Fixed bug in the mp_mul() which would erroneously avoid the faster multiplier [comba] when it was
|
|
184 allowed. The bug would not cause the incorrect value to be produced just less efficient (fixed)
|
|
185 -- Fixed similar bug in the Montgomery reduction code.
|
|
186 -- Added tons of (mp_digit) casts so the 7/15/28/31 bit digit code will work flawlessly out of the box.
|
|
187 Also added limited support for 64-bit machines with a 60-bit digit. Both thanks to Tom Wu ([email protected])
|
|
188 -- Added new comments here and there, cleaned up some code [style stuff]
|
|
189 -- Fixed a lingering typo in mp_exptmod* that would set bitcnt to zero then one. Very silly stuff :-)
|
|
190 -- Fixed up mp_exptmod_fast so it would set "redux" to the comba Montgomery reduction if allowed. This
|
|
191 saves quite a few calls and if statements.
|
|
192 -- Added etc/mont.c a test of the Montgomery reduction [assuming all else works :-| ]
|
|
193 -- Fixed up etc/tune.c to use a wider test range [more appropriate] also added a x86 based addition which
|
|
194 uses RDTSC for high precision timing.
|
|
195 -- Updated demo/demo.c to remove MPI stuff [won't work anyways], made the tests run for 2 seconds each so its
|
|
196 not so insanely slow. Also made the output space delimited [and fixed up various errors]
|
|
197 -- Added logs directory, logs/graph.dem which will use gnuplot to make a series of PNG files
|
|
198 that go with the pre-made index.html. You have to build [via make timing] and run ltmtest first in the
|
|
199 root of the package.
|
|
200 -- Fixed a bug in mp_sub and mp_add where "-a - -a" or "-a + a" would produce -0 as the result [obviously invalid].
|
|
201 -- Fixed a bug in mp_rshd. If the count == a.used it should zero/return [instead of shifting]
|
|
202 -- Fixed a "off-by-one" bug in mp_mul2d. The initial size check on alloc would be off by one if the residue
|
|
203 shifting caused a carry.
|
|
204 -- Fixed a bug where s_mp_mul_digs() would not call the Comba based routine if allowed. This made Barrett reduction
|
|
205 slower than it had to be.
|
|
206
|
|
207 Mar 29th, 2003
|
|
208 v0.16 -- Sped up mp_div by making normalization one shift call
|
|
209 -- Sped up mp_mul_2d/mp_div_2d by aliasing pointers :-)
|
|
210 -- Cleaned up mp_gcd to use the macros for odd/even detection
|
|
211 -- Added comments here and there, mostly there but occasionally here too.
|
|
212
|
|
213 Mar 22nd, 2003
|
|
214 v0.15 -- Added series of prime testing routines to lib
|
|
215 -- Fixed up etc/tune.c
|
|
216 -- Added DR reduction algorithm
|
|
217 -- Beefed up the manual more.
|
|
218 -- Fixed up demo/demo.c so it doesn't have so many warnings and it does the full series of
|
|
219 tests
|
|
220 -- Added "pre-gen" directory which will hold a "gen.pl"'ed copy of the entire lib [done at
|
|
221 zipup time so its always the latest]
|
|
222 -- Added conditional casts for C++ users [boo!]
|
|
223
|
|
224 Mar 15th, 2003
|
|
225 v0.14 -- Tons of manual updates
|
|
226 -- cleaned up the directory
|
|
227 -- added MSVC makefiles
|
|
228 -- source changes [that I don't recall]
|
|
229 -- Fixed up the lshd/rshd code to use pointer aliasing
|
|
230 -- Fixed up the mul_2d and div_2d to not call rshd/lshd unless needed
|
|
231 -- Fixed up etc/tune.c a tad
|
|
232 -- fixed up demo/demo.c to output comma-delimited results of timing
|
|
233 also fixed up timing demo to use a finer granularity for various functions
|
|
234 -- fixed up demo/demo.c testing to pause during testing so my Duron won't catch on fire
|
|
235 [stays around 31-35C during testing :-)]
|
|
236
|
|
237 Feb 13th, 2003
|
|
238 v0.13 -- tons of minor speed-ups in low level add, sub, mul_2 and div_2 which propagate
|
|
239 to other functions like mp_invmod, mp_div, etc...
|
|
240 -- Sped up mp_exptmod_fast by using new code to find R mod m [e.g. B^n mod m]
|
|
241 -- minor fixes
|
|
242
|
|
243 Jan 17th, 2003
|
|
244 v0.12 -- re-wrote the majority of the makefile so its more portable and will
|
|
245 install via "make install" on most *nix platforms
|
|
246 -- Re-packaged all the source as seperate files. Means the library a single
|
|
247 file packagage any more. Instead of just adding "bn.c" you have to add
|
|
248 libtommath.a
|
|
249 -- Renamed "bn.h" to "tommath.h"
|
|
250 -- Changes to the manual to reflect all of this
|
|
251 -- Used GNU Indent to clean up the source
|
|
252
|
|
253 Jan 15th, 2003
|
|
254 v0.11 -- More subtle fixes
|
|
255 -- Moved to gentoo linux [hurrah!] so made *nix specific fixes to the make process
|
|
256 -- Sped up the montgomery reduction code quite a bit
|
|
257 -- fixed up demo so when building timing for the x86 it assumes ELF format now
|
|
258
|
|
259 Jan 9th, 2003
|
|
260 v0.10 -- Pekka Riikonen suggested fixes to the radix conversion code.
|
|
261 -- Added baseline montgomery and comba montgomery reductions, sped up exptmods
|
|
262 [to a point, see bn.h for MONTGOMERY_EXPT_CUTOFF]
|
|
263
|
|
264 Jan 6th, 2003
|
|
265 v0.09 -- Updated the manual to reflect recent changes. :-)
|
|
266 -- Added Jacobi function (mp_jacobi) to supplement the number theory side of the lib
|
|
267 -- Added a Mersenne prime finder demo in ./etc/mersenne.c
|
|
268
|
|
269 Jan 2nd, 2003
|
|
270 v0.08 -- Sped up the multipliers by moving the inner loop variables into a smaller scope
|
|
271 -- Corrected a bunch of small "warnings"
|
|
272 -- Added more comments
|
|
273 -- Made "mtest" be able to use /dev/random, /dev/urandom or stdin for RNG data
|
|
274 -- Corrected some bugs where error messages were potentially ignored
|
|
275 -- add etc/pprime.c program which makes numbers which are provably prime.
|
|
276
|
|
277 Jan 1st, 2003
|
|
278 v0.07 -- Removed alot of heap operations from core functions to speed them up
|
|
279 -- Added a root finding function [and mp_sqrt macro like from MPI]
|
|
280 -- Added more to manual
|
|
281
|
|
282 Dec 31st, 2002
|
|
283 v0.06 -- Sped up the s_mp_add, s_mp_sub which inturn sped up mp_invmod, mp_exptmod, etc...
|
|
284 -- Cleaned up the header a bit more
|
|
285
|
|
286 Dec 30th, 2002
|
|
287 v0.05 -- Builds with MSVC out of the box
|
|
288 -- Fixed a bug in mp_invmod w.r.t. even moduli
|
|
289 -- Made mp_toradix and mp_read_radix use char instead of unsigned char arrays
|
|
290 -- Fixed up exptmod to use fewer multiplications
|
|
291 -- Fixed up mp_init_size to use only one heap operation
|
|
292 -- Note there is a slight "off-by-one" bug in the library somewhere
|
|
293 without the padding (see the source for comment) the library
|
|
294 crashes in libtomcrypt. Anyways a reasonable workaround is to pad the
|
|
295 numbers which will always correct it since as the numbers grow the padding
|
|
296 will still be beyond the end of the number
|
|
297 -- Added more to the manual
|
|
298
|
|
299 Dec 29th, 2002
|
|
300 v0.04 -- Fixed a memory leak in mp_to_unsigned_bin
|
|
301 -- optimized invmod code
|
|
302 -- Fixed bug in mp_div
|
|
303 -- use exchange instead of copy for results
|
|
304 -- added a bit more to the manual
|
|
305
|
|
306 Dec 27th, 2002
|
|
307 v0.03 -- Sped up s_mp_mul_high_digs by not computing the carries of the lower digits
|
|
308 -- Fixed a bug where mp_set_int wouldn't zero the value first and set the used member.
|
|
309 -- fixed a bug in s_mp_mul_high_digs where the limit placed on the result digits was not calculated properly
|
|
310 -- fixed bugs in add/sub/mul/sqr_mod functions where if the modulus and dest were the same it wouldn't work
|
|
311 -- fixed a bug in mp_mod and mp_mod_d concerning negative inputs
|
|
312 -- mp_mul_d didn't preserve sign
|
|
313 -- Many many many many fixes
|
|
314 -- Works in LibTomCrypt now :-)
|
|
315 -- Added iterations to the timing demos... more accurate.
|
|
316 -- Tom needs a job.
|
|
317
|
|
318 Dec 26th, 2002
|
|
319 v0.02 -- Fixed a few "slips" in the manual. This is "LibTomMath" afterall :-)
|
|
320 -- Added mp_cmp_mag, mp_neg, mp_abs and mp_radix_size that were missing.
|
|
321 -- Sped up the fast [comba] multipliers more [yahoo!]
|
|
322
|
|
323 Dec 25th,2002
|
|
324 v0.01 -- Initial release. Gimme a break.
|
|
325 -- Todo list,
|
|
326 add details to manual [e.g. algorithms]
|
|
327 more comments in code
|
|
328 example programs
|