aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/ctr
Commit message (Collapse)AuthorAgeFilesLines
* Add deleted copy constructors/assignment operators where appropriate.lloyd2012-07-101-0/+4
| | | | | Replace C++98 style private copy constructors/assignment ops with ones annotated with delete.
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-181-1/+1
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-181-1/+1
| | | | | | 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.
* 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.
* PR 145 was based around an easy misunderstanding of the CTR code.lloyd2011-04-051-10/+16
| | | | | | Add some comments to help explain what is going on. Also add a test using 512 blocks; all the existing ones were shorter, so increment was not being tested at all. :(
* Use size_t rather than u32bit for loop variableslloyd2011-02-161-2/+2
|
* Unusedlloyd2010-10-291-2/+0
|
* Always do 256 blocks at a time in CTR, makes increment easierlloyd2010-10-291-23/+14
|
* Use u32bit herelloyd2010-10-291-4/+4
|
* Eliminate the constant size_t values in SymmetricAlgorithm that givelloyd2010-10-282-5/+6
| | | | | | | | | | | | | | | | | | | the parameters of the key length. Instead define a new function which returns a simple object which contains this information. This definitely breaks backwards compatability, though only with code that directly manipulates low level objects like BlockCipher*s directly, which is probably relatively rare. Also remove some deprecated accessor functions from lookup.h. It turns out block_size_of and output_size_of are being used in the TLS code; I need to remove them from there before I can delete these entirely. Really that didn't make much sense, because they assumed all implementations of a particular algorithm will have the same specifications, which is definitely not necessarily true, especially WRT key length. It is much safer (and probably simpler) to first retrieve an instance of the actual object you are going to use and then ask it directly.
* s/BLOCK_SIZE/block_size()/lloyd2010-10-132-8/+9
|
* Use size_t rather than u32bit in SymmetricAlgorithmlloyd2010-10-132-2/+2
|
* s/u32bit/size_t/ in streamlloyd2010-10-132-11/+11
|
* More changes to avoid vector to pointer implicit conversionslloyd2010-09-141-2/+2
|
* Remove more uses of vector to pointer implicit conversionslloyd2010-09-131-1/+1
|
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-131-3/+4
| | | | | 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-3/+3
| | | | | | | | | | | | | | 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.
* More Doxygen commentslloyd2010-06-161-1/+4
|
* More Doxygen updates/fixeslloyd2010-06-151-2/+2
|
* Change BlockCipher::parallelism() to return the native parallelism oflloyd2010-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | the implementation rather than the preferred one. Update all implementations. Add a new function parallel_bytes() which returns parallelism() * BLOCK_SIZE * BUILD_TIME_CONSTANT This is because i noticed all current calls of parallelism() just multiplied the result by the block size already, so this simplified that code. The build time constant is set to 4, which was the previous default return value of parallelism(). However the SIMD versions returned 2*native paralellism rather than 4*, so this increases the buffer sizes used for those algorithms. The constant multiple lives in buildh.in and build.h, and is named BOTAN_BLOCK_CIPHER_PAR_MULT.
* Instead of the mode parallelism being specified via macros, have itlloyd2010-02-251-2/+2
| | | | | | | | | depend on the particular implementation. Add a new virtual function to BlockCipher named parallelism that returns the number of blocks the cipher object could or might want to process in parallel. Currently set to 1 by default but may make sense to increase this for even scalar implementations since it seems like better caching behavior makes it a win.
* 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.
* Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-161-7/+0
|
* Rename/remove some secmem member variables for better matching with STLlloyd2009-11-171-2/+2
| | | | | | | | containers (specifically vector). Rename is_empty to empty Remove has_items Rename create to resize
* Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-291-3/+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.
* Similiar treatment for OFB which is also just a plain stream cipherlloyd2009-10-141-0/+1
|
* Convert CTR_BE from a Filter to a StreamCipher. Must wrap in a ↵lloyd2009-10-143-0/+205
StreamCipher_Filter to pass it directly to a Pipe now.