Commit Graph

184 Commits

Author SHA1 Message Date
Daniel Mendler
5c335f8407
rename mul/sqr functions for consistency, comba instead of fast suffix 2019-11-04 15:41:33 +01:00
Daniel Mendler
b9977adfb8
use uint8_t instead of unsigned char 2019-10-29 17:40:59 +01:00
Steffen Jaeckel
af376edcde no more MP_WUR in timing.c 2019-10-29 16:37:56 +01:00
Steffen Jaeckel
4500d066c1 also no MP_WUR in mtest_opponent() 2019-10-29 14:41:33 +01:00
Steffen Jaeckel
b250ec44e0 clean-up test.c
* no more `MP_WUR` in test.c
* clean-up console output
2019-10-29 13:24:34 +01:00
Steffen Jaeckel
04ee1e75d7 improve demo/timing a bit
* less verbose output on console
* allow changing name for logs
* pre-heat caches before starting the timing
2019-10-28 15:31:36 +01:00
Daniel Mendler
bf9507a9d4
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
2019-10-27 18:36:56 +01:00
Daniel Mendler
27e142bc43
remove unnecessary == MP_YES/MP_NO comparisons 2019-10-27 18:36:55 +01:00
Daniel Mendler
14642642f9
add prefix to cutoff variables 2019-10-23 18:21:57 +02:00
Steffen Jaeckel
3180c66ca6 also use MP_YES/NO in tests 2019-10-23 18:17:20 +02:00
czurnieden
9edd185f66 Addition of fast division (recursive divrem only) 2019-10-22 21:02:18 +02:00
Daniel Mendler
a29aa59baa
use size_t for mp_radix_size 2019-10-22 14:25:58 +02:00
Francois Perrad
485be9de79 explicit condition 2019-10-20 17:31:04 +02:00
Francois Perrad
3995ece51b const parameter 2019-10-20 17:30:55 +02:00
Francois Perrad
315975db7a remove useless initialization 2019-10-20 17:30:50 +02:00
Francois Perrad
7f05df0a80 const parameter 2019-10-20 17:30:47 +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
czurnieden
36fca2f9a0
remove support for 8-bit (MP_8BIT) 2019-10-19 16:03:26 +02:00
czurnieden
d4f6b43fa8
use of mp_ilogb in mp_radix_size 2019-10-19 15:35:04 +02:00
Daniel Mendler
45a3bf7694
remove deprecated functions 2019-10-17 16:56:27 +02:00
Daniel Mendler
cb1b2dc879
mp_log_u32: return uint32_t 2019-10-15 14:47:43 +02:00
Steffen Jaeckel
c9d41fba73
rename mp_ilogb() to mp_log_u32() 2019-10-15 14:47:43 +02:00
Steffen Jaeckel
1cc02f2d88
fix build of timing.c 2019-10-15 14:47:43 +02:00
Daniel Mendler
b4f7d8d4c8
test: use malloc/free
tests are library consumers, MP_MALLOC is an internal macro
2019-10-09 20:46:44 +02:00
Daniel Mendler
6e3dae5625
add MP_BUF error 2019-10-08 22:30:29 +02:00
czurnieden
b6813a4122
replace mp_export/import by mp_pack/unpack 2019-10-08 22:30:25 +02:00
czurnieden
71d1b7b9d8 make mp_to_radix return the count of characters of the converted number 2019-10-06 21:26:49 +02:00
czurnieden
d68e28771d bugfix for an edgecase 2019-10-06 21:12:04 +02:00
czurnieden
abdb033402 Refactored functions to read and write binaries and added "maxlen" 2019-10-06 03:38:16 +02:00
Steffen Jaeckel
4ebdaca223 "fix" warnings 2019-10-05 19:47:24 +02:00
Steffen Jaeckel
baff51e9f2 allow to run specific timing tests 2019-10-05 19:47:24 +02:00
Steffen Jaeckel
47ab9c60d8 fix printf 2019-10-05 19:47:24 +02:00
Steffen Jaeckel
f8d64c645a create mtest_opponent instead of alt version of test 2019-09-30 23:44:49 +02:00
Steffen Jaeckel
234d474fe6 only run tests if the module is available 2019-09-07 17:28:16 +02:00
Steffen Jaeckel
75c52a893b be nice and tell when it's hex output
did you know that 0x35 is equal to 53? ... ;-)
2019-09-07 17:28:16 +02:00
Steffen Jaeckel
54661db6a4 allow RSA superclass to be built with tests 2019-09-07 17:28:16 +02:00
Steffen Jaeckel
9eecab7b49 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.
2019-09-07 17:28:16 +02:00
Steffen Jaeckel
72f9251939 fix last occurrences of mp_toradix() 2019-09-03 11:08:56 +02:00
czurnieden
8bb11ded99 included tests for mp_prime_next_prime 2019-09-02 21:25:22 +02:00
Steffen Jaeckel
6cd570d08b use mp_to_radix etc. 2019-09-02 18:25:44 +02:00
Daniel Mendler
8c1b296e86
add feature detection macro MP_HAS 2019-07-24 11:09:42 +02:00
Daniel Mendler
ca89e9c0ef
rename mp_root/mp_expt to mp_*_u32 2019-07-17 15:45:04 +02:00
Daniel Mendler
71696549a8
deprecate mp_expt_d and mp_n_root in favor of mp_expt and mp_root 2019-07-17 15:45:04 +02:00
nijtmans
0db64fc83c Rename bn_get_magxx -> bn_get_mag_uxx. Documentation updated too 2019-07-03 14:45:14 +02:00
nijtmans
ea3353b673 Simplify test-cases, by using mp_set_l. Also fix use of types in 2 other files 2019-06-13 15:44:00 +02:00
Daniel Mendler
5302b907ff
use MP_SIZEOF_BITS 2019-06-07 08:28:32 +02:00
nijtmans
dfbb5ecd56 MSVC compile: higher warning-level -Wall, but warning-free 2019-06-06 16:22:54 +02:00
Daniel Mendler
c7314fa400
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.
2019-05-27 15:59:40 +02:00
Steffen Jaeckel
0e1a0e6529 also test mp_shrink() 2019-05-27 15:34:53 +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