Commit Graph

56 Commits

Author SHA1 Message Date
Kevin B Kenny
71e3024f30 fix mp_iseven 2017-08-29 23:48:32 +02:00
Steffen Jaeckel
6f21294212 replace SVN tags 2017-08-28 17:00:58 +02:00
Steffen Jaeckel
27115d4b4c use 64-bit detection code from libtomcrypt 2017-05-09 14:00:26 +02:00
Steffen Jaeckel
c17c47715a allow external define of MP_GEN_RANDOM 2017-04-09 01:04:07 +02:00
Steffen Jaeckel
d5b0f1e993 loop&shift until enough random data has been read 2016-10-10 00:48:01 +02:00
Tom St Denis
f551dbc8ac Remove all traces of ulong64 as per comment by Karel M 2016-02-03 13:07:27 -05:00
Francois Perrad
a0b8ce68f7 use unsigned literal 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
Steffen Jaeckel
bd39da2397 use correct value to compare to in mp_isneg() macro 2015-11-12 01:33:25 +01:00
Francois Perrad
e25f1701e4 explicit condition (part H) 2015-11-12 01:20:40 +01:00
Francois Perrad
9f7811624a add parentheses for explicit operator association 2015-11-12 01:20:40 +01:00
Francois Perrad
84db6f9dbc add parentheses for explicit operator precedence 2015-11-12 01:20:40 +01:00
Francois Perrad
4430c6bc5f array declaration with its size 2015-11-12 01:20:40 +01:00
Steffen Jaeckel
7ab90a48ee use stdint.h for mp_digit and mp_word typedefs 2015-11-01 12:40:31 +01:00
Steffen Jaeckel
8432c4eda5 clarify documentation of mp_div_2d() and mp_mul_2d() 2015-10-30 18:11:32 -04:00
Karel Miko
1c85a28372 adding bn_mp_sqrtmod_prime.c 2015-10-30 18:04:33 -04:00
Tom St Denis
079b0f65a9 Getting ready for v0.43.0 release
Also updated my email address...

Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 17:55:29 -04:00
Donald Chan
676e7ea488 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>
2015-10-30 17:41:22 -04: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
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
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
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
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
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
ddd788a185 trim trailing spaces 2014-02-14 11:30:40 +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
lomereiter
e68439aae1 balancing multiplication like that in Ruby 1.9 2013-11-24 15:34:41 +01:00
Christopher Brown
3e1ae07821 added mp_import / mp_export 2013-11-24 03:59:06 +01:00
Guilherme Lima Bernal
95356f7239 Fix typo on comment 2013-09-02 09:52:11 -06:00
Moritz Lenz
fef72c3423 fix mp_error_to_string in tommath.h 2012-01-09 06:50:09 +01:00
Steffen Jaeckel
6d20c3c6a9 removed flag LTM_PRIME_2MSB_OFF since it's no more available 2011-03-23 23:24:37 +01:00
Tom St Denis
f0b91a572e added libtommath-0.39 2010-07-15 17:26:01 +02:00
Tom St Denis
9294e79150 added libtommath-0.36 2010-07-15 17:25:56 +02:00
Tom St Denis
3d0fcaab0a added libtommath-0.34 2010-07-15 17:25:51 +02:00
Tom St Denis
4b7111d96e added libtommath-0.33 2010-07-15 17:25:49 +02:00
Tom St Denis
e549ccfec5 added libtommath-0.32 2010-07-15 17:25:47 +02:00
Tom St Denis
350578d400 added libtommath-0.30 2010-07-15 17:25:43 +02:00
Tom St Denis
6c48a9b3a6 added libtommath-0.29 2010-07-15 17:25:41 +02:00
Tom St Denis
455bb4db20 added libtommath-0.28 2010-07-15 17:25:39 +02:00
Tom St Denis
c1da6aa2de added libtommath-0.25 2010-07-15 17:25:33 +02:00
Tom St Denis
eed6765fe9 added libtommath-0.23 2010-07-15 17:25:30 +02:00
Tom St Denis
4c1d3f0838 added libtommath-0.22 2010-07-15 17:25:29 +02:00
Tom St Denis
0ef44cea9b added libtommath-0.18 2010-07-15 17:25:22 +02:00