Daniel Mendler
ca89e9c0ef
rename mp_root/mp_expt to mp_*_u32
2019-07-17 15:45:04 +02:00
Daniel Mendler
71696549a8
deprecate mp_expt_d and mp_n_root in favor of mp_expt and mp_root
2019-07-17 15:45:04 +02:00
nijtmans
0db64fc83c
Rename bn_get_magxx -> bn_get_mag_uxx. Documentation updated too
2019-07-03 14:45:14 +02:00
nijtmans
ea3353b673
Simplify test-cases, by using mp_set_l. Also fix use of types in 2 other files
2019-06-13 15:44:00 +02:00
Daniel Mendler
5302b907ff
use MP_SIZEOF_BITS
2019-06-07 08:28:32 +02:00
nijtmans
dfbb5ecd56
MSVC compile: higher warning-level -Wall, but warning-free
2019-06-06 16:22:54 +02:00
Daniel Mendler
c7314fa400
deprecate mp_n_root_ex and mp_expt_d_ex
...
These functions were introduced to give some timing guarantees.
However the guarantees are too weak to be useful.
The functions seem to be unused essentially by downstream users.
2019-05-27 15:59:40 +02:00
Steffen Jaeckel
0e1a0e6529
also test mp_shrink()
2019-05-27 15:34:53 +02:00
Daniel Mendler
bcec605af5
deprecate mp_prime_is_divisible and ltm_prime_tab
...
* it is an implementation detail used for prime testing
* there is upcoming work by @czurnieden regarding a generalised prime sieve
* furthermore remove jacobi test (replaced by kronecker)
2019-05-24 12:30:55 +02:00
Daniel Mendler
0a9f5e9bc1
use u32 i64 suffix
2019-05-24 10:21:54 +02:00
Daniel Mendler
d7e1cb4a09
another proposal: use _ul and _l for the long macros
2019-05-24 00:15:57 +02:00
Daniel Mendler
b58c996686
use int32 and uint32 instead of sint and uint
2019-05-24 00:15:57 +02:00
Daniel Mendler
3289c9590b
introduce various mp_set_sint/mp_set_uint functions with precise types
2019-05-24 00:15:57 +02:00
Daniel Mendler
1af0de1f91
deprecate mp_tc_(and|or|xor) in favor of mp_(and|or|xor)
...
* same behavior for positive numbers
* generalisation for negative numbers, treating them as two complement
* improve algorithm, iterate once over the digits, manually perform two complement
* simplify mp_add_d, mp_sub_d
* functions are safe in case of a==c or b==c
* renamed mp_tc_div_2d to mp_signed_rsh (signed right shift)
2019-05-21 18:28:11 +02:00
Daniel Mendler
0b840b78a3
make mp_word private
...
mp_word is an internal type and it is problematic if it is exposed
in the public api. See for example #216 - MSVC does not support 128 bit
mp_words. But it is perfectly ok to use those internally in the library,
as long as the library is compiled with GCC.
2019-05-21 15:34:04 +02:00
czurnieden
03ca7bcdae
added tests for Karatsuba and Toom-Cook 3-way
2019-05-21 15:21:39 +02:00
Steffen Jaeckel
51cda5b82b
use correct amount of MR trials in tests
2019-05-21 09:48:48 +02:00
Steffen Jaeckel
cb3ff8c28d
improve coverage
2019-05-21 09:45:22 +02:00
Francois Perrad
150c47cce2
refactor literal suffix with u lowercase
2019-05-20 05:36:24 +02:00
Daniel Mendler
f55f0a9ef5
fix some usages of enum types
2019-05-18 10:03:47 +02:00
Daniel Mendler
56e7a40123
deprecate mp_jacobi
2019-05-18 10:03:46 +02:00
Daniel Mendler
198418ba5e
bugfix: don't revert to platform rand source, but to jenkins source!
2019-05-18 10:00:07 +02:00
Daniel Mendler
4534056c28
use enums mp_err, mp_ord, mp_bool, mp_sign
...
* MP_USE_ENUMS enables enums
* Wc++-compat catches some implicit conversions if MP_USE_ENUMS is defined
* 100% backwards compatible API/ABI if MP_USE_ENUMS is not defined
2019-05-13 19:15:14 +02:00
Daniel Mendler
f85bd31e4e
fix undefined behavior in labs
2019-05-12 23:45:36 +02:00
Daniel Mendler
2a2e2716c2
move jenkins prng to bn_s_mp_rand_jenkins.c
2019-05-12 23:45:36 +02:00
Daniel Mendler
8d71a9e33b
travis: add -fsanitize=undefined
2019-05-12 23:45:36 +02:00
Daniel Mendler
7365442ace
No grow necessary in mp_set_int* functions
...
* mp_set_int* always return MP_OKAY
* remove return checks for mp_set_int*
* introduce MP_MIN_PREC
2019-05-12 13:04:45 +02:00
Daniel Mendler
0669e92e78
deprecate mp_prime_random_ex in favor of mp_prime_rand
...
We can use the internal mp_rand generator now, since it generates
numbers which are safe for crypto purposes.
2019-05-11 00:48:48 +02:00
Steffen Jaeckel
1a12486d4b
add mp_rand test
2019-05-09 10:47:35 +02:00
Steffen Jaeckel
eedf1624f0
allow filtering of tests executed
2019-05-09 10:47:35 +02:00
Daniel Mendler
44d03a6f8b
deprecate LTM_PRIME_* macros in favor of MP_PRIME_*
2019-05-07 09:45:38 +02:00
Daniel Mendler
e45f75fddb
deprecate DIGIT_BIT, use MP_DIGIT_BIT
2019-04-25 13:39:50 +02:00
Daniel Mendler
e8f56cc4e0
enable -Wconversion and -Wsign-conversion on travis
...
* no changes to the library code
* conversion issues in the demo testsuite fixed
* add CONV_WARNINGS and enable the warnings only for clang-7 (for now)
* disable Wsystem-headers if Wconversion is enabled, to avoid warnings from the system headers
2019-04-19 22:01:11 +02:00
Daniel Mendler
fbfcb66184
apply rename
2019-04-12 14:56:29 +02:00
czurnieden
35311aea49
added function mp_ilogb
2019-04-09 21:59:59 +02:00
czurnieden
27ca25cb82
added multiplcation balancing for the Toom-Cook algorithms
2019-04-07 22:15:09 +02:00
czurnieden
984d3ff679
changed seed to make nth-root usable
2019-04-06 22:51:10 +02:00
czurnieden
0ed98cf1cd
removed tracing
2019-04-04 12:55:39 +02:00
czurnieden
769218ccc7
additional functions mp_incr and mp_decr
2019-04-04 07:58:19 +02:00
Steffen Jaeckel
cb1eb16116
run make astyle
...
[skip ci]
2019-04-04 07:58:07 +02:00
Francois Perrad
15a1adc290
literal suffix
2019-03-06 15:13:18 +01:00
Daniel Mendler
1fc7d20dab
opponent/test.c: move ndraw to main.c
2019-03-04 01:56:06 +01:00
Daniel Mendler
3f42b6a799
test/opponent.c: add todo comments
2019-03-04 01:11:12 +01:00
Daniel Mendler
674fdddbfc
remove duplicate T(mp_tc_div_2d)
2019-03-04 01:10:20 +01:00
Daniel Mendler
cd1570bb88
split test suite
2019-03-04 01:02:22 +01:00
Tom St Denis
ef490f30f6
added libtommath-0.19
2010-07-15 17:25:24 +02:00
Tom St Denis
fd181cc841
added libtommath-0.17
2010-07-15 17:25:21 +02:00