Commit Graph

314 Commits

Author SHA1 Message Date
Francois Perrad
8714ee55cc remove register
let the compiler find the best register optimization
2015-12-02 22:52:32 +01:00
Steffen Jaeckel
edef6ca191 Merge branch '20151112_lint' into develop
This closes #40
2015-12-02 22:51:48 +01:00
Francois Perrad
a0b8ce68f7 use unsigned literal 2015-12-02 22:47:51 +01:00
Francois Perrad
81d5f0e39a add parentheses for explicit operator association 2015-12-02 22:47:51 +01:00
Francois Perrad
99c84acc4c add parentheses for explicit operator precedence 2015-12-02 22:47:51 +01:00
Francois Perrad
10cfb95508 use same parameter name between prototype declaration and function definition 2015-12-02 22:47:51 +01:00
Francois Perrad
c0b14e3df4 handle the return value of function 2015-12-02 22:47:51 +01:00
Francois Perrad
babf35c64a explicit condition 2015-12-02 22:47:50 +01:00
Steffen Jaeckel
1e7ca501fd fixup demo.c 2015-11-29 23:14:50 +01:00
Steffen Jaeckel
6d4467daba Merge branch 'fix/jacobi' into develop
This closes #31
2015-11-29 23:12:43 +01:00
Steffen Jaeckel
7176a8777a Add tests for mp_jacobi() 2015-11-29 22:43:52 +01:00
Steffen Jaeckel
34e6b723ff Implement handling of special case (0 | 1) 2015-11-25 21:24:21 +01:00
Steffen Jaeckel
ce70362ace Rename parameter p to n 2015-11-25 21:24:13 +01:00
Tom St Denis
6c536e4bd0 Speed up testing and temporarily disable clang testing 2015-11-25 09:41:58 -05:00
Tom St Denis
10ba45b717 Merge branch 'fperrad-private' into develop 2015-11-25 09:35:25 -05: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
Tom St Denis
2e28a7db97 Removed out of date contact info from textbook.
Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-11-13 15:01:19 -05:00
Tom St Denis
53f1b93595 Updated zipup to support git and simplified it somewhat.
I removed gpg use right now since I don't have a gpg key anyways ...

Signed-off-by: Tom St Denis <tstdenis82@gmail.com>
2015-11-13 14:56:05 -05:00
Steffen Jaeckel
b98147c972 update install steps in makefiles
- add tommath_private.h to HEADERS
- only install public header files
- move more shared stuff to makefile.include
- make it possible to override the *PATH makefile variables
2015-11-12 02:02:18 +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
5a15247b6a improve testme.sh
you can now do something like `COMPILERS="gcc-5" ./testme.sh`
2015-11-12 01:34:28 +01:00
Steffen Jaeckel
489bf69f65 Merge branch '20151025_lint' into develop
This closes #38
2015-11-12 01:33:57 +01:00
Steffen Jaeckel
bd39da2397 use correct value to compare to in mp_isneg() macro 2015-11-12 01:33:25 +01:00
Steffen Jaeckel
00ff6da1cc trim trailing spaces 2015-11-12 01:20:41 +01:00
Steffen Jaeckel
1c1baaa755 Don't cast the potential problems away, handle them appropriately 2015-11-12 01:20:41 +01:00
Francois Perrad
5bed36d997 explicit ignoring the return value of function 2015-11-12 01:20:41 +01:00
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