aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/mp
Commit message (Collapse)AuthorAgeFilesLines
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-0121-3550/+0
|
* Give everything setting a feature test macro in build.h a version codelloyd2013-11-281-1/+1
| | | | | | so application code can check for the specific API it expects without having to keep track of what versions APIs x,y,z changed. Arbitrarily set all current API versions to 20131128.
* Revert accidental deletelloyd2013-07-301-0/+18
|
* Rename mp_asm.h to mp_madd.hlloyd2013-07-3016-37/+20
|
* Merge mp_word64 into mp_genericlloyd2013-07-305-95/+52
| | | | | | Now 64-bit limbs can be used regardless of processor, though we continue to use 32-bit unless we know the processor natively supports 64-bit operations.
* Add a generic 64x64->128 multiplication op.lloyd2013-07-306-213/+66
| | | | | | | Use it to merge mp_msvc64 (was using MSVC _umul128 intrinsic) and mp_asm64 (was using inline asm) into mp_word64, which calls the new mul64x64_128 function. That function wraps any available compiler intrinsics or CPU instructions.
* Avoid putting dword typedef in global namespacelloyd2012-09-041-5/+5
|
* Remove z_size parameter to bigint_monty_redc because it should alwayslloyd2012-08-013-13/+11
| | | | | | | | | | | be 2*(p_size+1). Document that it clears the high part of z. Don't clear the workspace before calling Karatsuba in bigint_mul or bigint_sqr - they clear it every time anyway. Don't bother masking words in the Montgomery_Exponentiator as redc zeros those words. Also don't bother calling z.clear() as the multiply operation does that already.
* Cleanup BigInt::cmplloyd2012-08-012-34/+5
| | | | | | Move bigint_divcore to divide.cpp which is the only place it is used. Probably not computationally intensive enough to really be worth optimizing in asm.
* Doxygen commentslloyd2012-07-061-3/+22
|
* Remove BOTAN_MEM_POOL_CHUNK_SIZE macro from build.h, no longer used.lloyd2012-06-191-5/+8
| | | | | Move Karatsuba cutoffs to mp_karat.cpp as that is the only place that uses them and I doubt these get tweaked much (ever).
* In Karatsuba multiplication, we would avoid recursing in cases wherelloyd2012-06-191-48/+10
| | | | | | | | | we know one of the sub values was going to be zero. Avoid doing this as it exposes a timing channel. Some bn_asm code was manually inlined into the Karatsuba for doing additions. Just call the normal functions - if these are too slow that should be fixed.
* Fix declarationlloyd2011-11-181-2/+1
|
* Manually rename registers instead of rotating. Performance is aboutlloyd2011-11-181-638/+638
| | | | | the same, so clearly GCC 4.6 and/or the Core i7 are very good about renames, but might help on less capable systems.
* Change order of arguments to bigint_monty_redc (internal interface,lloyd2011-06-022-44/+41
| | | | | | not exposed to callers) Switch back redc to using the inlined version (accidental change)
* Add monty sqr and multiply routines (they just call karatsuba and thenlloyd2011-06-022-3/+49
| | | | redc, currently)
* Always writing to/reading from the carry word makes valgrind unhappy.lloyd2011-05-161-1/+2
|
* dword was set to a size_t if we were using a 16 bit limb. Caused by anlloyd2011-05-091-1/+1
| | | | overzealous perl script...
* Flatten out the mp directory since no alternative asm implemenationslloyd2011-04-256-13/+3
| | | | | | | for Montgomery or multiply/square currently exist and almost ceratainly won't be added during 1.10 Fix the name for Sun Studio in mp_asm64
* Rename all references of ia32 to x86-32 and amd64 to x86-64.lloyd2011-04-2211-10/+9
| | | | | | Back the reported version from 1.10.0 to 1.9.17 for the time being. Still on the fence if this will be 1.10.0 or another release candidate instead.
* Oops - should not have used size_t here!lloyd2010-12-221-1/+1
|
* Use size_t in all of math, remove to_u32bitlloyd2010-10-1210-144/+144
|
* Change ifs to compares to make it easier for a compiler to figure outlloyd2010-10-121-11/+9
| | | | | | it should use add with carry or conditional moves if available. Also remove the amd64 asm; the mp_amd64 code should be used for this case.
* Cleanup Karatsuba a bitlloyd2010-09-281-103/+107
|
* Cleanuplloyd2010-09-261-9/+9
|
* Move the core MPI functions to src/math/mp, leaving src/math/bigint justlloyd2010-09-2427-0/+3752
for the implementation of the BigInt class