aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/gost_3411/gost_3411.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-011-242/+0
|
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-181-2/+2
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* Remove all uses of MemoryRegion::copy outside of internal uses inlloyd2012-05-181-1/+1
| | | | secmem.h. Mostly replaced by assign or copy_mem.
* First step towards replacing the existing containers with std::vectorlloyd2012-05-181-2/+2
| | | | | | with a custom allocator; remove the 3 argument version of MemoryRegion::copy, replacing with freestanding buffer_insert function.
* Avoid more VC warningslloyd2010-12-131-1/+1
|
* Remove BufferedComputation::OUTPUT_LENGTHlloyd2010-10-291-1/+0
|
* Remove HashFunction::HASH_BLOCK_SIZE entirelylloyd2010-10-131-1/+1
|
* Remove most uses of HASH_BLOCK_SIZElloyd2010-10-131-6/+6
|
* Use size_t for BufferedComputation::add_datalloyd2010-10-121-7/+7
|
* Implicit conversionslloyd2010-09-141-7/+7
|
* Completely remove the second parameter to SecureVector which specifieslloyd2010-09-141-3/+6
| | | | | | | | | | | | | | | | | | | | 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.
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-131-3/+3
| | | | | 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.
* Remove SecureBuffer, which is the fixed-size variant of SecureVector.lloyd2010-03-231-2/+2
| | | | | | | | | | | | | | Add a second template param to SecureVector which specifies the initial length. Change all callers to be SecureVector instead of SecureBuffer. This can go away in C++0x, once compilers implement N2712 ("Non-static data member initializers"), and we can just write code as SecureVector<byte> P{18}; instead
* Line wraplloyd2010-03-021-6/+12
|
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-211-2/+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-3/+3
| | | | | | | | | | | | | 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.
* Conver the rest of the hash functions to use the array-based load instructions.lloyd2009-11-031-6/+2
| | | | | | | I'm not totally happy with this - in particular in all cases the size is a compile time constant - it would be nice to make use of this via tempalate metaprogramming. Also for matching endian loads, a straight memcpy would do the work, which would probably be even faster.
* 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.
* Add 'Distributed under...' text to files missing it. Some format cleanupslloyd2009-10-071-0/+2
|
* Many source files included bit_ops.h when what was really desired waslloyd2009-05-131-1/+1
| | | | | rotate.h, or when it was not needed at all. Remove or change the includes as needed.
* Use S2 instead of x,y vars as temps for single iteration of psilloyd2009-04-101-4/+4
|
* Fully expand the linear recurence phi - about twice as fast on my Core2lloyd2009-04-081-77/+80
|
* Expand the first 12 iterations of phi, though more simplification is needed.lloyd2009-04-071-2/+58
|
* Add the GOST 34.11 hash function. Pretty slow, but functional.lloyd2009-04-071-0/+177