Daniel Mendler
adf9605d6c
add warn_unused_result, found one missing check!
2019-05-11 19:26:58 +02:00
Francois Perrad
cc703a849b
add missing parameter name in prototype
2019-05-11 16:57:04 +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
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
Daniel Mendler
250751be46
tommath.h: do not expose stdlib.h
2019-05-07 09:32:59 +02:00
Daniel Mendler
818d8fb7f5
Rework handling of tunable cutoffs
...
* In the default settings, a cutoff X can be modified at runtime
by adjusting the corresponding X_CUTOFF variable.
* Tunability of the library can be disabled at compile time
by defining the MP_FIXED_CUTOFFS macro.
* There is an additional file tommath_cutoffs.h, which defines
the default cutoffs. These can be adjusted manually or by the
autotuner.
2019-05-04 13:08:37 +02:00
Daniel Mendler
90eccd5768
prefix private macros by PRIVATE_
2019-04-25 15:36:35 +02:00
Daniel Mendler
632601f405
MP_WARRAY is an internal macro
2019-04-25 13:39:50 +02:00
Daniel Mendler
e45f75fddb
deprecate DIGIT_BIT, use MP_DIGIT_BIT
2019-04-25 13:39:50 +02:00
Daniel Mendler
a8c76138f9
deprecate macros in tommath.h
...
* move MP_DEPRECATED to tommath.h since we need it later
* add MP_DEPRECATED_PRAGMA
2019-04-25 13:39:50 +02:00
Daniel Mendler
fbfcb66184
apply rename
2019-04-12 14:56:29 +02:00
Daniel Mendler
7469e852f1
add rename script
2019-04-12 14:55:09 +02:00
Daniel Mendler
87292ed10a
move mp_balance_mul to tommath_private.h
2019-04-12 14:55:09 +02:00
Daniel Mendler
df8fcb0e4b
add MP_DEPRECATED macro
2019-04-12 14:55:09 +02:00
Daniel Mendler
e09a5c99bc
remove s_mp_mul which is only used once
2019-04-12 14:55:09 +02:00
Daniel Mendler
c4fb2241dc
rename macros in tommath_private to use MP_* prefix
2019-04-12 14:55:08 +02:00
Francois Perrad
42193f8914
explicit operator precedence
2019-04-09 20:26:08 +02:00
Daniel Mendler
ff56140462
shorter headers
2019-04-07 17:26:31 +02:00
Daniel Mendler
70a30ae7a7
remove footers
2019-04-07 17:26:31 +02:00
Steffen Jaeckel
a3651cbd79
apply modifications to XCALLOC according to #192
2019-04-06 23:41:24 +02:00
Steffen Jaeckel
d01b531897
Revert "Merge pull request #188 from libtom/unused_xcalloc"
...
This reverts commit 27417b85c7
, reversing
changes made to d449bd44c0
.
2019-04-06 23:41:24 +02:00
Daniel Mendler
db9a47d514
allocation functions: pass size to XREALLOC and XFREE
...
This is similar to the signatures of the custom allocation functions provided by GMP.
The allocation sizes are useful if the allocator has no easy way to access the allocation size.
2019-04-05 10:58:07 +02:00
Daniel Mendler
77143c33ea
remove mp_set_long specialization
2019-04-04 23:03:25 +02:00
Daniel Mendler
28e61778b9
remove OPT_CAST
...
The explicit cast does not hurt in C. Furthermore the explicit cast is needed
if tommath is compiled as C with strict warning settings.
2019-03-29 10:38:43 +01:00
nijtmans
54d673f1a8
XCALLOC is not used anywhere anymore, so it can be removed
2019-03-29 08:58:53 +01:00
Francois Perrad
9d63882d50
explicit condition
2019-03-26 18:58:44 +01:00
Francois Perrad
6d63370370
explicit operator precedence
2019-03-26 18:58:41 +01:00
Daniel Mendler
32099fdef1
avoid ctype toupper
...
- libc toupper is locale dependent
- removes the dependency on ctype.h
2019-03-26 17:45:13 +01:00
nijtmans
6dc8ae5b64
efficiency improvement in get/set routines
2019-03-26 15:39:30 +01:00
Francois Perrad
de19b264ca
introduce new private macros
2019-02-02 07:39:23 +01:00
Steffen Jaeckel
18355de625
Update file headers
...
[skip ci]
2018-12-29 17:56:20 +01:00
Francois Perrad
bd4167e883
const mp_s_rmap
2018-06-04 18:29:47 +02:00
czurnieden
9034e712b8
Do not use installed headers for building
2018-05-02 21:43:17 +02:00
Steffen Jaeckel
f51249b6aa
clean-up file headers
2018-02-27 23:30:43 +01:00
Francois Perrad
f1d6c88759
refactor cast
2017-10-15 19:58:35 +02:00
Francois Perrad
bdbed00079
literal suffix
2017-10-15 19:57:12 +02:00
Steffen Jaeckel
0a7ecc3bd4
add the inverse of mp_s_rmap
2017-10-15 12:03:00 +02:00
nijtmans
f674018a41
constify remaining functions
2017-09-20 16:59:43 +02:00
Francois Perrad
f89cda034b
format with astyle (step 5)
2017-08-30 20:23:26 +02:00
Francois Perrad
82a2d385db
refactor indentation of preprocessor directives
2017-08-30 20:09:16 +02:00
Francois Perrad
378be117a3
add missing space after comma
2017-08-30 05:52:31 +02:00
Steffen Jaeckel
6f21294212
replace SVN tags
2017-08-28 17:00:58 +02:00
Steffen Jaeckel
2dad1298ad
only define MIN/MAX if they are not defined yet
...
This closes #72
2017-04-01 00:35:03 +02:00
Francois Perrad
a0b8ce68f7
use unsigned literal
2015-12-02 22:47:51 +01:00
Francois Perrad
10cfb95508
use same parameter name between prototype declaration and function definition
2015-12-02 22:47:51 +01:00
Francois Perrad
e6cfefc1ac
more private stuff
2015-11-19 21:53:32 +01:00
Francois Perrad
f771e317ff
move standard includes
2015-11-19 21:34:58 +01:00
Steffen Jaeckel
4e3f1344a5
provide tommath_private.h
...
tommath.h contains declarations for the public part of the library.
tommath_private.h contains the functions which are private to ltm and
should not be exposed to the public.
2015-11-12 01:49:07 +01:00