Giovanni Bajo
4c776ac66d
Simpify mask formula.
2011-09-27 09:38:47 +02:00
Giovanni Bajo
faf0f96de1
Fix a bug in case the most significants bits were generated as zero.
2011-09-27 01:57:58 +02:00
Giovanni Bajo
3d5ada60c3
Avoid writing directly into fp_digits through char*.
...
There are potential issues with weird platforms were not
all bits of a fp_digit are used (padding bits), plus it
makes it harder to do reproducible testing of algorithms.
2011-09-27 01:57:28 +02:00
Giovanni Bajo
d1dee8c6e1
Fix a sign-extension bug on 64-bit platforms
2011-09-27 01:55:42 +02:00
Giovanni Bajo
3bab60e89c
Remove unused parameter 't'
2011-09-27 01:01:35 +02:00
Giovanni Bajo
279da69658
Remove usage of malloc() from fp_prime_random_ex.
...
This is the only instance of dynamic memory in TFM. It can be avoided
by writing directly into the dp[] array, and it does not violate C
aliasing rules which specifically allow access on objects through char*.
It does not matter the platform-specific representation of digits since
we are filling them with random data anyway.
2011-09-21 17:45:18 +02:00
Giovanni Bajo
08b3654ac4
Avoid always generating 0x80 as MSB in primes.
...
When we ask to generate a prime whose size is a multiple of 8,
the code wrongly computes the mask as 0x00 instead of 0xFF, so the
generated prime always has the MSB set to 0x80 (the highest bit is OR'ed
later in the code).
2011-09-21 17:27:03 +02:00
Steffen Jaeckel
da5fa59f2c
fixed bug in testcase reported by martins.mozeiko@gmail.com
2011-03-27 19:57:48 +02:00
Steffen Jaeckel
1e90accef6
added testcase of problem reported by martins.mozeiko@gmail.com
2011-03-27 19:34:36 +02:00
Steffen Jaeckel
eb5075e7fc
added typecast in fp_read_radix() to suppress compiler warning
2011-03-27 19:33:53 +02:00
Steffen Jaeckel
f340961df9
added gitignore
2011-03-27 19:33:13 +02:00
Steffen Jaeckel
a1ac91d15e
after multiple objections of libtom users [1], we decided to change licensing
...
to a dual licensing model.
[1] https://groups.google.com/group/libtom/browse_thread/thread/d7b67bc6410250b3
2011-01-19 10:28:48 +01:00
Steffen Jaeckel
6efcb2e5e0
Re-licensed all code under WTFPL, c.f. http://sam.zoy.org/wtfpl/
2010-10-26 16:02:37 +02:00
Patrick Oppenlander
cfb7c1e52e
fix register constraints in fp_montgomery_reduce
2010-07-22 10:29:12 +02:00
Tom St Denis
da88c2d42f
added tomsfastmath-0.12
2010-07-22 10:06:30 +02:00
Tom St Denis
ea10e969b2
added tomsfastmath-0.10
2010-07-22 10:06:29 +02:00
Tom St Denis
4b439169aa
added tomsfastmath-0.09
2010-07-22 10:06:28 +02:00
Tom St Denis
f99cdec6b0
added tomsfastmath-0.08
2010-07-22 10:06:27 +02:00
Tom St Denis
9ce1fe4656
added tomsfastmath-0.07
2010-07-22 10:06:26 +02:00
Tom St Denis
091b337fe8
added tomsfastmath-0.06
2010-07-22 10:06:25 +02:00
Tom St Denis
a6c4c5a261
added tomsfastmath-0.05
2010-07-22 10:06:25 +02:00
Tom St Denis
f91cf2d1cf
added tomsfastmath-0.04
2010-07-22 10:06:24 +02:00
Tom St Denis
ca551d4c5e
added tomsfastmath-0.03
2010-07-22 10:06:23 +02:00
Tom St Denis
6bb413fd72
added tomsfastmath-0.02
2010-07-22 10:06:22 +02:00
Tom St Denis
5e92ed2a59
added tomsfastmath-0.01
2010-07-22 10:06:21 +02:00