| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
r=nelsonb
See if Solaris likes this better...
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
mpi_read_radix(), except that if the input stream begins with a leading
zero or "0x", it will interpret the input as octal or hex, respectively.
|
|
|
|
|
| |
Revise and simplify the scheme of feature test macros used in mpi.h.
Remove all NSS_ and SOLARIS ifdefs from the source.
|
| |
|
|
|
|
| |
xgcd for even moduli.
|
|
|
|
| |
with the VIS instructions.
|
| |
|
| |
|
|
|
|
|
|
| |
are 64-bits. Renamed s_mp_invmod_32b to s_mp_invmod_radix since radix
can now exceed 32 bits. Improved performance on all platforms except
MIPS and X86.
|
|
|
|
| |
line (or prior to including mpi.h).
|
|
|
|
|
|
|
|
|
|
| |
mp_words are used only on machines that support long long arithmetic.
s_mp_mod_d() was deleted. It was not being used and was not part of the
public API. The code that computes squares in s_mp_sqr was broken out
into a separate new function s_mpv_sqr_add_prop(), which is a target for
assembly language optimization. New function s_mpv_div_2dx1d(), also a
target for assembly optimization. These changes made X86 benchmark time
go from 22.5 seconds to 8.3 seconds on my reference test system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- In mpi-priv.h, declare new 3 argument versions of s_mp_add and s_mp_sub.
Also declare new set of s_mpv_ functions that operate on vectors (arrays)
of mp_digits instead of on mp_ints. These functions are candidates for
implementation in assembler.
- In mpi.c reimplement mp_add and mp_sub using the new 3arg functions.
Implement 3 argument versions of s_mp_add and s_mp_sub.
This eliminates all need for temporary variables in mp_add and mp_sub.
Implement c language reference implementations of new s_mpv vector multiply
and multiply and add functions. Change mp_mul and mp_sqr so they no longer
pre-zero the output variable. It's no longer nececssary with the new s_mpv
functions. s_mp_pad no longer zeros out the new padded space.
-In mpmontg.c, implement variable width exponetiation windows. Implement
a new function to compute the multiply and Montgomery reduction in a
single pass. This is "Improvement 2" from Dusse' and Kaliski's paper
"A Cryptographic Library for the Motorola DSP56000". Performance impact
is negligible in this c implementation. However, this function is another
target for assembly language optimization.
|
|
|
|
| |
shifts when doing subtraction.
|
| |
|
|
|
|
|
| |
32-bits. This reduced warnings. Use mp_size instead of unsigned int
in function declarations. Fix MP_DIGIT_FMT for 32-bit digits.
|
| |
|
|
|
|
| |
-DMP_API_COMPATIBLE . mpi.c is compiled that way.
|
|
|
|
|
|
| |
multiply two 32-bit values yielding a 64-bit product in hardware.
Fix bug in s_mp_div that computed a quotient digit q > DIGIT_MAX
when b > DIGIT_MAX/2 and b < a <= DIGIT_MAX.
|
|
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>
|