aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add copyright + license on the new SIMD fileslloyd2009-10-284-2/+14
|
* Document SIMD changeslloyd2009-10-281-0/+2
|
* propagate from branch 'net.randombit.botan' (head ↵lloyd2009-10-2812-404/+1101
|\ | | | | | | | | | | bf629b13dd132b263e76a72b7eca0f7e4ab19aac) to branch 'net.randombit.botan.general-simd' (head f731cff08ff0d04c062742c0c6cfcc18856400ea)
| * Add an AltiVec SIMD_32 implementation. Tested and works for Serpent and XTEAlloyd2009-10-281-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on a PowerPC 970 running Gentoo with GCC 4.3.4 Uses a GCC syntax for creating literal values instead of the Motorola syntax [{1,2,3,4} instead of (1,2,3,4)]. In tests so far, this is much, much slower than either the standard scalar code, or using the SIMD-in-scalar-registers code. It looks like for whatever reason GCC is refusing to inline the function: SIMD_Altivec(__vector unsigned int input) { reg = input; } and calls it with a branch hundreds of times in each function. I don't know if this is the entire reason it's slower, but it definitely can't be helping. The code handles unaligned loads OK but assumes stores are to an aligned address. This will fail drastically some day, and needs to be fixed to either use scalar stores, which (most?) PPCs will handle (if slowly), or batch the loads and stores so we can work across the loads. Considering the code so far loads 4 vectors of data in one go this would probably be a big win (and also for loads, since instead of doing 8 loads for 4 registers only 5 are needed).
| * Define SSE rotate_right in terms of rotate left, and load_be in termslloyd2009-10-281-3/+2
| | | | | | | | of load_le + bswap
| * Add XTEA decryptionlloyd2009-10-261-11/+47
| |
| * Add subtraction operators to SIMD_32 classes, needed for XTEA decryptlloyd2009-10-262-0/+26
| |
| * Add a wrapper for a set of SSE2 operations with convenient syntax for 4x32lloyd2009-10-2611-404/+862
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operations. Also add a pure scalar code version. Convert Serpent to use this new interface, and add an implementation of XTEA in SIMD. The wrappers plus the scalar version allow SIMD-ish code to work on all platforms. This is often a win due to better ILP being visible to the processor (as with the recent XTEA optimizations). Only real danger is register starvation, mostly an issue on x86 these days. So it may (or may not) be a win to consolidate the standard C++ versions and the SIMD versions together. Future work: - Add AltiVec/VMX version - Maybe also for ARM's NEON extension? Less pressing, I would think. - Convert SHA-1 code to use SIMD_32 - Add XTEA SIMD decryption (currently only encrypt) - Change SSE2 engine to SIMD_engine - Modify configure.py to set BOTAN_TARGET_CPU_HAS_[SSE2|ALTIVEC|NEON|XXX] macros
* | Add missing log note for 1.9.1 change notes on CTR/OFB changelloyd2009-10-281-0/+1
| |
* | Indent fixlloyd2009-10-261-1/+1
|/
* Tick version to 1.9.2-devlloyd2009-10-263-4/+6
|
* Small cleanupslloyd2009-10-261-4/+3
|
* Add ; after call to VC++'s __cpuid, not a macrolloyd2009-10-252-7/+14
|
* Cast the u32bit output array to an int* when calling the VC++ intrinsic,lloyd2009-10-251-3/+6
| | | | | | | since it passes signed ints for whatever reason. Ensure CALL_CPUID is always defined (previously, it would not be if on an x86 but compiled with something other than GCC, ICC, VC++).
* Update docs for 1.9.1 release 2009-10-231.9.1lloyd2009-10-233-3/+4
|
* Kill stdio includelloyd2009-10-231-2/+0
|
* Use new load/store ops in xtea x4 codelloyd2009-10-231-12/+6
|
* Add new store_[l|b]e variants taking 8 values.lloyd2009-10-231-16/+108
| | | | | | Add new load options that are passed a number of variables by reference, setting them all at once. Will allow for batching operations (eg using SIMD operations to do 128-bit wide bswaps) for future optimizations.
* Simply unrolling the loop in XTEA and processing 4 blocks worth of data atlloyd2009-10-231-0/+70
| | | | | | | | a time more than doubles performance (from 38 MB/s to 90 MB/s on Core2 Q6600). Could do even better with SIMD, I'm sure, but this is fast and easy, and works everywhere. Probably will hurt on 32-bit x86 from the register pressure.
* Increase the internal buffer size of the Hex coder/decoder, and put it intolloyd2009-10-231-3/+5
| | | | | | | | | | | | | | a named constant instead of being magic. Move from 64 bytes to 256. This was necessary to allow Pipe(new Hex_Decoder, filter, ...) to give filter a sufficiently large input block. It would be nicer if the filter itself (in this case, ECB_Decryption, but others apply as well) was smart enough to buffer on its own. It might also be useful if code could query what parallelism a block cipher provided and modify their actions accordingly.
* Add TEA and XTEA ECB vectorslloyd2009-10-231-0/+650
|
* Add test vectors for TEA and XTEA in CTR modelloyd2009-10-231-0/+1242
|
* Note removing exception specs. Reorder by interestingnesslloyd2009-10-221-2/+3
|
* Remove all exception specifications. The way these are designed in C++ islloyd2009-10-22121-140/+140
| | | | | | 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.
* Reset version as 1.9.1-dev instead of -rc1lloyd2009-10-213-3/+3
|
* Enable CPUID on x86 (checking wrong macro name)lloyd2009-10-211-1/+1
|
* Disable tracebacklloyd2009-10-211-2/+2
|
* Format, add names to params in headerlloyd2009-10-191-3/+7
|
* Document Clang supportlloyd2009-10-191-1/+1
|
* Add theoreticaly support for Clang/LLVM. Current Gentoo clang ebuild doesn'tlloyd2009-10-191-0/+46
| | | | seem to work with C++ at all so untested.
* Be more forgiving of names passed with --cpulloyd2009-10-191-6/+9
|
* Also enable x86 asm word_addlloyd2009-10-151-8/+0
|
* Enable x86-64 asm word_addlloyd2009-10-151-8/+0
|
* merge of '5cfca720d4ca8d1e8f6946c7d9b4a8a6943094d0'lloyd2009-10-1531-432/+456
|\ | | | | | | and '8cc9c08544c0f1f1dba7c7a8da51d1657b1c7df8'
| * Similiar treatment for OFB which is also just a plain stream cipherlloyd2009-10-147-100/+148
| |
| * Convert CTR_BE from a Filter to a StreamCipher. Must wrap in a ↵lloyd2009-10-1411-217/+231
| | | | | | | | | | | | StreamCipher_Filter to pass it directly to a Pipe now.
| * Cleanups/random changes in the stream cipher code:lloyd2009-10-1414-111/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove encrypt, decrypt - replace by cipher() and cipher1() Remove seek() - not well supported/tested, I want to redo with a new interface once CTR and OFB modes become stream ciphers. Rename resync to set_iv() Remove StreamCipher::IV_LENGTH and add StreamCipher::valid_iv_length() to allow multiple IV lengths (as for instance Turing allows, as would Salsa20 if XSalsa20 were supported).
| * Fix some minor compilation issues in the exampleslloyd2009-10-143-4/+4
| |
* | Avoid using word_add() in gfp_element.cpp, actually more complex than necessary,lloyd2009-10-151-1/+3
|/ | | | and was tickling a bug in the asm versions because of the constant 0.
* Check for cipher_mode() being set; if it is, not an algo_factory algolloyd2009-10-131-0/+4
|
* propagate from branch 'net.randombit.botan.1_8' (head ↵lloyd2009-10-13303-5563/+9498
|\ | | | | | | | | | | c5ae189464f6ef16e3ce73ea7c563412460d76a3) to branch 'net.randombit.botan' (head e2b95b6ad31c7539cf9ac0ebddb1d80bf63b5b21)
| * Add a couple more Python examples and the very beginning of a manual/referencelloyd2009-10-103-0/+143
| | | | | | | | for the Python wrappers.
| * Remove redundant functionlloyd2009-10-091-10/+3
| |
| * Add PBKDF2 wrapperlloyd2009-10-091-0/+17
| |
| * Reasonably functional RSA support; keygen, import/export, encrypt/decrypt, ↵lloyd2009-10-095-156/+231
| | | | | | | | sign/verify
| * Tick timestamp in building.texlloyd2009-10-091-1/+1
| |
| * Bump version to 1.9.1-rc1lloyd2009-10-093-3/+3
| |
| * Remove unused arglloyd2009-10-091-3/+2
| |
| * Fix python install target. Add CryptoBox wrapper plus an examplelloyd2009-10-094-1/+60
| |
| * Ignore XS gooplloyd2009-10-091-0/+3
| |