aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
Commit message (Collapse)AuthorAgeFilesLines
* propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-1642-131/+149
|\ | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| * Make many more headers internal-only.lloyd2009-12-169-50/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
| * Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-1637-84/+93
| |
* | Define move assignment and constructors in terms of std::swap (whichlloyd2009-11-191-6/+2
| | | | | | | | | | boils down to BigInt::swap, which uses the memvec swap). Checking with g++ 4.5 -O3 shows it compiles down the same code as before.
* | Add move assignment and constructor operators to BigInt. On macro benchmarkslloyd2009-11-192-4/+40
| | | | | | | | | | | | | | | | | | | | (timing the test suite) there doesn't seem to be much of a difference either way, but putting printfs in the implementations shows they are being used. Since they pretty much can't possibly hurt (right?) and might well help a lot in certain cases, it's worth including. Todo: adding overloads to binary operators taking move operations might be nice. Details in http://cpp-next.com/archive/2009/09/making-your-next-move/
* | 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-189-55/+46
|\ \ | |/ |/| | | | | | | 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
| |
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-172-6/+6
| |\ | | | | | | | | | | | | | | | cfb19182987fc95b2a8885584a38edb10b4709b3) to branch 'net.randombit.botan.c++0x' (head 1570877c463fed4b632bc49a5b5ee27c57de2cb5)
| * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-163-3/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | 8cecdc1c3dd5853823fabcb816400dd467b3c04a) to branch 'net.randombit.botan.c++0x' (head 39a585195a07f18628f6216a276402ed92567cc3)
| * | | Remove TR1 hooks - can be assumed to exist under a C++0x compilerlloyd2009-11-131-3/+1
| | | |
| * | | 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-136-42/+23
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | ac888e57b614c623590d79ab615353ad7c76ef68) to branch 'net.randombit.botan.c++0x' (head 9bf78ed7e2521a328f6db7acbc1cd81b07718230)
| * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-027-51/+44
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-10-137-51/+44
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 139d6957d20f0b1202e0eacc63cb011588faffde) to branch 'net.randombit.botan.c++0x' (head c16676fa6c393bc3f46a044755ce525a013380a6)
| | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-172-2/+2
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92e05ab242e4b6998d685961c53700534a673bce) to branch 'net.randombit.botan.c++0x' (head 27ce37b971ec5cb1f80a9a95b13d5a951b96653b)
| | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-087-51/+44
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cadcc57872bef55226579df57349fe09a93d1f5) to branch 'net.randombit.botan.c++0x' (head d1747f0394aa4442e5b32b9102b830e1a86f0e5a)
| | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-216-31/+36
| | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95eb8083f5884531e5ca0667388f8a6fb6d05c41) to branch 'net.randombit.botan.c++0x' (head 56e105e678540c8bcafa4d0198c19a9489fbf8d1)
| | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-157-51/+44
| | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5438defd358f82e876917a8bd6d735305ecb0a8e) to branch 'net.randombit.botan.c++0x' (head cbdb2fd418557add29a536f7bdb6e78db16f725c)
| | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-031-1/+1
| | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d6d32791adfa878b6fc0dd3a5b65a665b7bbb549) to branch 'net.randombit.botan.c++0x' (head 54deb0e078aab8cd91c8fd8819d1e6668fc762da)
| | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-06-047-51/+44
| | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6a746ccf1e957dba703e65372050a7bd4d6b117d) to branch 'net.randombit.botan.c++0x' (head f54bb7b391eb3b71f380a68ddd460debdc31545d)
| | | | | | * | | | | | | Use C++0x std::shared_ptr<> instead of TR1'slloyd2009-04-016-50/+43
| | | | | | | | | | | | |
| | | | | | * | | | | | | Replace the (deprecated) auto_ptr with unique_ptr.lloyd2009-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was mostly a s/auto_ptr/unique_ptr/, except in the CVC code and one function in ECDSA, which relied on auto_ptr's move semantics (ugh) and had to be modified in various ways.
* | | | | | | | | | | | | Fix typolloyd2009-11-181-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | Clean up BigInt doxygen commentslloyd2009-11-181-471/+458
| | | | | | | | | | | | |
* | | | | | | | | | | | | In ressol(), t is just an alias for s and is not modified, remove itlloyd2009-11-171-3/+2
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | |
* | | | | | | | | | | | Rename/remove some secmem member variables for better matching with STLlloyd2009-11-172-6/+6
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | containers (specifically vector). Rename is_empty to empty Remove has_items Rename create to resize
* | | | | | | | | | | Instead of having two asm_macr.h files being switched in based on modulelloyd2009-11-143-3/+3
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | build magic, name them asm_macr_ARCH.h. Change all including files accordingly.
* | | | | | | | | | Cleanups - remove emails from source files, they should only live inlloyd2009-11-106-42/+23
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | credits.txt and thanks.txt. Remove some various bits of formatting weirdness.
* | | | | | | | | Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-2913-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that.
* | | | | | | | | Also enable x86 asm word_addlloyd2009-10-151-8/+0
| | | | | | | | |
* | | | | | | | | Enable x86-64 asm word_addlloyd2009-10-151-8/+0
| | | | | | | | |
* | | | | | | | | Avoid using word_add() in gfp_element.cpp, actually more complex than necessary,lloyd2009-10-151-1/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | and was tickling a bug in the asm versions because of the constant 0.
* | | | | | | | Oops, removed assert.h from gfp_element.cpp which uses assert :(lloyd2009-10-071-0/+1
| | | | | | | |
* | | | | | | | Add 'Distributed under...' text to files missing it. Some format cleanupslloyd2009-10-076-84/+79
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Split up util.h into 3 fileslloyd2009-09-172-2/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rounding.h (round_up, round_down) - workfactor.h (dl_work_factor) - timer.h (system_time) And update all users of the previous util.h
* | | | | | Add 'Distributed under the terms of the Botan license' notices to the .Slloyd2009-08-113-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files. Were missed by the automated script that added them to the cpp/h files, it appears.
* | | | | | Add support for Dragonfly BSD (a fork of FreeBSD).lloyd2009-07-253-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Contributed by Patrick Georgi
* | | | | | Fix bigint_2word_mul - it tried to use MP_WORD_BITS which was not visiblelloyd2009-07-231-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | in this header, instead use the macro version BOTAN_MP_WORD_BITS. Only affected 64-bit SPARC builds.
* | | | | Fix various auto generated dependencies that were wronglloyd2009-07-177-22/+5
| | | | |
* | | | | Move some files around to break up dependencies between directorieslloyd2009-07-161-0/+1
| | | | |
* | | | | Add a script that reads the output of print_deps.py and rewriteslloyd2009-07-159-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the info.txt files with the right module dependencies. Apply it across the codebase.
* | | | | New module load_on directive 'never', to mark known-buggy codelloyd2009-07-152-2/+2
|/ / / /
* | | | Fix nonce generation of Miller-Rabin testlloyd2009-07-121-1/+1
| | | |
* | | | Remove unnecessary includes of <iostream>; either delete entirely as notlloyd2009-07-115-4/+4
| | | | | | | | | | | | | | | | needed, or replace with <iosfwd> or <ostream> where necessary.
* | | | Fix generating primes between 4 and 7 bits. The problem was that whenlloyd2009-07-111-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | verify mode is not set, by default the Miller-Rabin bases are chosen from the small primes. Generally speaking these make good test bases. However if the prime to be generated is very small, we will choose a base which is out of range. If the i'th prime is too big to be a base, then just choose a random integer of the appropriate size instead.
* | | | Devai Tamas pointed out on the mailing list that random_prime with bitslloyd2009-07-101-3/+3
| |_|/ |/| | | | | | | | | | | | | | set to 2, 3, or 4 was not returning a random prime due to reducing the rng output modulo 1 instead of mod 2 in choosing which prime of that size to return. Oops.
* | | Only load mulop_amd64 on request (currently broken code)lloyd2009-07-021-1/+1
|/ /
* / One more s/engine.h/pk_engine.h/lloyd2009-05-131-1/+1
|/