Commit Graph

99 Commits

Author SHA1 Message Date
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
Daniel Mendler
668cda01e8
remove unnecessary duplication of multiplication 2019-05-13 19:18:09 +02:00
Daniel Mendler
334c32e034
fix signature 2019-05-13 19:15:59 +02:00
Daniel Mendler
0b73dab69f
MP_FREE_DIGITS: add missing cast 2019-05-13 19:15:14 +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
Francois Perrad
38116079e4 literal suffix 2019-05-13 17:53:10 +02:00
Francois Perrad
3c5afa9115 add missing parameter name in prototype 2019-05-13 17:52:56 +02:00
Francois Perrad
fa2d86af95 explicit operator precedence 2019-05-13 17:52:34 +02:00
Francois Perrad
07aaa4c381 explicit condition 2019-05-13 17:52:34 +02:00
Francois Perrad
783e3cdf82 format block macros 2019-05-13 17:52:34 +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
c8cc3657e7
mov s_mp_rand_source_platform to separate file 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
61d9e528a4
hardening: add MP_ZERO_BUFFER, MP_ZERO_DIGITS
* (!) Always zero buffer before freeing if MP_NO_ZERO_ON_FREE is not defined
* Add MP_NO_ZERO_ON_FREE to disable hardening
* Add MP_ZERO_BUFFER, MP_ZERO_DIGITS, MP_FREE_BUFFFER, MP_FREE_DIGITS
* Never use MP_FREE directly, use MP_FREE_DIGITS or MP_FREE_BUFFER
* Add MP_USE_MEMSET to use memset instead of loop
* Disable astyle backups which are annonying in the times of git
2019-05-12 01:01:03 +02:00