aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmark
Commit message (Collapse)AuthorAgeFilesLines
* Remove get_nanoseconds_clock as we'll rely on std::chrono's highlloyd2012-02-201-14/+12
| | | | | | | | | resolution clock for this in C++11. Now that the only remaining function in time.h is calendar_point, rename the header to calendar.h. Hopefully that last use will go away once a TR2 datetime library becomes available. Use std::chrono inside the library benchmark code.
* Merge fixups. Add locking to default session manager. Use chrono liblloyd2012-02-202-2/+4
| | | | and unique_ptr.
* propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-042-24/+40
|\ | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-132-24/+40
| |\ | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-08-042-24/+40
| | |\ | | | | | | | | | | | | | | | | | | | | 717a9d103aa80e6d66c04e3a23cf173aadf56ceb) to branch 'net.randombit.botan.c++0x' (head c9759e8ebc2f360696a11f2d00fc218d7a8bf744)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-172-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-04-281-1/+1
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f25a3b954f24c5d07fa0dab6c4d76f63767165) to branch 'net.randombit.botan.c++0x' (head a365694b70b4b84ca713272d56d496acca351cb5)
| | | * | | Various updates: unique_ptr, using chrono, merge fixups, etclloyd2010-03-091-4/+4
| | | | | |
| | | * | | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-222-20/+36
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5525439539abc808b7b8588380a362303cf3c599) to branch 'net.randombit.botan.c++0x' (head 6749468bfbdeff4636b7a15de412a6c89f1aea87)
| | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-212-21/+36
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14c1d4dc8696d2705a70ec3d2403e01d2ca95265) to branch 'net.randombit.botan.c++0x' (head c567fa7310ba082a837562092728c4b4b882bf82)
| | | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-161-7/+0
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-011-2/+0
| | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b3515264af291b4785d3d296e2cc0e877ca7816a) to branch 'net.randombit.botan.c++0x' (head 66ca78008f08bb5efc2eca52a3d4501f02ffd736)
| | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-201-4/+4
| | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b431f4bc404f3ed4a5332b69100ff903fbbb1d6a) to branch 'net.randombit.botan.c++0x' (head a5eb5edada5e025f7c85c096dc59a467cae4aba6)
| | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-023-56/+47
| | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-303-56/+47
| | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8a5eb02c2e451fc983f234f7ba2f023f5a7d294f) to branch 'net.randombit.botan.c++0x' (head e18cd411269e15638df3298d6a4165446e7ca529)
| | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-171-1/+0
| | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92e05ab242e4b6998d685961c53700534a673bce) to branch 'net.randombit.botan.c++0x' (head 27ce37b971ec5cb1f80a9a95b13d5a951b96653b)
| | | | | | | * | | | | | | Use <chrono> in the runtime benchmarking code instead of the locallloyd2009-09-163-56/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timers.
* | | | | | | | | | | | | | Add new top-level algorithm which provides basic functionality: namelloyd2010-11-012-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | query, clearing, and cloning. Applies to ciphers, hashes, MACs, and PBKDFs. May extend to KDFs later as well. A single combined hierarchy in particular will make the algo_factory much simpler.
* | | | | | | | | | | | | | Eliminate the constant size_t values in SymmetricAlgorithm that givelloyd2010-10-281-3/+3
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the parameters of the key length. Instead define a new function which returns a simple object which contains this information. This definitely breaks backwards compatability, though only with code that directly manipulates low level objects like BlockCipher*s directly, which is probably relatively rare. Also remove some deprecated accessor functions from lookup.h. It turns out block_size_of and output_size_of are being used in the TLS code; I need to remove them from there before I can delete these entirely. Really that didn't make much sense, because they assumed all implementations of a particular algorithm will have the same specifications, which is definitely not necessarily true, especially WRT key length. It is much safer (and probably simpler) to first retrieve an instance of the actual object you are going to use and then ask it directly.
* | | | | | | | | | | | | s/BLOCK_SIZE/block_size()/lloyd2010-10-131-2/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | s/u32bit/size_t/ in codec and benchmarklloyd2010-10-122-9/+9
| | | | | | | | | | | | |
* | | | | | | | | | | | | I had this older version of algorithm_benchmark included forlloyd2010-09-161-18/+0
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatability with 1.8, but actually the signature is completely different anyway because that version took a Timer object, which doesn't exist at all anymore. I suppose I could add an empty Timer class plus subclasses, let someone instantiate it and pass it in, ignoring it, but I'm not feeling this is worth the effort. It would make more sense to add a version with this signature to 1.8, which creates a Default_Benchmark_Timer and uses it.
* | | | | | | | | | | / Change the benchmark code to also take a buf_size, instead of using hardcodedlloyd2010-07-302-7/+28
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 16 KiB buffer. Also reorder the parameters to make somewhat more sense, with the first arguments being totally mandatory and the later ones potentially optional. Provide inlined version matching the old interface that just forwards to the new call, marking it as deprecated.
* | | | | | | | | | | 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.
* | | | | | | | | | Remove some C-style castslloyd2010-04-231-1/+1
|/ / / / / / / / /
* / / / / / / / / Remove unneeded iostream/stdio includeslloyd2009-12-211-2/+0
|/ / / / / / / /
* | | | | | | / Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-9/+10
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bswap.h); too many external apps rely on loadstor.h existing. Define 64-bit generic bswap in terms of 32-bit bswap, since it's not much slower if 32-bit is also generic, and much faster if it's not. This may be quite helpful on 32-bit x86 in particular. Change formulation of generic 32-bit bswap. It may be faster or slower depending on the CPU, especially the latency and throuput of rotate instructions, but should be faster on an ideally superscalar processor with rotate instructions (ie, what I expect future CPUs to look more like).
* | | | | | | Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-161-7/+0
| |_|_|_|_|/ |/| | | | |
* | | | | | Consolidate the non-canonical epoch timers, like cpuid and Win32'slloyd2009-12-013-48/+21
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QueryPerformanceCounter, into an entropy source hres_timer. Its results, if any, do not count as contributing entropy to the poll. Convert the other (monotonic/fixed epoch) timers to a single function get_nanoseconds_clock(), living in time.h, which statically chooses the 'best' timer type (clock_gettime, gettimeofday, std::clock, in that order depending on what is available). Add feature test macros for clock_gettime and gettimeofday. Remove the Timer class and timer.h. Remove the Timer& argument to the algorithm benchmark function.
* | | | | Add missing BOTAN_DLL macros for algorithm_benchmark and SCAN_Namelloyd2009-11-201-5/+5
|/ / / /
* | | | 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.
* | | | Cleanups/random changes in the stream cipher code:lloyd2009-10-141-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove encrypt, decrypt - replace by cipher() and cipher1() Remove seek() - not well supported/tested, I want to redo with a new interface once CTR and OFB modes become stream ciphers. Rename resync to set_iv() Remove StreamCipher::IV_LENGTH and add StreamCipher::valid_iv_length() to allow multiple IV lengths (as for instance Turing allows, as would Salsa20 if XSalsa20 were supported).
* | / In the benchmark code, set a random key for the block and stream ciphers.lloyd2009-09-231-0/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | This, I think, was what was causing the OpenSSL AES code to crash (without a key being set, the rounds are unset and probably causes the code to loop out past the end of an array somewhere). Sadly, this also confirms that OpenSSL's AES is much faster than Botan's: AES-128: 115.032 [core] 152.994 [openssl] AES-192: 98.6724 [core] 130.087 [openssl] AES-256: 86.6348 [core] 113.608 [openssl] Definitely some improvement can be made there! :(
* | Split up util.h into 3 fileslloyd2009-09-171-1/+0
|/ | | | | | | - rounding.h (round_up, round_down) - workfactor.h (dl_work_factor) - timer.h (system_time) And update all users of the previous util.h
* In benchmark.cpp, use encrypt_n when benchmarking block cipherslloyd2009-08-121-2/+1
|
* Change how the pair is constructed for Sun Forte compatabilitylloyd2009-07-311-1/+1
|
* 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-151-0/+9
| | | | | | the info.txt files with the right module dependencies. Apply it across the codebase.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-302-0/+4
| | | | | | | | | | | | | | | up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
* Add Doxygen comment for Timer::clock. Fix @return in benchmark.h and x509_ca.hlloyd2008-11-251-1/+1
|
* Fix a roundoff error in the block cipher benchmarkslloyd2008-11-241-16/+17
|
* Fix integer overflow in benchmarslloyd2008-11-231-4/+4
|
* Fix poorly named functionlloyd2008-11-211-6/+6
|
* Mention ANSI clock seems pretty bogus for benchmarkinglloyd2008-11-211-0/+3
|
* Add a typedef in benchmark.h Default_Benchmark_Timer, which checks availablelloyd2008-11-211-8/+26
| | | | | timer alternatives. I realized otherwise each application would be forced to do the exact same thing, and no reason for that.
* Oops, 2^32 nanoseconds < 4.3 seconds, which is pretty small. Use 64 bitlloyd2008-11-121-7/+7
| | | | | integers where we manipulate values denominated in nanoseconds to avoid overflow (2^64 nanoseconds = 584.55 years, aka long enough)
* Remove support for provider identifiers from SCAN_Name - it turns out thislloyd2008-11-121-6/+7
| | | | | | | | | | | | was not the right place to keep track of this information. Also modify all Algorithm_Factory constructor functions to take instead of a SCAN_Name a pair of std::strings - the SCAN name and an optional provider name. If a provider is specified, either that provider will be used or the request will fail. Otherwise, the library will attempt best effort, based on user-set algorithm implementation settings (combine with benchmark.h for choosing the fastest implementation at runtime) or if not set, a static ordering (preset in static_provider_weight in prov_weight.cpp, though it would be nice to make this easier to toggle).
* Rename timers.h to timer.hlloyd2008-11-111-1/+1
|
* Add a runtime benchmarking system (for ciphers/hash/MACs)lloyd2008-11-113-0/+232