aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes
Commit message (Collapse)AuthorAgeFilesLines
* Inline all of the AES tables into an anon namespace in aes.cpp. Turns outlloyd2009-11-113-411/+399
| | | | to give a 3-7% speed improvement on Core2 with GCC.
* 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-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.
* Disable prefetch in AES for now. Problem: with iterative modes like CBC,lloyd2009-09-301-8/+0
| | | | | | | | the prefetch is called for each block of input, and so a total of (4096+256)/64 = 68 prefetches are executed for each block. This reduces performance of iterative modes dramatically. I'm not sure what the right approach for dealing with this is.
* Use prefetching in AES. Nominally, this will help somewhat with preventinglloyd2009-09-291-0/+8
| | | | | | | | | | timing attacks, since once all the TE/SE tables are entirely in cache then timing attacks against it become somewhat harder. However for this to be a full defense it would be necessary to ensure the tables were entirely loaded into cache, which is not guaranteed by the normal SSE prefetch instructions. (Or prefetch instructions for other CPUs, AFAIK). Much more importantly, it provides a 10% speedup.
* Remove add blocks from block cipher info fileslloyd2009-09-291-8/+0
|
* Make encrypt_n public for all BlockCipher implementations - unlike thelloyd2009-08-111-2/+4
| | | | | | 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-130/+142
| | | | | | | | | 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.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-303-6/+12
| | | | | | | | | | | | | | | 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).
* Add a comment WRT timing attacks on the AES implementationlloyd2008-11-191-0/+14
|
* Optimize AES decryption in the same manner as the last changes to AES ↵lloyd2008-11-172-41/+44
| | | | encryption.
* Optimize the first round of AES, currently in the encryption direction only.lloyd2008-11-172-37/+47
| | | | | | | | | | | This seems to have a significant impact on overall speed, now measuring on my Core2 Q6600: AES-128: 123.41 MiB/sec AES-192: 108.28 MiB/sec AES-256: 95.72 MiB/sec which is roughly 8-10% faster than before.
* Optimize AES decryption in the same way.lloyd2008-11-171-27/+34
|
* Fix indexing in EK_[4-7]lloyd2008-11-171-4/+4
|
* Move the loads of AES::EK to the top of the loop.lloyd2008-11-171-8/+18
| | | | | | | | | | | | Before: $ ./check --bench-algo=AES-128,AES-256 --seconds=10 AES-128: 101.99 MiB/sec AES-256: 78.30 MiB/sec After: $ ./check --bench-algo=AES-128,AES-256 --seconds=10 AES-128: 106.51 MiB/sec AES-256: 84.26 MiB/sec
* Format block comments for Doxygenlloyd2008-11-172-56/+64
|
* Rename SymmetricAlgorithm::key to key_schedule to avoid many namelloyd2008-11-092-2/+2
| | | | conflicts/collisions
* Split ciphers into block and stream ciphers. Move base class headerslloyd2008-11-084-0/+697