Daniel Mendler
bf9507a9d4
replace mp_bool by stdbool
...
* This gives the advantage that static analysis **understands** bool,
but complains about using an enum type instead of bool.
* If stdbool.h is not desired, true/false/bool can be replaced using sed
as in the no-stdint-h branch.
* We already include stdint.h and stdbool.h is not more harmful than
this header
2019-10-27 18:36:56 +01:00
Daniel Mendler
58fb93fd79
cleanup prime rand function
2019-10-27 18:36:56 +01:00
Daniel Mendler
a44e68e652
remove MP_IS_* macros
2019-10-27 18:36:55 +01:00
Daniel Mendler
f8b2f5d6fe
s_mp_reverse is only used by mp_to_radix
2019-10-27 18:36:55 +01:00
Francois Perrad
814d0387a6
literal suffix
2019-10-27 14:27:53 +01:00
Francois Perrad
f2efe74676
more cast
2019-10-27 14:27:53 +01:00
nijtmans
a8ca1c3cc6
fix win32 includes, remove support for everything older than Windows XP
2019-10-27 13:14:28 +01:00
Francois Perrad
9051694850
literal suffix
2019-10-24 18:26:31 +02:00
Francois Perrad
d0e26bb3ff
explicit operator precedence
2019-10-24 18:26:25 +02:00
Daniel Mendler
87b4e51794
move out s_mp_log_pow2, fix limitation of base
2019-10-23 19:18:15 +02:00
Daniel Mendler
14642642f9
add prefix to cutoff variables
2019-10-23 18:21:57 +02:00
Daniel Mendler
00b263f303
remove private_mp_word
2019-10-23 18:19:16 +02:00
czurnieden
9edd185f66
Addition of fast division (recursive divrem only)
2019-10-22 21:02:18 +02:00
Steffen Jaeckel
d06e2986ca
v1.2.0
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Gnu Privacy Tools
iF4EABEIAAYFAl2uz5oACgkQrwyxdiHtrXLIngD/WoeRRt9sYkjNiSmiKYuBvgAi
pF0Sdfe7vAAhY3jpRX0A/2rJdJFGiFiuAB72qWiGJZg0Rr+kbOGwKfvYgE6jROw6
=EL7p
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Gnu Privacy Tools
iF4EABEIAAYFAl2u0EEACgkQrwyxdiHtrXIQkQD+I8Z6IYTtVmG0patanpT1EFyA
SZUKP2z50owej4uF3QAA/32m1dmpG6MSYhfu9zu4435PwaI+RgCaUrZ1YaoWroXJ
=agqw
-----END PGP SIGNATURE-----
Merge tag 'v1.2.0' into develop
v1.2.0
2019-10-22 11:47:42 +02:00
Daniel Mendler
f0c83aea6c
split mp_log_u32 for more configurability
2019-10-20 15:48:55 +02:00
Daniel Mendler
5c6391dd7c
remove some MP_8BIT remnants
2019-10-20 15:39:09 +02:00
Steffen Jaeckel
7a68f12873
Execute move.sh - Rename files from bn_* to match the function names.
...
* git blame <renamed-file> is not affected
* git log --follow <renamed-file> can be used to show log across renames
2019-10-19 16:24:39 +02:00
nijtmans
3eaa268e21
Adapt mingw-build of libtommath.dll to respect internal symbols too
2019-10-19 15:01:33 +02:00
Daniel Mendler
42ebcbfee4
enable MP_PRIVATE (visibility=hidden)
2019-10-19 15:00:47 +02:00
nijtmans
7bba19e044
Add comment
2019-10-18 14:53:42 +02:00
nijtmans
785e32eb9c
Move disabling of warning C4003 from makefile.msvc to tommath_private.h
2019-10-18 14:35:08 +02:00
Daniel Mendler
20dcc923f6
rename internal constant radix arrays
2019-10-17 17:07:02 +02:00
Daniel Mendler
45a3bf7694
remove deprecated functions
2019-10-17 16:56:27 +02:00
Daniel Mendler
fce429d08b
tommath.h: do not expose limits.h
2019-10-16 14:42:21 +02:00
Francois Perrad
b19750633c
use literal char
2019-10-10 20:32:53 +02:00
czurnieden
b6813a4122
replace mp_export/import by mp_pack/unpack
2019-10-08 22:30:25 +02:00
czurnieden
abdb033402
Refactored functions to read and write binaries and added "maxlen"
2019-10-06 03:38:16 +02:00
Francois Perrad
8cf0d3db85
literal suffix
2019-09-07 12:29:28 +02:00
Daniel Mendler
625defdcff
fix gcc version check for deprecations
2019-07-24 11:09:44 +02:00
Daniel Mendler
8c1b296e86
add feature detection macro MP_HAS
2019-07-24 11:09:42 +02:00
nijtmans
91b113cb95
Macro consistancy: Always use function-name as first parameter and type(s) last, as in SET macro's
2019-07-03 12:49:19 +02:00
Daniel Mendler
8cf4363992
MP_SET_SIGNED: add utype parameter
2019-06-07 08:28:32 +02:00
Daniel Mendler
5302b907ff
use MP_SIZEOF_BITS
2019-06-07 08:28:32 +02:00
Steffen Jaeckel
a36374578f
change macros to contain types
2019-06-07 08:28:05 +02:00
Steffen Jaeckel
6c39b07bc2
split up again into separate files
2019-06-07 08:28:05 +02:00
Daniel Mendler
4b475aca03
fixes for msvc
2019-05-26 11:47:26 +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
c7a7bd47af
MP_PREC is an internal macro, it should be defined in tommath_private.h
2019-05-24 12:26:50 +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
18f6e4648b
add MP_STATIC_ASSERT
2019-05-23 16:00:31 +02:00
Francois Perrad
330b980d49
literal char
2019-05-21 20:23:16 +02:00
Francois Perrad
8d73e158df
literal suffix
2019-05-21 20:23:16 +02:00
Francois Perrad
a4f9818b71
more cast
2019-05-21 20:23:16 +02:00
Daniel Mendler
bd8f7e55e6
introduce MP_PRIVATE to hide symbols (opt-in for now)
2019-05-21 18:08:02 +02:00
Daniel Mendler
0dfa9da5a6
make tommath_class.h and tommath_superclass.h private
...
These headers are used for configuration during build time.
Therefore they shouldn't be exposed as part of the public API.
2019-05-21 18:01:17 +02:00
Daniel Mendler
6631d42664
remove __cplusplus stuff from tommath_private.h
...
tommath_private.h is an internal header which won't be included
by a C++ source file.
2019-05-21 15:58:06 +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
Daniel Mendler
a8239c2465
deprecate mp_get_bit
...
The return type of mp_get_bit was imprecise (either mp_err or mp_bool),
therefore this function is deprecated in favor of s_mp_get_bit for now.
If we need s_mp_get_bit to be public, we should add it under a different
name. However since mp_set_bit is not available, I don't think there any
downstream users (ab)using mp_int as bitsets.
2019-05-18 10:03:47 +02:00
Daniel Mendler
56e7a40123
deprecate mp_jacobi
2019-05-18 10:03:46 +02:00
Daniel Mendler
75e85a7341
move mp_prime_random_ex to bn_deprecated.c
2019-05-18 10:03:46 +02:00