aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmark
Commit message (Collapse)AuthorAgeFilesLines
* 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