Commit Graph

337 Commits

Author SHA1 Message Date
Francois Perrad
b9abe0a316 refactor with macros MP_NO/MP_YES 2015-11-12 01:20:41 +01:00
Francois Perrad
0522eef288 refactor cast in ternary op 2015-11-12 01:20:40 +01:00
Francois Perrad
64177349fc avoid side effects on right hand of logical operator 2015-11-12 01:20:40 +01:00
Francois Perrad
38f90d1b17 explicit condition (part C) 2015-11-12 01:20:40 +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
b6636ee46a uppercase L avoid confusion between lowercase l and digit 1 2015-11-12 01:20:40 +01:00
Francois Perrad
09b8fd9c98 explicit block 2015-11-12 01:20:40 +01:00
Francois Perrad
4430c6bc5f array declaration with its size 2015-11-12 01:20:40 +01:00
Francois Perrad
759ed1f050 union initialization is not supported by ISO C 2015-11-12 01:20:40 +01:00
Francois Perrad
2404bd3c13 suspicious use of ; 2015-11-12 01:20:40 +01:00
Francois Perrad
2d40b4deb1 fix indentation (part 2) 2015-11-12 01:20:40 +01:00
Francois Perrad
614da3deec fix indentation (part 1) 2015-11-12 01:20:40 +01:00
Steffen Jaeckel
6d43d42f17 update make zipup, add make pre_gen 2015-11-07 16:23:27 +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
25480d57b7 demo: test one big montgomery reduction
...only for coverage reasons...
2015-11-01 12:28:58 +01:00
Steffen Jaeckel
0d816a1a2e makefile: include timing in coverage creation 2015-11-01 12:28:54 +01:00
Steffen Jaeckel
f82599933b timing: add compile-time option to disable logging 2015-11-01 12:28:49 +01:00
Steffen Jaeckel
b6d76643db timing: some changes
- also use toom-cook for mul and sqr
- don't test too huge numbers with invmod (takes too long)
- remove the goto and labels
2015-11-01 12:28:44 +01:00
Steffen Jaeckel
c4501e1eb5 work a bit on code coverage 2015-11-01 12:28:34 +01:00
Steffen Jaeckel
d32e7a3dd0 makefile: improve a bit more
- add make targets for coverage creation
- don't enable optimization when requesting a debug build
2015-11-01 12:28:29 +01:00
Steffen Jaeckel
91df2129ec add minimal mp_sqrtmod_prime() tests to demo.c 2015-11-01 12:27:08 +01:00
Steffen Jaeckel
d0f73e7c59 update tommath.src 2015-11-01 12:26:00 +01:00
Steffen Jaeckel
9a64eec831 add mp_sqrtmod_prime() 2015-11-01 12:25:17 +01:00
Tom St Denis
4a63ec534e Merge branch 'feature/doc' into develop
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 18:12:13 -04:00
Steffen Jaeckel
3d5afb420d update changes 2015-10-30 18:11:32 -04:00
Steffen Jaeckel
8432c4eda5 clarify documentation of mp_div_2d() and mp_mul_2d() 2015-10-30 18:11:32 -04:00
Steffen Jaeckel
183350603c update changes 2015-10-30 18:11:32 -04:00
Steffen Jaeckel
14e843e02e update documentation
add mp_set_long, mp_get_long, mp_set_long_long, mp_get_long_long
2015-10-30 18:11:32 -04:00
Steffen Jaeckel
fc95249186 update changes.txt 2015-10-30 18:11:32 -04:00
Steffen Jaeckel
42a3c25175 trim trailing spaces 2015-10-30 18:11:32 -04:00
Steffen Jaeckel
eca442b01d add documentation of mp_expt_d_ex() 2015-10-30 18:11:32 -04:00
Tom St Denis
575d9bac4b Add error check to mp_sqrtmod_prime()
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 18:08:42 -04:00
Tom St Denis
5b3178d83e Merge branch 'feature/mp_sqrtmod_prime' into develop
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 18:06:44 -04:00
Karel Miko
c31102bc0e fix warning: expected "mp_digit *" but argument is of type "long unsigned int *" 2015-10-30 18:04:33 -04:00
Steffen Jaeckel
1f8894790b update makefiles etc. 2015-10-30 18:04:33 -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
Tom St Denis
7916c4035b Fix parenthesis in bn_mp_div.c to correctly return error code if init fails.
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 17:49:09 -04:00
Tom St Denis
e50d8afe32 Add ability to disable silent builds.
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-30 17:45:34 -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
Tom St Denis
b6a484ff4a Make the build output cleaner so diagnostics are easier to spot
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-10-28 08:59:29 -04:00
Steffen Jaeckel
036d697caa makefile: add 'coverage' make target 2015-04-25 14:13:16 +02:00
Steffen Jaeckel
39e348b2e2 makefile: add LFLAGS variable when static linking 2015-04-25 14:12:32 +02:00
Steffen Jaeckel
cb085f06cf demo: read from urandom if someone requests real random data 2015-04-18 15:06:28 +02:00
Steffen Jaeckel
ac4550ccbd testme.sh: improve a bit
- add parameter when calling that will be forwarded to make
  (e.g. to give the correct -j# option for your CPU)
- timeout after running the tests for 2 minutes, assuming something went
  wrong, but don't cancel the rest of the tests
- add compilation with clang (if available on the system)
2015-04-18 15:06:28 +02:00
Steffen Jaeckel
5eb6ebbb23 makefiles: improve a bit 2015-04-18 15:06:28 +02:00
Steffen Jaeckel
80e0862e83 makefile: clean gcov output 2014-12-14 19:44:20 +01:00
Steffen Jaeckel
ffb172f403 makefiles: add makefile.include
to be used in makefile and makefile.shared

use -Wextra instead of deprecated -W
add additional warnings also used in libtomcrypt
  can be disabled by defining NO_ADDTL_WARNINGS
add possibility to define COMPILE_SIZE or COMPILE_DEBUG
2014-12-14 19:43:50 +01:00