Francois Perrad
38116079e4
literal suffix
2019-05-13 17:53:10 +02:00
Francois Perrad
04cff08991
explicit operator precedence
2019-05-13 17:53:03 +02:00
Francois Perrad
2d508723aa
const parameter
2019-05-13 17:53:00 +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
Steffen Jaeckel
6327a69321
Merge pull request #256 from libtom/rand-cleanup
...
Use Jenkins rand in test suite
2019-05-13 10:22:08 +02:00
Daniel Mendler
f85bd31e4e
fix undefined behavior in labs
2019-05-12 23:45:36 +02:00
Daniel Mendler
16ff016ebe
win32 rand - just leak the crypt handle
...
* it will be closed so or so atexit
* the user could request more random data in another atexit routine
leading to another atexit routine being registered
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
c8cc3657e7
mov s_mp_rand_source_platform to separate file
2019-05-12 23:45:36 +02:00
Daniel Mendler
8d71a9e33b
travis: add -fsanitize=undefined
2019-05-12 23:45:36 +02:00
Steffen Jaeckel
625c2460af
Merge pull request #257 from libtom/use-fwrite
...
use fwrite instead of fputc
2019-05-12 23:45:23 +02:00
Daniel Mendler
dd4863abf4
use fwrite instead of fputc
2019-05-12 23:43:23 +02:00
Steffen Jaeckel
1c9481936c
Merge pull request #253 from libtom/no_grow_in_set_int2
...
No grow in mp_set_int (2)
2019-05-12 23:42:44 +02:00
Daniel Mendler
6fc673d645
statically check MP_PREC >= MP_MIN_PREC
2019-05-12 15:52:32 +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
Steffen Jaeckel
235e831db0
Merge pull request #255 from libtom/hardening
...
hardening: add MP_ZERO_BUFFER, MP_ZERO_DIGITS
2019-05-12 11:52:48 +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
Steffen Jaeckel
55e312b1c1
Merge pull request #244 from libtom/warn-unused-result
...
add warn_unused_result, found one missing check!
2019-05-11 20:09:18 +02:00
Daniel Mendler
adf9605d6c
add warn_unused_result, found one missing check!
2019-05-11 19:26:58 +02:00
Steffen Jaeckel
5d8f04a944
Merge pull request #241 from fperrad/20190508_lint
...
more linting
2019-05-11 19:26:36 +02:00
Francois Perrad
5e66cfc66c
remove useless cast
2019-05-11 16:57:04 +02:00
Francois Perrad
67756d7b48
explicit operator precedence
2019-05-11 16:57:04 +02:00
Francois Perrad
493c3c23f8
use same paramater name as in prototype
2019-05-11 16:57:04 +02:00
Francois Perrad
cc703a849b
add missing parameter name in prototype
2019-05-11 16:57:04 +02:00
Steffen Jaeckel
be7ee4d025
Merge pull request #238 from fperrad/20190508_macros
...
new macros
2019-05-11 16:11:26 +02:00
Francois Perrad
7d4e8363e0
refactor with new private macro MP_MAXFAST
2019-05-11 12:05:38 +02:00
Francois Perrad
556219aa5b
refactor with new private macro MP_SIZEOF_BITS
...
CHAR_BIT is no longer directly used
2019-05-11 12:05:38 +02:00
Steffen Jaeckel
17719ea69f
Merge pull request #249 from libtom/remove-artifacts
...
remove some historical artifacts
2019-05-11 08:43:14 +02:00
Daniel Mendler
483f66c64a
remove some historical artifacts
...
* pretty.build: build system is already pretty baroque and we are
not using this anywhere in CI etc.
* rename.sh: only used for internal renaming. can be retrieved from
git history if needed again.
* tombc/grammer.txt: ?
2019-05-11 08:39:55 +02:00
Steffen Jaeckel
0971e05c7a
Merge pull request #242 from libtom/random-prime
...
deprecate mp_prime_random_ex in favor of mp_prime_rand
2019-05-11 08:35:10 +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
d4c5fbf572
Merge pull request #245 from libtom/deprecations
...
deprecate old macros, deprecate mp_rand_digit
2019-05-11 00:40:59 +02:00
Daniel Mendler
e05215a894
deprecate old macros, deprecate mp_rand_digit
2019-05-09 15:05:47 +02:00
Steffen Jaeckel
385d1a823f
Merge pull request #248 from libtom/test-mp_rand
...
Test mp_rand
2019-05-09 14:44:19 +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
Steffen Jaeckel
cc3be56501
Merge pull request #246 from libtom/error-string
...
add MP_ERR to mp_error_to_string
2019-05-09 09:31:49 +02:00
Daniel Mendler
53c30fff5f
add MP_ERR to mp_error_to_string
2019-05-09 04:16:24 +02:00
Steffen Jaeckel
be11f12bcd
Merge pull request #236 from libtom/custom-rand-source
...
support custom random data source via mp_rand_source
2019-05-08 17:16:12 +02:00
Daniel Mendler
56fb5e4a9a
mp_rand_source(NULL) sets to platform random source
2019-05-08 15:17:37 +02:00
Daniel Mendler
9e28ef9fa2
mp_rand: use #else after arcrandom
2019-05-08 15:15:45 +02:00
Daniel Mendler
2a0021a447
mp_rand: remove superflous mp_clamp
2019-05-08 14:57:49 +02:00
Daniel Mendler
9ddf1e5838
support custom random data source via mp_rand_source
...
* deprecate MP_PRNG_ENABLE_LTM_RNG
* custom mp_rand_source is used always if set, which should be more aligned with user expectations
* use custom source in tune.c
* don't call random number generator once per digit, which is slow
2019-05-08 11:21:10 +02:00
Daniel Mendler
f0f75186cd
set std=c89
...
we cannot set it together with -Wsystem-headers since the system headers
are usually not c89 but c99
2019-05-08 11:13:58 +02:00
Steffen Jaeckel
50fe11bfb7
fix help-output of tune program
...
[skip ci]
2019-05-07 16:34:33 +02:00
Steffen Jaeckel
f4d8b463f8
Merge pull request #235 from libtom/tune-fixes
...
Tune fixes
2019-05-07 16:33:44 +02:00
Daniel Mendler
e0e8c3d5f0
just use one .gitignore for simplicity
2019-05-07 12:36:11 +02:00