aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
Commit message (Collapse)AuthorAgeFilesLines
* Rename mp_amd64_msvc to mp_msvc64 since it supports both AMD64 andlloyd2010-08-253-2/+2
| | | | | IA-64 (and, hypothetically, any other 64 bit CPU Visual C++ might target in the future).
* Also allow clang with 32-bit assembly code, everything seems to worklloyd2010-08-081-0/+1
| | | | fine with latest SVN.
* Clang understands at least some GCC inline asm syntax as well as whatlloyd2010-08-081-0/+1
| | | | an .S file is, so allow it for x86-64. Tested/works with Clang SVN.
* Make round_up and round_down templates instead of fixed to use u32bitslloyd2010-06-292-6/+6
|
* Doxygenlloyd2010-06-221-5/+17
|
* Doxygenlloyd2010-06-211-3/+7
|
* Doxygenlloyd2010-06-211-13/+92
|
* Use mode(TI) operations to get access to MIPS 64-bit multiply.lloyd2010-06-171-1/+4
| | | | Required after GCC 4.4
* More Doxygenlloyd2010-06-161-2/+9
|
* Doxygen for divide.hlloyd2010-06-161-1/+11
|
* More Doxygen updates. Also, don't expose divide() in numthry.hlloyd2010-06-162-38/+75
| | | | anymore, only in divide.h
* More BigInt Doxygen comment updateslloyd2010-06-161-19/+20
|
* Cleanup some BigInt doxygen commentslloyd2010-06-161-31/+44
|
* Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-2/+2
|
* More Doxygen updates/fixeslloyd2010-06-154-7/+21
|
* Fix a few hundred Doxygen warningslloyd2010-06-151-4/+11
|
* Include generic mp_asmi.h for MSVClloyd2010-06-112-0/+2
| | | | | | | Don't use /EHc; it says "C" functions are nothrow, which is not true for bigint_sub2_rev. Include needed <intrin.h> for mp_asm.h
* Have to add it as explicit dep in bigintlloyd2010-06-111-1/+1
|
* Add (untested) support for VC++'s _umul128 intrinsic, which apparentlylloyd2010-06-112-0/+76
| | | | works on both x86-64 and ia64. Will allow using 64-bit limbs on Windows.
* In BigInt::bits, cache sig_words() result instead of calling twicelloyd2010-06-071-2/+4
|
* Replace PointGFp::check_invaraints, which would either return silentlylloyd2010-03-192-13/+17
| | | | | | | | | | | or throw an exception, with PointGFp::on_the_curve, which returns a bool. Update callers. This showed several cases where check_invaraints was being called multiple times, for instance when decoding a point with OS2ECP, check_invaraints was called; many callers of OS2ECP would then call check_invaraints again on the same object.
* A number of changes to primality tests:lloyd2010-03-195-167/+45
| | | | | | | | | | | | | | Use 64 bit nonces in the Miller-Rabin test, instead of 40 bits. Rename check_prime to quick_check_prime and is_prime to check_prime Remove some internal functions which weren't used outside the primality test code, along with the prime products table. For quick checking, instead of doing Miller-Rabin with fixed base 2, do a small number of randomized tests. Always use random bases instead of the first n primes.
* The logic PointGFp::operator*= was basically doinglloyd2010-03-162-29/+31
| | | | | | | | | *this = scalar * *this; And operator* was doing a needless copy. Instead make operator* a real multiplication operation, define *= in terms of it.
* Shuffle functions for easier readinglloyd2010-03-162-74/+75
|
* Fix include. <botan/mp_core.h> was picking up the system installed version,lloyd2010-03-161-1/+1
| | | | which happened to be compatible enough to work.
* Add a special handler for the case of doing a subtraction as in:lloyd2010-03-167-391/+470
| | | | | | | | x -= y; where abs(x) < abs(y). This change alone increases ECDSA performance by 5 to 15%
* Name other params. Remove decls of functions that don't existlloyd2010-03-151-14/+36
|
* Name paramslloyd2010-03-151-16/+25
|
* Various microoptimizations, 5-12% improvementlloyd2010-03-151-8/+15
|
* Use a 4-bit wide window for point multiplicationlloyd2010-03-151-14/+21
|
* Rewrite point mult to make larger windows easierlloyd2010-03-151-7/+14
|
* Strength reduce on multiplies in PointGFplloyd2010-03-151-4/+5
|
* Cache memory used for operations in pointlloyd2010-03-151-16/+18
|
* Modify to allow better memory cachinglloyd2010-03-152-21/+52
|
* Cache p.sig_words() in curve objectlloyd2010-03-153-27/+68
| | | | Avoid using Barett reduction in core operations; seems to help perf.
* Use bigint_{mul,sqr} in PointGFp monty opslloyd2010-03-152-9/+8
|
* If workspace is NULL, skip Karatsuba mul/sqrlloyd2010-03-151-2/+6
|
* Add PointGFp::monty_sqrlloyd2010-03-152-10/+44
|
* Cache BigInts as well. Kind of like the old scheme, but created insidelloyd2010-03-132-27/+74
| | | | operator+= and operator*= instead of being class var, so no thread issues.
* Always keep coord_{x,y,z} < p, so don't ever have to copy or use reducerlloyd2010-03-131-22/+10
| | | | in monty_mult()
* Save workspace for addition calls inside operator*=lloyd2010-03-132-20/+28
|
* Share workspace among calls to mult2lloyd2010-03-132-10/+9
|
* Cache a workspace; much fasterlloyd2010-03-132-31/+43
|
* Correct Doxygen commentlloyd2010-03-131-3/+3
|
* Small optimizationslloyd2010-03-131-6/+13
| | | | | Especially try to keep the size of inputs down, so it doesn't have to do an extra reduction step. Ideally this should be eliminated entirely.
* Kill stdio includelloyd2010-03-131-2/+0
|
* Unroll point multiply to look at two bits of scalar each iteration.lloyd2010-03-131-2/+24
| | | | Helps out quite a bit.
* Precompute a*rlloyd2010-03-132-2/+9
|
* More monty_mult cleanupslloyd2010-03-131-6/+4
|
* Small monty_mult cleanuplloyd2010-03-131-10/+8
|