demo


Log

Author Commit Date CI Message
Steffen Jaeckel 7c10db3d 2022-04-28T11:41:40 support Valgrind for tests when using CMake Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Steffen Jaeckel 72ce1e53 2022-03-23T12:21:27 rename cmake project to `libtommath` Instead of prepending multiple times 'lib', change the target-properties `OUTPUT_NAME` once. This also improves cpack package names to be more distro-style. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Steffen Jaeckel 0b98bc71 2022-03-22T15:35:55 split up into two CMakeLists.txt one for the library, one for the demo Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Dilshod Urazov f12c2ab5 2021-03-26T10:47:25 Add FNV-1a hash function This allows to compute non-cryptographic hash of mp_int which can be used as a key in a hash table.
czurnieden ab7bcec5 2021-12-13T21:08:49 Introduced 0 (zero) to mp_is_square as a perfect square
Lvv.me 9b6d7d5c 2021-12-01T22:10:29 Add Swift Test case for libtommath
Steffen Jaeckel 813b1569 2021-01-03T17:44:10 improve error handling * handle buffer full case * display error reason of `s_mp_get_token()` * display name of variables when `draw()`ing on error
czurnieden 24ac0de6 2020-12-26T10:28:08 Replaced "fgets" with a "get_token" function in demo/mtest_opponent.c
Steffen Jaeckel 34e16d3c 2020-09-13T19:06:43 allow testing of shared library * move jenkins' prng out of the library into the demo's. * add CI test for shared library
czurnieden fb305e09 2020-08-05T15:18:59 Additional input checks and a test for b \cong 0 (mod a) in test_mp_sqrtmod_prime to go along with it.
Daniel Green ea654566 2020-02-23T09:46:12 Give correct values for invmod with modulus of 1
Steffen Jaeckel c1cf8073 2020-03-05T13:57:07 introduce MP_HAS_SET_DOUBLE
Steffen Jaeckel c5cb0c6f 2020-03-05T13:48:27 fix compile error on MSVC
Daniel Green 4e90f318 2020-02-09T11:06:53 Build+test bn_mp_set_double.c on more platforms Not all platforms/environments/architectures that support enough of IEEE 754 for the purposes of mp_set_double() actually support enough to legitimately define __STDC_IEC_559__, so only relying on that is too strict. Fixes https://github.com/libtom/libtommath/issues/159
Daniel Mendler 40177e18 2019-12-05T11:47:36 test: print __func__
Daniel Mendler c375b038 2019-12-05T11:09:39 test cleanup; add randomized radix_size test
Daniel Mendler 08d281c4 2019-12-05T00:48:25 introduce MP_MAX_DIGIT_COUNT to prevent overflow
Daniel Mendler 9d0bdc7e 2019-12-04T22:23:24 run the test always
czurnieden 1e65c0bf 2019-10-11T00:06:45 Introduction of a fast but slightly over-estimating radix_size
czurnieden 5f3063fb 2019-11-22T03:14:59 correction of typo in test.c
czurnieden 642032dd 2019-11-22T02:56:48 wrong sign in mp_div_recursive
Jan Nijtmans bb1e56e7 2019-11-12T16:20:07 Fix compilation of demo/test.c using C++
Jan Nijtmans 9f2cd043 2019-11-12T15:30:34 more unnecessary type-casts, correct type-case for malloc
Jan Nijtmans e9d54e98 2019-11-12T14:44:39 remove unnecessary type-casts
Jan Nijtmans a91eb5a0 2019-11-12T14:29:02 fix build (hopefully)
Jan Nijtmans 9cfb6c32 2019-11-06T11:52:42 use type-cast in stead of UINT64_C
Jan Nijtmans 02aa95c2 2019-11-06T11:29:17 Fix wrong use of uLL suffix
Daniel Mendler f6a7bedb 2019-10-29T20:52:29 suffix _u32 -> _n of mp_(expt|log|root) functions, use int for now
Daniel Mendler 4f00e75b 2019-11-06T16:51:51 make mp_div_3 private
Daniel Mendler e8e65119 2019-11-05T19:18:32 add COMPILE_LTO to test link time optimization the library performs best with lto since many small functions can be inlined across objects.
nijtmans bbb17808 2019-10-30T14:19:50 mp_radix off-by-one error and other related code-cleanup
Francois Perrad 40342807 2019-11-01T20:08:41 explicit operator precedence
Francois Perrad 146becbd 2019-10-31T19:26:55 literal suffix
Daniel Mendler 5c335f84 2019-10-30T17:26:27 rename mul/sqr functions for consistency, comba instead of fast suffix
Daniel Mendler b9977adf 2019-10-29T08:44:51 use uint8_t instead of unsigned char
Steffen Jaeckel af376edc 2019-10-29T16:37:56 no more MP_WUR in timing.c
Steffen Jaeckel 4500d066 2019-10-29T14:41:33 also no MP_WUR in mtest_opponent()
Steffen Jaeckel b250ec44 2019-10-29T13:24:34 clean-up test.c * no more `MP_WUR` in test.c * clean-up console output
Steffen Jaeckel 04ee1e75 2019-10-28T15:07:58 improve demo/timing a bit * less verbose output on console * allow changing name for logs * pre-heat caches before starting the timing
Daniel Mendler bf9507a9 2019-10-24T22:02:29 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
Daniel Mendler 27e142bc 2019-10-24T17:52:03 remove unnecessary == MP_YES/MP_NO comparisons
Daniel Mendler 14642642 2019-10-22T18:01:08 add prefix to cutoff variables
Steffen Jaeckel 3180c66c 2019-10-23T18:17:20 also use MP_YES/NO in tests
czurnieden 9edd185f 2019-10-04T17:41:09 Addition of fast division (recursive divrem only)
Daniel Mendler a29aa59b 2019-10-21T19:12:22 use size_t for mp_radix_size
Francois Perrad 485be9de 2019-10-20T17:07:43 explicit condition
Francois Perrad 3995ece5 2019-10-20T17:05:55 const parameter
Francois Perrad 315975db 2019-10-20T16:58:40 remove useless initialization
Francois Perrad 7f05df0a 2019-10-20T17:01:14 const parameter
Steffen Jaeckel 7a68f128 2019-10-19T16:24:39 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
czurnieden 36fca2f9 2019-09-09T02:58:18 remove support for 8-bit (MP_8BIT)
czurnieden d4f6b43f 2019-10-11T00:29:20 use of mp_ilogb in mp_radix_size
Daniel Mendler 45a3bf76 2019-10-16T09:21:19 remove deprecated functions
Daniel Mendler cb1b2dc8 2019-10-15T14:04:32 mp_log_u32: return uint32_t
Steffen Jaeckel c9d41fba 2019-10-15T10:40:40 rename mp_ilogb() to mp_log_u32()
Steffen Jaeckel 1cc02f2d 2019-10-14T15:09:42 fix build of timing.c
Daniel Mendler b4f7d8d4 2019-10-09T20:41:17 test: use malloc/free tests are library consumers, MP_MALLOC is an internal macro
Daniel Mendler 6e3dae56 2019-10-08T21:47:57 add MP_BUF error
czurnieden b6813a41 2019-09-27T03:40:08 replace mp_export/import by mp_pack/unpack
czurnieden 71d1b7b9 2019-09-08T23:29:44 make mp_to_radix return the count of characters of the converted number
czurnieden d68e2877 2019-10-02T05:47:04 bugfix for an edgecase
czurnieden abdb0334 2019-09-25T00:29:19 Refactored functions to read and write binaries and added "maxlen"
Steffen Jaeckel 4ebdaca2 2019-09-05T14:24:42 "fix" warnings
Steffen Jaeckel baff51e9 2019-09-05T14:23:22 allow to run specific timing tests
Steffen Jaeckel 47ab9c60 2019-09-05T14:19:17 fix printf
Steffen Jaeckel f8d64c64 2019-09-10T16:05:27 create `mtest_opponent` instead of alt version of `test`
Steffen Jaeckel 234d474f 2019-09-07T15:01:46 only run tests if the module is available
Steffen Jaeckel 75c52a89 2019-09-05T17:12:05 be nice and tell when it's hex output did you know that 0x35 is equal to 53? ... ;-)
Steffen Jaeckel 54661db6 2019-09-05T17:10:48 allow RSA superclass to be built with tests
Steffen Jaeckel 9eecab7b 2019-09-05T16:41:36 print jenkins seed on startup I just had a case around where the `mp_prime_rand()` testcase failed but I couldn't reproduce. I'm pretty sure that was caused by all my changes and partial rebuilds but anyways it'll give us in the future the possibility to debug such a case.
Steffen Jaeckel 72f92519 2019-09-03T10:59:32 fix last occurrences of `mp_toradix()`
czurnieden 8bb11ded 2019-09-02T21:05:04 included tests for mp_prime_next_prime
Steffen Jaeckel 6cd570d0 2019-09-02T17:52:36 use `mp_to_radix` etc.
Daniel Mendler 8c1b296e 2019-04-08T23:48:39 add feature detection macro MP_HAS
Daniel Mendler ca89e9c0 2019-07-03T13:10:05 rename mp_root/mp_expt to mp_*_u32
Daniel Mendler 71696549 2019-05-29T20:36:18 deprecate mp_expt_d and mp_n_root in favor of mp_expt and mp_root
nijtmans 0db64fc8 2019-07-03T14:45:14 Rename bn_get_magxx -> bn_get_mag_uxx. Documentation updated too
nijtmans ea3353b6 2019-06-13T15:44:00 Simplify test-cases, by using mp_set_l. Also fix use of types in 2 other files
Daniel Mendler 5302b907 2019-06-06T21:06:06 use MP_SIZEOF_BITS
nijtmans dfbb5ecd 2019-06-06T16:22:54 MSVC compile: higher warning-level -Wall, but warning-free
Daniel Mendler c7314fa4 2019-05-25T06:42:01 deprecate mp_n_root_ex and mp_expt_d_ex These functions were introduced to give some timing guarantees. However the guarantees are too weak to be useful. The functions seem to be unused essentially by downstream users.
Steffen Jaeckel 0e1a0e65 2019-05-24T11:27:03 also test mp_shrink()
Daniel Mendler bcec605a 2019-05-22T15:34:49 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)
Daniel Mendler 0a9f5e9b 2019-05-24T10:21:54 use u32 i64 suffix
Daniel Mendler d7e1cb4a 2019-05-24T00:15:11 another proposal: use _ul and _l for the long macros
Daniel Mendler b58c9966 2019-05-23T23:39:47 use int32 and uint32 instead of sint and uint
Daniel Mendler 3289c959 2019-05-20T10:41:06 introduce various mp_set_sint/mp_set_uint functions with precise types
Daniel Mendler 1af0de1f 2019-05-20T19: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)
Daniel Mendler 0b840b78 2019-05-17T20: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.
czurnieden 03ca7bcd 2019-05-20T23:33:35 added tests for Karatsuba and Toom-Cook 3-way
Steffen Jaeckel 51cda5b8 2019-05-19T09:55:14 use correct amount of MR trials in tests
Steffen Jaeckel cb3ff8c2 2019-05-19T09:54:25 improve coverage
Francois Perrad 150c47cc 2019-05-19T16:36:53 refactor literal suffix with u lowercase
Daniel Mendler f55f0a9e 2019-05-18T09:28:33 fix some usages of enum types
Daniel Mendler 56e7a401 2019-05-13T02:46:11 deprecate mp_jacobi
Daniel Mendler 198418ba 2019-05-14T20:39:33 bugfix: don't revert to platform rand source, but to jenkins source!
Daniel Mendler 4534056c 2019-05-13T00: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
Daniel Mendler f85bd31e 2019-05-12T17:06:40 fix undefined behavior in labs
Daniel Mendler 2a2e2716 2019-05-12T11:33:17 move jenkins prng to bn_s_mp_rand_jenkins.c
Daniel Mendler 8d71a9e3 2019-05-11T00:19:28 travis: add -fsanitize=undefined