aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory
Commit message (Collapse)AuthorAgeFilesLines
* Doxygen warning fixeslloyd2012-07-091-1/+0
|
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-182-6/+6
| | | | style cast in secmem.h
* Use nullptrlloyd2011-07-121-1/+1
|
* propagate from branch 'net.randombit.botan' (head ↵lloyd2011-07-124-40/+29
|\ | | | | | | | | | | 23a326fa36a31dd39347a8864e1f5740669a905e) to branch 'net.randombit.botan.cxx11' (head 9d3ac8dd45f7673c85dca41968e7750acc90bdff)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-044-40/+29
| |\ | | | | | | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-134-39/+28
| | |\ | | | | | | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | | * ~Algorithm_Cache was missing definitionlloyd2010-08-041-1/+1
| | | |
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-08-044-39/+28
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | 717a9d103aa80e6d66c04e3a23cf173aadf56ceb) to branch 'net.randombit.botan.c++0x' (head c9759e8ebc2f360696a11f2d00fc218d7a8bf744)
| | | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-174-28/+52
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-05-251-6/+10
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 879d1fc83844976a01b9e3188c4f0b5ddb237f0e) to branch 'net.randombit.botan.c++0x' (head 4a0af13da3b0e21d6275cd6ec0c835d6bf757c8d)
| | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-04-092-5/+12
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75d272c759511a9a99a371ddc74bd17b2c1453b6) to branch 'net.randombit.botan.c++0x' (head 2ce9ba37cb9287a3d875921240d6682100625b9f)
| | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-02-144-38/+27
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5bfc3e699003b86615c584f8ae40bd6e761f96c0) to branch 'net.randombit.botan.c++0x' (head 8c64a107b58d41f376bfffc69dfab4514d722c5c)
| | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-214-38/+27
| | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | * | | | Post-merge fixeslloyd2009-12-161-1/+1
| | | | | | | | | |
| | | | | | * | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-163-6/+12
| | | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | * | | | | Use auto for long iterator names, etc.lloyd2009-11-162-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will be nice to convert to the range-based for loop once that's available.
| | | | | | * | | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-024-19/+14
| | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | | | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-10-131-0/+4
| | | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d2bced090807e3590304d38724d37f90ac870f1d) to branch 'net.randombit.botan.c++0x' (head 21baae4d88e0b1bc4e127d129b8ca730e8fa3e46)
| | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-10-134-19/+14
| | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 139d6957d20f0b1202e0eacc63cb011588faffde) to branch 'net.randombit.botan.c++0x' (head c16676fa6c393bc3f46a044755ce525a013380a6)
| | | | | | | | * | | | | | Remove dep on mutex module (doesn't exist here). Use initializer list in ↵lloyd2009-09-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libstate.cpp
| | | | | | | | * | | | | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-083-18/+14
| | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cadcc57872bef55226579df57349fe09a93d1f5) to branch 'net.randombit.botan.c++0x' (head d1747f0394aa4442e5b32b9102b830e1a86f0e5a)
| | | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-07-211-4/+9
| | | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95eb8083f5884531e5ca0667388f8a6fb6d05c41) to branch 'net.randombit.botan.c++0x' (head 56e105e678540c8bcafa4d0198c19a9489fbf8d1)
| | | | | | | | | * | | | | | | Remove the mutex classes in favor of C++0x's std::mutex and std::lock_guardlloyd2009-04-013-18/+14
| | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | The Algorithm_Factory has this logic on looking for an object:lloyd2011-07-051-4/+6
|/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Check the cache; if found, return value - Populate cache, if the value is already there, delete the old object and save the new one. - Recheck the cache value Raja <[email protected]> pointed out on the list that this could race if multiple threads called a lookup function in close succession while the cache was cold. All of them would fail the lookup, then each of them would add it, but the values returned would be deleted by other threads. Instead, declare that first write wins. Then, the cache stays consistent even if there is a race, the only issue is an extra search and delete. Modify GOST and Skein, as their name() function did not roundtrip properly which caused failures otherwise.
* | | | | | | | | | | | | | | Move PBKDF lookups to enginelloyd2010-11-042-0/+71
| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | Add a BOTAN_DEPRECATED macro which can provide compile-timelloyd2010-11-021-2/+3
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecation warnings (at least for GCC and VC++). Use in some places.
* / / / / / / / / / / / / / s/u32bit/size_t/lloyd2010-10-124-12/+12
|/ / / / / / / / / / / / /
* | | | | | | | | | | | | merge of '28d57385c0f1a9a2665288ce728e8b3231634f59'lloyd2010-08-031-0/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and 'a4d88442d5f6b8554234c7f7468856868919b614'
| * | | | | | | | | | | | | Forbid copying an Algorithm_Factory; could easily cause double-delete,lloyd2010-07-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | especially in a multithreaded environment, and doesn't seem like a useful operation to support. (In principle, we could support this by adding a clone() call to Algorithm_Cache, which would in turn call clone on each of it's held prototype objects, plus adding a clone to Engine. Doesn't seem worth the bother, though.
* | | | | | | | | | | | | | We've already predeclared Engine at the start of the header, so nolloyd2010-07-291-4/+4
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reason to say `class Engine*` later on.
* | | | | | | | | | | | | Expose Algorithm_Factory::clear_caches which clears out all of thelloyd2010-07-272-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caches; this might be useful for applications which are, say, particularly sensitive to memory usage.
* | | | | | | | | | | | | There was an interesting bug affecting dynamically loaded engines.lloyd2010-07-272-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The library initializer runs some self tests; this brings objects for a few select types (AES, SHA-1, etc) into the caches. Later on, when we add a dynamic engine, the engines aren't requeried because the cache has hits. So, for instance an dlopen'ed engine that provided AES-128 would not actually be used unless you called on the algo factory with a provider of "blah" - even using set_preferred_provider would have no effect, because that's just a request. Add a new function to Algorithm_Cache, clear_cache, which just deletes everything that is currently loaded (this is 90% of the destructor). Then call this on each cache in Algorithm_Factory when a new Engine is loaded. In normal use, this should be very fast because on init the engines are loaded one after another so clear_cache() won't do much work at all, but it ensures that if you load an engine later on in runtime it will always be found. It does have the downside that the app will then requery each Engine for each new algo after this point, but I think typically loading a dynamic engine will happen very early on so this won't be too much of a hassle. (And even if it happens in the middle of execution, everything still works, it just means some overhead the first time you ask for algo X).
* | | | | | | | | | | | | In Algorithm_Factory, delete the Engines after deleting the cacheslloyd2010-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than before. Otherwise, we run into a problem with dynamically loaded engines: the engine will be deleted (and thus, the external library unloaded), before calling the destructors on any objects which may have been cached, so we jump to a now invalid address instead of the destructor code.
* | | | | | | | | | | | | Consolidate the two engines that provided assembler implementationslloyd2010-07-131-2/+1
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (amd64_eng and ia32_eng) into a new asm_engine. This same engine could also be used in the event that asm code for other CPUs was added later on.
* | | | | | | | | | | | Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Yet more Doxygen commentslloyd2010-06-161-6/+18
| | | | | | | | | | | |
* | | | | | | | | | | | More Doxygen commentslloyd2010-06-161-0/+7
| | | | | | | | | | | |
* | | | | | | | | | | | More Doxygen fixeslloyd2010-06-152-2/+7
| | | | | | | | | | | |
* | | | | | | | | | | | Fix a few hundred Doxygen warningslloyd2010-06-151-18/+18
| | | | | | | | | | | |
* | | | | | | | | | | | Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-072-2/+2
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused Doxygen to think this was markup meant for it, which really caused some clutter in the namespace page.
* | | | | | | | | | | Add a couple of small patches from Thomas Capricelli <[email protected]>lloyd2010-05-211-6/+10
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | that enable botan to be built under the clang C++ compiler.
* | | | | | | | | | Allow adding engines dynamicallylloyd2010-03-242-7/+12
|/ / / / / / / / /
* / / / / / / / / Minor tweak, save a line and more readable IMOlloyd2010-02-141-2/+1
|/ / / / / / / /
* | | | | | | | Doxygen commentslloyd2010-01-071-14/+63
| | | | | | | |
* | | | | | | | Recognize aes_isa engine, set as high prioritylloyd2010-01-061-4/+6
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Make many more headers internal-only.lloyd2009-12-163-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-5/+11
|/ / / / / /
* | | | | | Rename sse2 engine to simdlloyd2009-10-291-1/+1
| | | | | |
* | | | | | Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-291-2/+0
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that.
* | | | | Check for cipher_mode() being set; if it is, not an algo_factory algolloyd2009-10-131-0/+4
|/ / / /