aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/gost_28147
Commit message (Collapse)AuthorAgeFilesLines
* Remove SecureBuffer, which is the fixed-size variant of SecureVector.lloyd2010-03-231-3/+3
| | | | | | | | | | | | | | 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
* 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).
* Add missing BOTAN_DLL exports.lloyd2009-12-161-3/+1
| | | | Move most of the engine headers to internal
* 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-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.
* Remove add blocks from block cipher info fileslloyd2009-09-291-7/+0
|
* Make encrypt_n public for all BlockCipher implementations - unlike thelloyd2009-08-111-2/+3
| | | | | | enc/dec functions it replaces, these are public interfaces. Add the first bits of a SSE2 implementation of Serpent. Currently incomplete.
* Change the BlockCipher interface to support multi-block encryption andlloyd2009-08-112-30/+41
| | | | | | | | | decryption. Currently only used for counter mode. Doesn't offer much advantage as-is (though might help slightly, in terms of cache effects), but allows for SIMD implementations to process multiple blocks in parallel when possible. Particularly thinking here of Serpent; TEA/XTEA also seem promising in this sense, as is Threefish once that is implemented as a standalone block cipher.
* Clean up the GOST_2ROUND macro a bit. Put in do/while block so it is alloyd2009-04-071-7/+8
| | | | statement (at least as far as the calling code is concerned)
* Hide the declarations of the GOST sboxes inside the Param constructor sincelloyd2009-04-012-25/+26
| | | | | that is the only code that needs to see them. Record the name in the Param object.
* Add support for multiple Sbox parameter sets in the GOST 28147-89 ↵lloyd2009-03-312-17/+71
| | | | | | | | implementation. In addition to the GOST 34.11 test parameters (used in Crypto++ among other things), the GOST 34.11 CryptoPro parameters (used in implementations of the GOST hash function) are now supported.
* Partially unroll the round structure, enough so that the subkey accesseslloyd2009-03-312-36/+40
| | | | | | | can be done directly, so there is no need to copy the key several times for the key schedule (since the GOST 'key schedule' is very simple and the access pattern can now be directly inserted into the code). Looks to be about 10% faster on my Core2, as well.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-302-0/+4
| | | | | | | | | | | | | | | 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).
* Compile fix: missing a commalloyd2009-03-271-1/+1
|
* GOST was using a completely non-standard set of sboxes. Change it to uselloyd2009-03-273-0/+152
GostR3411_94_TestParamSet, this is compatible with the implementations in Crypto++ and OpenSSL. This is not backwards compatible, though once the implementation supports multiple param sets (which is required, unfortunately, for compatability with various standards by CryptoCom, who have defined not one but at least 4 (!!!) different sboxes to use with GOST), I may offer Botan's previous sbox set as an option. Since adding the GOST hash function (34.11) and signing algorithm (34.10) are on the long term agenda (request by Rickard Bondesson, as the Russian authorities want to use their local standards for their DNSSEC use), I renamed the block cipher class (which had been just 'GOST') to GOST_28147_89 to minimize future name clashes.