Commit Graph

286 Commits

Author SHA1 Message Date
Steffen Jaeckel
0fd5e6c17f add testme.sh 2014-12-11 14:59:35 +01:00
Steffen Jaeckel
784077d380 Merge remote-tracking branch 'carbin/arc' into develop
This closes #28
2014-12-11 14:12:14 +01:00
Carlin
5d1096b0bd use arc4random() instead of rand() on *BSD 2014-12-12 01:42:30 +13:00
Steffen Jaeckel
9d697d4686 fix compilation with MP_8BIT or MP_16BIT 2014-12-10 19:01:12 +01:00
Steffen Jaeckel
d4cccd52d1 udpate makefiles etc. 2014-12-10 18:59:56 +01:00
Steffen Jaeckel
9d83fce77e add tests 2014-12-10 18:59:42 +01:00
Steffen Jaeckel
0e3d3ad29d add mp_get_long_long() and mp_set_long_long() 2014-12-10 18:59:31 +01:00
Steffen Jaeckel
f88e6a042a replace mp_set_long() implementation by macro 2014-12-10 18:32:44 +01:00
Steffen Jaeckel
5d3ee880aa less noise plz 2014-12-10 18:27:03 +01:00
Steffen Jaeckel
e5e9382bc2 Merge branch 'moritz/get-set-long' into develop
This closes #26
2014-12-10 17:22:53 +01:00
Steffen Jaeckel
cf04521695 update makefiles etc. 2014-12-10 17:21:14 +01:00
Steffen Jaeckel
158e326612 add tests for mp_set_long() and mp_get_long() 2014-12-10 17:20:15 +01:00
Steffen Jaeckel
5a2a00ffba fix compiler warning when compiling with "-mx32" option 2014-12-10 16:53:06 +01:00
Steffen Jaeckel
940bef18cd fix macros 2014-12-10 16:53:06 +01:00
Steffen Jaeckel
ae307cd887 fix compiler warning 2014-12-10 16:53:06 +01:00
Moritz Lenz
6df187aea4 Add set_long and get_long functions
They work on platform-dependent long ints
2014-12-10 16:53:06 +01:00
Steffen Jaeckel
a263647f23 add new make target 'test_standalone' 2014-10-18 20:20:30 +02:00
Steffen Jaeckel
d2458e35e1 update README 2014-10-18 20:20:07 +02:00
Andrea Faulds
ef15300cdf initial revision 2014-10-18 20:16:49 +02:00
Steffen Jaeckel
d71719853a update after removing balance multiplication 2014-10-18 18:56:56 +02:00
Steffen Jaeckel
b425b0ea1f Revert "balancing multiplication like that in Ruby 1.9"
This reverts commit e68439aae1.

Conflicts:
	bn_mp_balance_mul.c
	makefile
2014-10-18 18:54:06 +02:00
Steffen Jaeckel
9ca37ca01c mtest vs. test: add possibility to exit testing
'mtest' can now optionally only run a given amount of loops.
the first parameter <n> when invoking 'mtest' is considered to determine
the amount
when <n> is in the range -63..-1: mtest will run 2^-n runs
when <n> is > 0: mtest will run n runs
else: mtest will exit immediately
2014-10-18 18:52:46 +02:00
Steffen Jaeckel
545980169c add target "new_file" to makefile 2014-10-14 14:38:41 +02:00
Steffen Jaeckel
634f96f7c3 mtest: I like predictable random for testing 2014-10-14 14:38:41 +02:00
Steffen Jaeckel
5c5d600a82 demo: calm compiler warnings & improve a bit 2014-10-14 14:38:41 +02:00
Steffen Jaeckel
e581d078f6 mtest: fix compiler warnings 2014-10-14 14:38:41 +02:00
Steffen Jaeckel
410ae3951e trim trailing spaces 2014-10-14 14:38:41 +02:00
Steffen Jaeckel
30fcfec893 update makefiles 2014-10-13 15:50:16 +02:00
Steffen Jaeckel
9bff6bbb57 prepare makefiles for "updatemakes" 2014-10-13 15:49:23 +02:00
Steffen Jaeckel
4f2db5fa8f add "updatemakes" from libtomcrypt 2014-10-13 15:49:02 +02:00
Steffen Jaeckel
da2fc240ef deterministic build of poster.pdf 2014-09-28 14:46:09 +02:00
Steffen Jaeckel
41017efddd deterministic build of bn.pdf 2014-09-28 14:46:00 +02:00
Steffen Jaeckel
61d8c8aa42 Merge branch 'feature/timing_resist' into develop 2014-09-28 13:59:17 +02:00
Steffen Jaeckel
52bb535ff7 demo: test both mp_n_root() implementations 2014-09-28 13:33:59 +02:00
Steffen Jaeckel
52cfd5ff0a 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 921be35779
implementation
2014-09-28 13:33:59 +02:00
Steffen Jaeckel
e9b1837c8c mp_expt_d: bring back pre 921be35779 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
2014-09-28 13:33:59 +02:00
Steffen Jaeckel
8ed6043209 dep.pl: add new type mp_min_u32 2014-09-28 13:33:35 +02:00
Steffen Jaeckel
7ede0852da Merge branch 'fix/x32' into develop 2014-09-28 13:15:28 +02:00
Steffen Jaeckel
759a926cfe 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
2014-09-28 13:12:10 +02:00
Steffen Jaeckel
78b8a772e4 fix compiler warnings with MP_16BIT 2014-09-23 22:55:08 +02:00
Steffen Jaeckel
b0c385afb6 fix x32 compilation
change mp_digit/mp_word to unsigned long long
introduce new internal type mp_min_u32 that is minimum 32 bit wide

x32 target is 64 bit arch but has 32 bit wide 'unsigned long'
2014-09-23 22:54:30 +02:00
Steffen Jaeckel
0213986c7b trim trailing spaces/clean up 2014-09-02 02:14:38 +02:00
Steffen Jaeckel
6fc385081e demo: clean-up on exit 2014-02-14 12:59:04 +01:00
Steffen Jaeckel
f47c0f208d demo: allow mp_reduce_2k_l tests to be switched off 2014-02-14 12:58:49 +01:00
Steffen Jaeckel
ca150960c1 demo: fix compiler warnings, return values & output format 2014-02-14 12:57:52 +01:00
Steffen Jaeckel
e098750798 demo: "improve" a bit
allow reproducible testcases

add easy switch to compile either a version for "test vs. mtest" or to
run internal tests
2014-02-14 11:48:34 +01:00
Steffen Jaeckel
d576512c34 mp_balance_mul: fix compiler warnings 2014-02-14 11:33:38 +01:00
Steffen Jaeckel
ddd788a185 trim trailing spaces 2014-02-14 11:30:40 +01:00
Steffen Jaeckel
a4b20be8a2 Merge branch 'ktdreyer/mp_isprime' into develop 2014-01-25 16:31:20 +01:00
Alexander Boström
ba15caa3be Add mp_isneg()
This function originally came from Heimdal's bundled copy of libtommath.

Signed-off-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2014-01-25 16:31:14 +01:00