Commit Graph

187 Commits

Author SHA1 Message Date
Sebastian Andrzej Siewior
f734a43b05 implement fp_toradix_n()
It is not implemened yet, just added to the headerfile. Therefore I don't
think it is a ABI breakage if I change maxlen from int to unsigned int.

The function releases fp_toradix() for the work which in turn now calls
fp_toradix_n() with a largest possible maxlen parameter.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2015-02-15 19:29:12 +01:00
Steffen Jaeckel
8aba8446f2 Merge branch 'fix/issue#6'
This closes #6
This closes #7
2015-02-15 15:35:13 +01:00
Steffen Jaeckel
cfa59b2627 travis.yml: fix build target 2015-02-15 15:17:36 +01:00
Steffen Jaeckel
e4f59d4d61 create new make target test_standalone 2015-02-15 15:13:20 +01:00
Steffen Jaeckel
d02974e02f demo/test: fix warnings 2015-02-15 14:57:21 +01:00
Steffen Jaeckel
cdc82aefe1 add testme.sh 2015-02-15 14:53:09 +01:00
Steffen Jaeckel
77be93c201 fix compile errors 2015-02-15 14:50:20 +01:00
Steffen Jaeckel
b1b9a82d97 demo: split up test to 'test' and a new 'timing' build target 2015-02-15 14:26:06 +01:00
Steffen Jaeckel
6231d132de makefile.shared: fix linker step 2015-02-15 14:26:03 +01:00
Johnny Willemsen
5f37f875b2 Attempt to also build shared using travic-ci 2015-02-05 12:11:49 +01:00
Johnny Willemsen
b5e0346622 Added GCC 4.9 configuratin 2015-02-05 12:09:04 +01:00
Steffen Jaeckel
dedda52a1f Add README.md 2014-10-13 19:36:19 +02:00
Steffen Jaeckel
b5352a5f6b add .travis.yml 2014-10-13 19:25:31 +02:00
Steffen Jaeckel
cb3ed6951e update documentation regarding fp_isprime() 2014-10-13 17:14:10 +02:00
Steffen Jaeckel
3142b0bdfc fp_prime_random_ex: make sure call-back function is not NULL 2014-10-13 16:51:13 +02:00
Steffen Jaeckel
fede300ee8 fp_prime_random_ex: use parameter 't' 2014-10-13 16:46:10 +02:00
Steffen Jaeckel
ce72d69438 add macro FP_PRIME_SIZE 2014-10-13 16:45:34 +02:00
Steffen Jaeckel
4673d82793 improve makefiles
shared makefile now uses libtool
update gitignore according
remove 'timing' target in shared makefile
add dependency of HEADERS to OBJECTS for both makefiles
2014-10-13 16:44:58 +02:00
Giovanni Bajo
08484a1020 Avoid always generating 0x80 as MSB in primes.
When we ask to generate a prime whose size is a multiple of 8,
the code wrongly computes the mask as 0x00 instead of 0xFF, so the
generated prime always has the MSB set to 0x80 (the highest bit is OR'ed
later in the code).
2014-10-13 13:40:57 +02:00
Steffen Jaeckel
86ba42797a update makefiles 2014-10-13 13:40:41 +02:00
Steffen Jaeckel
7a38e49b8e add fp_isprime_ex()
fp_isprime() is now only a wrapper function to fp_isprime_ex()
2014-10-13 13:40:36 +02:00
Steffen Jaeckel
f7b194f741 minor changes, trim trailing spaces 2014-10-13 13:39:30 +02:00
Steffen Jaeckel
3a80f80039 deterministic build of tfm.pdf 2014-10-13 12:32:25 +02:00
Steffen Jaeckel
4e0e2c0f90 update changes 2014-10-13 12:24:45 +02:00
Steffen Jaeckel
b0509acce9 Merge branch 'feature/rand' 2014-08-28 02:58:22 +02:00
Steffen Jaeckel
97248ae23e update makefiles 2014-08-14 21:19:14 +02:00
Steffen Jaeckel
ec7f25200f add fp_rand()
it's a port of the function in libtommath
2014-08-14 21:19:14 +02:00
Steffen Jaeckel
56438df4cf test/mtest/stest: improve a bit
fix compiler warnings
make internal buffer size dependant on its possible size
fix return values
2014-08-14 21:18:23 +02:00
Steffen Jaeckel
0b1ad14d7b makefile: rework a bit 2014-08-14 21:17:11 +02:00
Steffen Jaeckel
03334b30b4 mont: make INNERMUL register clobber list equal to the 64bit version 2014-08-14 21:17:11 +02:00
Steffen Jaeckel
14bb3e83ca gen.pl: update to current directory structure 2014-08-14 21:17:11 +02:00
Steffen Jaeckel
ec6c224b09 fix sqr_comba compiler warnings 2014-08-11 17:54:09 +02:00
Steffen Jaeckel
72fe8e48ba montgomery reduce: change #ifdef
as INNERMUL8 is only defined where it is available, simply check if it's
defined and don't check again for the arch
2014-07-20 16:08:35 +02:00
Steffen Jaeckel
06ef0be491 tfm.h: add missing prototype of fp_radix_size() 2014-06-21 13:24:22 +02:00
Steffen Jaeckel
7882b0370d ed1a1e90e9 was not only a x86-64 problem 2014-06-21 13:24:03 +02:00
Steffen Jaeckel
60cf64919f fp_read_radix: port modifications from libtommath 2014-06-15 18:35:31 +02:00
Steffen Jaeckel
74df3d9970 demo/stest: print ident string 2014-06-15 18:34:15 +02:00
Steffen Jaeckel
1e129bf61e demo/test: enable montogomery and prime tests per default 2014-06-14 18:17:47 +02:00
Steffen Jaeckel
06e1cd7216 fix compiler warning 2014-06-14 17:39:18 +02:00
Steffen Jaeckel
c6b1b8e2f1 fix ulong64 typedef that led to broken builds for several platforms
x86_64-w64-mingw32 and 32Bit mode on 64Bit system

x86_64-w64-mingw32-gcc
'gcc -m32'
'gcc -mx32'
2014-06-14 17:39:10 +02:00
Steffen Jaeckel
9671aa83e1 update makefile to be able to define a target platform prefix 2014-06-14 17:27:51 +02:00
Steffen Jaeckel
cbb1821bb9 don't require mtest when compiling test 2014-06-14 17:21:03 +02:00
Steffen Jaeckel
c81aac2674 demo/test: fix some compiler warnings 2014-06-12 19:38:15 +02:00
Steffen Jaeckel
019beee1c7 update makefiles 2014-06-12 18:20:38 +02:00
Steffen Jaeckel
ed1a1e90e9 fix clobber list for x86-64 assembler 2014-06-12 18:20:32 +02:00
Steffen Jaeckel
be2ca4880d Regenerate sqr comba files 2014-06-12 18:20:11 +02:00
Steffen Jaeckel
bdeafda752 Regenerate mul comba files 2014-06-12 18:19:53 +02:00
Steffen Jaeckel
3cabe12a21 mul generator: update preamble not to compile the code if it's not required 2014-06-12 18:08:34 +02:00
Steffen Jaeckel
8c8d763389 sqr generator: update preamble not to compile the code if it's not required 2014-06-12 18:08:10 +02:00
Steffen Jaeckel
2d5b8206fa also patch fp_mul() as proposed by tom on the ML [1]
[1] https://groups.google.com/forum/#!topic/libtom/MdbS1vcLhCU
2014-06-12 18:06:26 +02:00