kc3-lang/libtommath/tommath.h

Branch :


Log

Author Commit Date CI Message
0a9f5e9b 2019-05-24 10:21:54 use u32 i64 suffix
b58c9966 2019-05-23 23:39:47 use int32 and uint32 instead of sint and uint
d7959854 2019-05-23 11:12:30 improve comment in tommath.h, extend .gitignore
d7e1cb4a 2019-05-24 00:15:11 another proposal: use _ul and _l for the long macros
3289c959 2019-05-20 10:41:06 introduce various mp_set_sint/mp_set_uint functions with precise types
1af0de1f 2019-05-20 19:11:25 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)
0dfa9da5 2019-05-19 12:53:49 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.
0b840b78 2019-05-17 20:53:24 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.
a8239c24 2019-05-13 11:32:42 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.
56e7a401 2019-05-13 02:46:11 deprecate mp_jacobi
89bac3a7 2019-05-13 15:06:54 deprecate MP_RANGE
4534056c 2019-05-13 00:22:18 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
38116079 2019-05-13 17:51:07 literal suffix
2d508723 2019-05-13 17:36:12 const parameter
7365442a 2019-05-10 23:59:46 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
adf9605d 2019-05-09 03:28:49 add warn_unused_result, found one missing check!
cc703a84 2019-05-11 12:09:59 add missing parameter name in prototype
0669e92e 2019-05-08 20:18:53 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.
e05215a8 2019-05-09 04:06:12 deprecate old macros, deprecate mp_rand_digit
9ddf1e58 2019-05-07 12:26:46 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
290c28c1 2019-05-07 09:49:26 deprecate PRIME_SIZE in favor of MP_PRIME_SIZE
44d03a6f 2019-05-07 09:45:38 deprecate LTM_PRIME_* macros in favor of MP_PRIME_*
e2ee39b5 2019-04-26 12:39:26 deprecate ltm_prime_callback
80f5fac5 2019-04-26 12:35:39 rename LTM_NO_FILE to MP_NO_FILE
0337d48b 2019-04-25 19:35:19 add MP_NULL_TERMINATED
250751be 2019-05-07 09:32:59 tommath.h: do not expose stdlib.h
818d8fb7 2019-05-03 17:39:10 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.
90eccd57 2019-04-25 15:36:35 prefix private macros by PRIVATE_
632601f4 2019-04-13 17:34:11 MP_WARRAY is an internal macro
e45f75fd 2019-04-13 08:46:57 deprecate DIGIT_BIT, use MP_DIGIT_BIT
a8c76138 2019-04-12 21:15:56 deprecate macros in tommath.h * move MP_DEPRECATED to tommath.h since we need it later * add MP_DEPRECATED_PRAGMA
87292ed1 2019-04-09 12:19:40 move mp_balance_mul to tommath_private.h
35311aea 2019-04-03 23:50:57 added function mp_ilogb
27ca25cb 2019-04-06 18:55:43 added multiplcation balancing for the Toom-Cook algorithms
ff561404 2019-04-07 15:29:11 shorter headers
70a30ae7 2019-04-07 02:29:28 remove footers
5da4e0ac 2019-04-04 23:06:00 remove unnecessary size_t casts, fix Wconversion/Wsign-conversion issues Wconversion and Wsign-conversion is still not activated by default, since there are many issues in demo.c.
769218cc 2019-04-03 18:59:09 additional functions mp_incr and mp_decr
a3076677 2019-03-28 16:18:41 previous commit removed a little bit too much
ef07da5b 2019-03-28 16:13:37 mp_min_u32 is not used anywhere anymore, so it can be removed
8eb3bb28 2019-03-22 15:02:29 do not include stdio.h if LTM_NO_FILE is defined stdio.h might not be available on constraint environments
6ce271c4 2018-12-28 09:41:54 mp_iseven & mp_isodd becomes C functions
1c8c5348 2019-01-15 18:20:24 Merge pull request #147 from czurnieden/moarvm_workarounds workaround for the MoarVM problem with MP_GEN_RAND et al. (cherry picked from commit 11d6e0391421bc996b2cf780f3f4c3fa634001d0)
08eb995d 2019-01-13 20:21:36 implemented Steffen Jaeckels superior suggestion regarding MoarVM's problem
aadb1efa 2019-01-13 01:07:42 changes for the Clang compiler
b7216e89 2019-01-13 00:51:02 workaround for the MoarVM problem with MP_GEN_RAND et al.
7ac11218 2018-12-26 15:19:07 clarify comment of ltm_rng()
18355de6 2018-12-29 17:56:20 Update file headers [skip ci]
f4449362 2018-05-26 01:39:03 fixes for MP_8BIT and mx32, prefinal design
08cee432 2018-05-21 22:54:55 Moved mp_mul_si() into bn_mp_prime_strong_lucas_selfridge.c as a local function
a218ddce 2018-05-03 23:45:02 Added Fips 186.4 compliance, an additional strong Lucas-Selfridge (for BPSW) and a Frobenius (Paul UNderwood) test, both optional. With documentation.
adbadc70 2018-11-18 01:30:51 Fix includes Header files which are located in the same directory that the file from where it is included must be included using `" "`, not `< >`. Otherwise the compiler (gcc 5) cannot understand `#include <tommath_class.h>` in `/usr/include/tommath/tommath.h`.
2ab527b7 2018-09-10 18:51:26 add mp_get_double, mp_set_double
8b9f98ba 2018-09-23 21:37:58 auto-format by executing `make astyle`
eebbcf06 2018-09-10 18:48:58 add mp_complement, mp_tc_div_2d, mp_tc_and, mp_tc_or, mp_tc_xor
92e8719b 2018-05-28 22:02:13 improved detection of MP_64BIT
22550d41 2018-05-02 22:01:09 Do not use tommath.h from the system for building
9034e712 2018-05-02 21:43:17 Do not use installed headers for building
ef6d85a1 2018-04-14 14:33:36 don't use rand() in mp_rand() This fixes #103
0bc75513 2018-02-26 09:32:12 add e2k/lcc support
f51249b6 2018-02-02 12:07:21 clean-up file headers
43c26b3a 2015-12-09 19:16:30 use same parameter name between prototype declaration and definition
bdbed000 2017-10-15 19:57:12 literal suffix
d1fc4a71 2017-10-03 15:18:33 LLP64 indicates a windows environment as of [1] the only architecture using a LLP64 data model is windows [1]: https://en.wikipedia.org/wiki/64-bit_computing
1346d983 2017-10-03 09:19:50 there's no __int128 on MSVC, fall back to 32bit MPI's
d293ab66 2017-09-30 22:57:00 more constify
f674018a 2017-09-20 16:59:43 constify remaining functions
41de5855 2017-09-19 13:35:15 Add 'const' keyword in various places. Adopted from Tcl
f89cda03 2017-08-30 19:15:27 format with astyle (step 5)
82a2d385 2017-08-30 05:56:38 refactor indentation of preprocessor directives
378be117 2017-08-28 21:40:10 add missing space after comma
71e3024f 2005-05-10 17:20:39 fix mp_iseven
6f212942 2017-08-28 16:27:26 replace SVN tags
27115d4b 2017-05-09 14:00:26 use 64-bit detection code from libtomcrypt
c17c4771 2017-04-09 00:44:01 allow external define of MP_GEN_RANDOM
d5b0f1e9 2016-04-10 13:55:42 loop&shift until enough random data has been read
f551dbc8 2016-02-03 13:07:27 Remove all traces of ulong64 as per comment by Karel M
a0b8ce68 2015-11-13 17:47:30 use unsigned literal
e6cfefc1 2015-11-19 21:53:32 more private stuff
f771e317 2015-11-19 21:34:58 move standard includes
4e3f1344 2015-11-12 01:49:07 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.
bd39da23 2015-11-12 01:33:25 use correct value to compare to in mp_isneg() macro
e25f1701 2015-10-25 16:21:17 explicit condition (part H)
84db6f9d 2015-10-17 18:12:48 add parentheses for explicit operator precedence
4430c6bc 2015-10-11 15:54:43 array declaration with its size
9f781162 2015-10-17 18:27:56 add parentheses for explicit operator association
7ab90a48 2015-06-07 14:19:06 use stdint.h for mp_digit and mp_word typedefs
8432c4ed 2014-12-11 22:44:50 clarify documentation of mp_div_2d() and mp_mul_2d()
1c85a283 2015-04-17 22:46:11 adding bn_mp_sqrtmod_prime.c
079b0f65 2015-10-30 17:55:29 Getting ready for v0.43.0 release Also updated my email address... Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
676e7ea4 2015-10-30 10:33:46 Adding LTM_NO_FILE flag Certain embedded implementatino does not have FILE defined, adding LTM_NO_FILE flag to avoid compiler errors Signed-off-by: Donald Chan <hoiho.chan@gmail.com> Reviewed-by: Tom St Denis <tstdenis82@gmail.com>
5d1096b0 2014-12-12 01:42:30 use arc4random() instead of rand() on *BSD
9d697d46 2014-12-10 19:01:12 fix compilation with MP_8BIT or MP_16BIT
0e3d3ad2 2014-12-10 18:59:31 add mp_get_long_long() and mp_set_long_long()
f88e6a04 2014-12-10 18:32:44 replace mp_set_long() implementation by macro
6df187ae 2011-11-13 19:17:46 Add set_long and get_long functions They work on platform-dependent long ints
b425b0ea 2014-10-18 18:54:06 Revert "balancing multiplication like that in Ruby 1.9" This reverts commit e68439aae10d003250afa6c1f57025bfee5f82ed. Conflicts: bn_mp_balance_mul.c makefile
52cfd5ff 2014-02-14 11:26:07 mp_n_root: add mp_n_root_ex() with parameter 'fast' for mp_expt_d_ex() This change is introduced to be able to choose the underlying implementation of mp_expt_d_ex() The implementation of the root_n functionality is now implemented in the mp_n_root_ex() function. The parameter 'fast' is just passed over to mp_expt_d_ex(). mp_n_root() defaults to the pre 921be35779f7d71080ad85c27ed58671602d59b3 implementation
e9b1837c 2014-02-13 20:21:18 mp_expt_d: bring back pre 921be35779f7d71080ad85c27ed58671602d59b3 state The implementation of the expt_d functionality is now implemented in the mp_expt_d_ex() function. The user can now choose between the old (more timing resistant) version and the new version by modification of the parameter 'fast'. mp_expt_d() defaults to the old version
759a926c 2014-09-28 13:12:10 minor changes & clean-up & small fixes gitignore: add libtool output booker.pl: fix source code parsing and trim trailing spaces demo/demo: fix compiler warning, add informational output demo/timing & etc/tune: fix TIMFUNC() makefile: minor changes makefile.shared: increase version, add missing mp_balance_mul tommath: make sure that DIGIT_BIT is correct