aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/mdx_hash
Commit message (Collapse)AuthorAgeFilesLines
* Remove HashFunction::HASH_BLOCK_SIZE entirelylloyd2010-10-132-4/+11
|
* Remove most uses of HASH_BLOCK_SIZElloyd2010-10-131-10/+10
|
* Use output_length() instead of OUTPUT_LENGTH pseudo-propertylloyd2010-10-131-1/+1
|
* Use size_t for BufferedComputation::add_datalloyd2010-10-122-13/+13
|
* Remove more uses of vector to pointer implicit conversionslloyd2010-09-131-3/+3
|
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-131-1/+1
| | | | | representation (rather than in an interator context), instead use &buf[0], which works for both MemoryRegion and std::vector
* Big, invasive but mostly automated change, with a further attempt atlloyd2010-09-071-2/+2
| | | | | | | | | | | | | | harmonising MemoryRegion with std::vector: The MemoryRegion::clear() function would zeroise the buffer, but keep the memory allocated and the size unchanged. This is very different from STL's clear(), which is basically the equivalent to what is called destroy() in MemoryRegion. So to be able to replace MemoryRegion with a std::vector, we have to rename destroy() to clear() and we have to expose the current functionality of clear() in some other way, since vector doesn't support this operation. Do so by adding a global function named zeroise() which takes a MemoryRegion which is zeroed. Remove clear() to ensure all callers are updated.
* Yet more Doxygen commentslloyd2010-06-162-6/+18
|
* More Doxygenlloyd2010-06-151-2/+12
|
* More Doxygen updates/fixeslloyd2010-06-151-2/+8
|
* 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.
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-1/+1
| | | | | | | | | | | | | | 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).
* Make many more headers internal-only.lloyd2009-12-161-1/+1
| | | | | | | | | | | | | 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.
* 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.
* Remove all exception specifications. The way these are designed in C++ islloyd2009-10-222-2/+2
| | | | | | just too fragile and not that useful. Something like Java's checked exceptions might be nice, but simply killing the process entirely if an unexpected exception is thrown is not exactly useful for something trying to be robust.
* Remove add blocks from hash function info.txt fileslloyd2009-09-291-5/+0
|
* Make the member variables of MDx_HashFunction private instead of protected -lloyd2009-04-071-6/+5
| | | | no subclass needs access to any of these variables.
* Avoid calling compress_n in MDx_HashFunction unless at least one block islloyd2009-04-071-1/+2
| | | | going to be compressed - otherwise it's a noop.
* Remove some commented out code in MDx_HashFunction which was used duringlloyd2009-04-072-26/+0
| | | | | the changeover from single block hashing to having each hash support multiple sequential blocks of input.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-302-1/+5
| | | | | | | | | | | | | | | 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).
* I had not anticipated this being really worthwhile, but it turns outlloyd2008-11-232-38/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to have been so! Change MDx_HashFunction::hash to a new compress_n which hashes an arbitrary number of blocks. I had a thought this might reduce a bit of loop overhead but the results were far better than I anticipated. Speedup across the board of about 2%, and very noticable (+10%) increases for MD4 and Tiger (probably b/c both of those have so few instructions in each iteration of the compression function). Before: SHA-1: amd64: 211.9 MiB/s core: 210.0 MiB/s sse2: 295.2 MiB/s MD4: 476.2 MiB/s MD5: 355.2 MiB/s SHA-256: 99.8 MiB/s SHA-512: 151.4 MiB/s RIPEMD-128: 326.9 MiB/s RIPEMD-160: 225.1 MiB/s Tiger: 214.8 MiB/s Whirlpool: 38.4 MiB/s After: SHA-1: amd64: 215.6 MiB/s core: 213.8 MiB/s sse2: 299.9 MiB/s MD4: 528.4 MiB/s MD5: 368.8 MiB/s SHA-256: 103.9 MiB/s SHA-512: 156.8 MiB/s RIPEMD-128: 334.8 MiB/s RIPEMD-160: 229.7 MiB/s Tiger: 240.7 MiB/s Whirlpool: 38.6 MiB/s
* Move BufferedComputation to new buf_comp.{h,cpp}lloyd2008-11-081-0/+1
|
* Move the declaration of the HashFunction base class to a new header hash.hlloyd2008-11-081-1/+1
| | | | (from base.h)
* Rewrite part of the module loading code in configure.pl, now dependencieslloyd2008-09-301-1/+1
| | | | | | seem to be handled correctly (er, at least mostly), and more importantly the asm MPI modules are detected and used correctly (at least on x86-64 and x86).
* Rename all modinfo.txt files to info.txt, since they are all (none) oflloyd2008-09-291-0/+0
| | | | | them modules now. In any case there is no distinction so info.txt seems better.
* Add deps, missing includes, etclloyd2008-09-291-1/+1
|
* Modularize IF family PK algorithms (integer factorization; RSA and RW baselloyd2008-09-281-0/+10
| | | | | | class). Add many missing modinfo.txts that I had not checked in. Oops.
* Make mdx_hash also a module, which most of the hash functions depend on.lloyd2008-09-282-0/+142
Correct the configure program so modules are not autoloaded if their dependences are not available. (Eg, --no-module=mdx_hash will disable MD4, MD5, SHA-1, etc rather than cause a compliation failure)