aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/numbertheory
Commit message (Collapse)AuthorAgeFilesLines
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-0116-2463/+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.
* Avoid conditionals in the power mod opslloyd2012-09-042-22/+35
|
* Move monty_invert to numthry.h and use it in CurveGFp as welllloyd2012-08-013-50/+47
|
* Remove z_size parameter to bigint_monty_redc because it should alwayslloyd2012-08-011-13/+1
| | | | | | | | | | | 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.
* Remove BigInt::assignlloyd2012-08-011-15/+24
|
* Remove BigInt(NumberType type, size_t n) and replace it with a staticlloyd2012-08-013-5/+4
| | | | BigInt function power_of_2. (Power2 was the only available NumberType)
* Remove BigInt::operator[]. Use BigInt::word_at, which checks sizeslloyd2012-08-012-3/+4
|
* Remove BigInt::operator[] returning a mutable word referencelloyd2012-08-011-1/+1
|
* Rename the version of BigInt::data returning a mutable pointerlloyd2012-08-011-3/+6
| | | | to BigInt::mutable_data. Update callers.
* Remove the mutable version of BigInt::get_reglloyd2012-07-311-2/+2
|
* Increase default Miller-Rabin nonce to 192 bitslloyd2012-06-261-2/+2
|
* Use the extended Euclidean algorithm for computing the inverse forlloyd2012-06-171-10/+57
| | | | | | | Montgomery exponentiation as except for the very first division all operands are single words and thus we can assume we have a relatively fast division operation (and additionally working only with words avoids dynamic allocation).
* Use a special case for odd moduli in inverse_mod with close to doublelloyd2012-06-171-1/+51
| | | | performance.
* inverse_mod - avoid mutable zero_bits, avoid making needless copies oflloyd2012-06-171-11/+12
| | | | the arguments
* m_ namespace member varslloyd2012-06-152-44/+42
|
* Index, comments, name vars in headerslloyd2012-06-153-5/+15
|
* Computing the Montgomery parameter can be done much cheaper because welloyd2012-06-151-3/+4
| | | | | | | only need the low word of the result. Credits to HAC, somehow I missed that this was possible. This helps especially when a program does a lot of setups, so the improvement is only minor on the benchmark but fairly huge for asio_tls_server.
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-181-4/+4
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-185-22/+23
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* propagate from branch 'net.randombit.botan.tls-state-machine' (head ↵lloyd2012-04-251-1/+1
|\ | | | | | | | | | | a4741cd07f50a9e1b29b0dd97c6fb8697c038ade) to branch 'net.randombit.botan.cxx11' (head 116e5ff139c07000be431e07d3472cc8f3919b91)
| * Avoid a few maintainer mode flag warnings. Remove -Weffc++ from thelloyd2012-04-201-1/+1
| | | | | | | | | | list of maintainer mode flags. It produces some very useful warnings, but also a lot of noisy junk that I really don't care about.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2012-02-201-2/+0
|\| | | | | | | | | | | c247a55e7c0bcd239fcfc672139b59ef63d7ee84) to branch 'net.randombit.botan.cxx11' (head 16d7756c6b8933d0d543ebdda9c7e8f4908a4a33)
| * Remove debug printfs, stdio includeslloyd2012-01-301-2/+0
| |
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-173-7/+7
|\ \ | |/ |/| | | | | | | 5dc30d88afdeec4896b5065f9260e66d52b1a730) to branch 'net.randombit.botan.cxx11' (head 8d42792537db92fab3136f5696ee1eba3e73fa76)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-133-7/+7
| |\ | | | | | | | | | | | | | | | 150bd11dd8090559ee1e83394b8283bf93a018de) to branch 'net.randombit.botan.c++0x' (head 7480693bb3f1e8a4e039a3e7ba3d9a7007f9730e)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-02-113-7/+7
| | |\ | | | | | | | | | | | | | | | | | | | | 13a0d36dac3709f3cb88e830ed7f8cab9e7433ab) to branch 'net.randombit.botan.c++0x' (head 2221ad8796466e7e096645de77ba856a9c902d14)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-043-7/+7
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-283-7/+5
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2841fb518e20d2fe0a374e4f6b08bdbb14d5d158) to branch 'net.randombit.botan.c++0x' (head 0b9275139d6346bd3aa28d63bf8b8a03851d853d)
| | | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-133-7/+7
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | | | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-07-093-7/+7
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 161b5c0300b72baa746f101fda1e2b4a7c71818c) to branch 'net.randombit.botan.c++0x' (head 1fc3875bb8daf4ad0e90ba66db72642203cb9984)
| | | | | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-222-21/+116
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e) to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
| | | | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-175-20/+77
| | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-213-7/+7
| | | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 96d0a1885774b624812fd143d541c8bcda319217) to branch 'net.randombit.botan.c++0x' (head e14368ab9d7976f3e111c6bc0adf24eebeb7c114)
| | | | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-132-27/+74
| | | | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f918e9ea99aebd6f685b1fbdddb77564e724744) to branch 'net.randombit.botan.c++0x' (head 23d15f23e7fd97436b93f99fb59ba18b9f13210b)
| | | | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-133-7/+7
| | | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5e9c6107cbb15744c2edf2eb0e23f4bfe949f432) to branch 'net.randombit.botan.c++0x' (head 79e5920a8bba479b9e5734f8649b8c36d27d403c)
| | | | | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-093-7/+7
| | | | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9932d4d63417f7fcc199ada244cbaa6c1c32d9c1) to branch 'net.randombit.botan.c++0x' (head f4a385a376311edc62ef506c72cc56f69e6efd5a)
| | | | | | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-023-67/+57
| | | | | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc86fc4842254088bf820ea6ebf05877aa63fb22) to branch 'net.randombit.botan.c++0x' (head 77565ff7252df7f8faad86d65075498b0adb93d8)
| | | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-02-253-7/+7
| | | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c1db52e38b60afbc6549af5222d6e10b1b9730dd) to branch 'net.randombit.botan.c++0x' (head e56dfbfe6bffbd5b4e52b115549d885c5fd04586)
| | | | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-213-7/+7
| | | | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-241-2/+0
| | | | | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 367d157c1221a162f5b4098492944a509ef6d019) to branch 'net.randombit.botan.c++0x' (head 1b9e8c4e92663f30b7d57b0fd8f57eb13cfce155)
| | | | | | | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-163-7/+7
| | | | | | | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c82e10d78ad0e2cdaa56cb02f3d846ed0ead5e) to branch 'net.randombit.botan.c++0x' (head 74dbf310b7fcc11f94a16cd63046219acd5d62bc)
| | | | | | | | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-166-17/+20
| | | | | | | | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | | | | | | | * | | | | | | | Remove to_string, replacing with std::to_stringlloyd2009-11-182-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to_u32bit to use the new C++0x library func stoul instead of hand-written code.
| | | | | | | | | | | | * | | | | | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-182-2/+2
| | | | | | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 23f95467137a0531f74574d1e3eb822734f0c5f2) to branch 'net.randombit.botan.c++0x' (head 427be8496e669880b1bf532eb829ebbdbeaf34c9)
| | | | | | | | | | | | | * | | | | | | | Remove accidentally checked in change to powm_fw.cpplloyd2009-11-181-29/+6
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | | | | | Use async in ElGamal encryption and Nyberg-Rueppel verificationlloyd2009-11-181-6/+29
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | | | | | Make `struct mapping tests[]` non-static in miller_rabin_test_iterationslloyd2009-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to work around gcc bug 42010
| | | | | | | | | | | | | * | | | | | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-021-1/+1
| | | | | | | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | | | | | | | | | | | | | * \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-171-1/+1
| | | | | | | | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92e05ab242e4b6998d685961c53700534a673bce) to branch 'net.randombit.botan.c++0x' (head 27ce37b971ec5cb1f80a9a95b13d5a951b96653b)