aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/skein/skein_512.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use a u32bit for the length argument to ubi_512. That value cannot possiblylloyd2009-12-231-2/+2
| | | | | | be larger than 4294967232 because you can give at most 2^32-1 bytes of data at a time to Skein_512::add_data, and Skein always needs to buffer at least one byte.
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-1/+2
| | | | | | | | | | | | | | 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.
* Add a new looping load_be / load_le for loading large arrays at once, andlloyd2009-10-291-2/+2
| | | | | | | | change some of the hash functions to use it as low hanging fruit. Probably could use further optimization (just unrolls x4 currently), but merely having it as syntax is good as it allows optimizing many functions at once (eg using SSE2 to do 4-way byteswaps).
* Remove all exception specifications. The way these are designed in C++ islloyd2009-10-221-1/+1
| | | | | | 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.
* Change Skein-512 to match the tweaked 1.2 specification. Round constantslloyd2009-09-151-8/+8
| | | | in the Threefish cipher have changed to increase diffusion.
* Avoid a crash in Skein_512::add_data if it is called with a zero-lengthlloyd2009-07-141-0/+3
| | | | input vector.
* Mark Skein_512 with the BOTAN_DLL macrolloyd2009-06-061-0/+6
| | | | | | | | | | | | | | Add a comment that the limitation of the personalization string being a maximum of 64 characters is due to the implementation and not the specification (but it makes it easy to implement, and in this particular case 64 characters is probably fine). Add some tests for the personalization option, generated by the Skein reference implementation. Disable stripping whitespace in checks/misc.cpp:strip - it strips the personalization tag, which breaks the test, and isn't needed otherwise because the test files are well-formed.
* Small cleanups in the Skein-512 source, and add support for thelloyd2009-06-031-66/+61
| | | | personalization option.
* Add an implementation of Skein-512lloyd2009-06-021-0/+258