aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
Commit message (Collapse)AuthorAgeFilesLines
* Update Keccak to the round 3 variant announced 2011-01-17lloyd2011-01-202-9/+4
| | | | | Only change is the padding rule. It 'simplifies' the padding by making it less flexible and harder to implement efficiently. :(
* Avoid more VC warningslloyd2010-12-133-4/+8
|
* Do the XOR a word at a time where possible which gets performance backlloyd2010-12-131-0/+17
| | | | | to the level of the version using xor_buf, at least on a little-endian CPU.
* Fix Keccak message XOR, did not work on big-endian CPUslloyd2010-12-131-8/+12
|
* Reset state on finalizationlloyd2010-12-111-3/+2
|
* XOR the input directly into the state. Only slightly faster (about 5%lloyd2010-12-112-19/+22
| | | | | | on motoko), but does also reduce memory overhead. Perhaps doing the XOR by hand and then doing aligned 64-bit XORs where possible would be beneficial here.
* Single update for padding byteslloyd2010-12-111-4/+3
|
* Add a simple but functioning implementation of Keccak. Only thelloyd2010-12-103-0/+230
| | | | proposed SHA-3 parameter sets are supported.
* Mass disable copy constructors and assignment on all algos until proven ↵lloyd2010-11-041-3/+0
| | | | safe/useful
* Update Skein-512 for the new 1.3 specification, just changes the keylloyd2010-11-031-2/+2
| | | | schedule constant to prevent rotational attacks.
* Remove needless destructorslloyd2010-11-031-2/+0
|
* Doxygenlloyd2010-11-025-4/+34
|
* Add new top-level algorithm which provides basic functionality: namelloyd2010-11-012-13/+4
| | | | | | | | 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.
* Remove BufferedComputation::OUTPUT_LENGTHlloyd2010-10-2925-95/+103
|
* More size_tlloyd2010-10-131-1/+1
|
* More size_t. Document changeslloyd2010-10-133-6/+6
|
* Use buffer.size() directly to avoid lots of virtual calls in core looplloyd2010-10-131-9/+9
|
* Remove HashFunction::HASH_BLOCK_SIZE entirelylloyd2010-10-1310-36/+44
|
* Remove most uses of HASH_BLOCK_SIZElloyd2010-10-1319-44/+49
|
* Use output_length() instead of OUTPUT_LENGTH pseudo-propertylloyd2010-10-1316-23/+23
|
* More size_tlloyd2010-10-131-1/+1
|
* Use size_t for BufferedComputation::add_datalloyd2010-10-1244-161/+165
|
* Split SHA-2 into 32 and 64 bit versions; they are totally independentlloyd2010-09-306-1/+6
| | | | of each other anyway.
* Make configure output more sensible wrt incompatible moduleslloyd2010-09-284-0/+16
|
* Do the prep/unroll phase 4 rounds before it is needed instead of 3;lloyd2010-09-211-97/+92
| | | | tests on Nehalem indicate a small but measurable win there (about 3%).
* Clean up, hide union accesses with a macro to make it easier to testlloyd2010-09-211-40/+92
| | | | alternative methods of getting pieces of the expanded message.
* Implicit conversionslloyd2010-09-141-7/+7
|
* More changes to avoid vector to pointer implicit conversionslloyd2010-09-141-2/+2
|
* Completely remove the second parameter to SecureVector which specifieslloyd2010-09-1418-53/+69
| | | | | | | | | | | | | | | | | | | | the initial/default length of the array, update all users to instead pass the value to the constructor. This is a old vestigal thing from a class (SecureBuffer) that used this compile-time constant in order to store the values in an array. However this was changed way back in 2002 to use the same allocator hooks as the rest of the containers, so the only advantage to using the length field was that the initial length was set and didn't have to be set in the constructor which was midly convenient. However this directly conflicts with the desire to be able to (eventually) use std::vector with a custom allocator, since of course vector doesn't support this. Fortunately almost all of the uses are in classes which have only a single constructor, so there is little to no duplication by instead initializing the size in the constructor.
* Remove more uses of vector to pointer implicit conversionslloyd2010-09-136-18/+38
|
* More vector->pointer conversion removals.lloyd2010-09-131-3/+3
| | | | | | | | | | | Add RandomNumberGenerator::random_vec, which takes an length n and returns a new SecureVector with randomized contents of that size. This nicely covers most of the cases where randomize was being called on a vector, and is a little cleaner in the code as well, instead of vec.resize(length); rng.randomize(&vec[0], vec.size()); we just write vec = rng.random_vec(length);
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-1315-18/+18
| | | | | 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-0715-25/+25
| | | | | | | | | | | | | | 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.
* Also allow clang with 32-bit assembly code, everything seems to worklloyd2010-08-084-75/+0
| | | | fine with latest SVN.
* Clang understands at least some GCC inline asm syntax as well as whatlloyd2010-08-081-0/+1
| | | | an .S file is, so allow it for x86-64. Tested/works with Clang SVN.
* Consolidate the two engines that provided assembler implementationslloyd2010-07-131-1/+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.
* For the SHA-2 classes, don't use inheritence to share a handful oflloyd2010-06-284-85/+106
| | | | | things, just share the compression function via an anon namespace member, and replicate the simple stuff like copy_out.
* Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-1/+1
|
* Yet more Doxygen commentslloyd2010-06-162-6/+18
|
* More Doxygen commentslloyd2010-06-167-2/+32
|
* Tiger::clone's result always used 3 passeslloyd2010-06-161-1/+5
|
* More Doxygenlloyd2010-06-153-4/+18
|
* More Doxygen updates/fixeslloyd2010-06-1519-32/+44
|
* More Doxygen fixeslloyd2010-06-151-2/+3
|
* Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-079-9/+9
| | | | | This caused Doxygen to think this was markup meant for it, which really caused some clutter in the namespace page.
* Remove FORK-256; it's obscure and has been definitively broken.lloyd2010-05-253-189/+0
| | | | | More commentary posted to the list: http://lists.randombit.net/pipermail/botan-devel/2010-May/001123.html
* Check to make sure the user didn't provide two of the same has forlloyd2010-04-231-0/+3
| | | | | | Comb4P. If you do this, the first N bytes are all zero, which could expose some problems, especially if the caller truncates or is relying on Comb4P acting like a random function.
* Remove some C-style castslloyd2010-04-231-1/+1
|
* Comb4P: hashes must be the same lengthlloyd2010-04-221-2/+0
|
* Add Comb4P hash combiner, as described in Anja Lehmann's thesis.lloyd2010-04-173-0/+152
|