aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for DES/3DESJack Lloyd2018-05-161-7/+7
|
* Unroll DES to encrypt/decrypt 2 rounds in parallelJack Lloyd2018-05-161-122/+198
| | | | About 50% faster for CBC decrypt
* Add message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-137-13/+14
|
* Minor tweaks for coverageJack Lloyd2018-03-101-4/+5
|
* Avoid warning in threefish.hJack Lloyd2018-03-101-6/+0
| | | | Causes a warning in amalgamation which is bad news
* Rename threefish module to threefish_512Jack Lloyd2018-03-067-6/+25
| | | | GH #1477
* Unroll ARMv8 AES instructions by 4 to allow pipeliningJack Lloyd2018-02-251-84/+307
| | | | Runs as much as 50% faster for bulk operations. Improves GCM by 10%
* Implement decryptionJack Lloyd2018-02-232-43/+148
|
* AES encryption using POWER8 intrinsicsJack Lloyd2018-02-234-0/+296
|
* Simplify IDEA key scheduleJack Lloyd2018-02-231-23/+28
|
* ABI for Aarch64 cryptoJack Lloyd2018-01-121-3/+1
|
* Make stream, block, hash and cipher mode base classes optionalJack Lloyd2018-01-121-0/+5
|
* Add missing ISA annotationsJack Lloyd2018-01-041-0/+1
| | | | Lack of these broke single file amalgamation (GH #1386)
* Enable using NEON on ClangJack Lloyd2017-12-101-4/+4
| | | | | Clang doesn't like the way SIMD shifts were implemented, I guess it fails to inline the constant. Make it a template parameter instead.
* Create two macros for CAST-128 vs CAST-256Jack Lloyd2017-12-032-2/+9
| | | | Since eventually CAST-256 is going away.
* Constify variables in AES-NI codeJack Lloyd2017-11-181-104/+104
|
* Optimize TwofishJack Lloyd2017-11-161-76/+156
| | | | | Interleaving two blocks is 40-50% faster for any mode that supports parallel operation.
* Correct CAST-128 decryption with more than 1 blockJack Lloyd2017-11-161-32/+32
|
* Optimizations for CAST-128Jack Lloyd2017-11-161-45/+135
| | | | | Similarly to Blowfish, 2x unrolling produces a 50-60% perf boost due to increased ILP.
* Optimize BlowfishJack Lloyd2017-11-161-41/+82
| | | | | | | Doing two blocks at a time exposes more ILP and substantially improves performance. Idea from http://jultika.oulu.fi/files/nbnfioulu-201305311409.pdf
* Format tweaksJack Lloyd2017-11-021-2/+2
|
* Avoid using semicolon at and of do { } while(0) macro block.Jack Lloyd2017-11-022-19/+19
| | | | Clearly I have a tic for this.
* Include <memory> in base type headersJack Lloyd2017-10-291-0/+1
| | | | Needed for the create calls
* Add checks that keyed algorithms are actually keyed before useJack Lloyd2017-10-2620-9/+99
| | | | | Previously calling update or encrypt without calling set_key first would result in invalid outputs or else crashing.
* Convert http:// links to https:// where possibleJack Lloyd2017-10-245-5/+5
|
* Correct usage of std::aligned_storageJack Lloyd2017-10-151-6/+6
| | | | This ended up allocating 256 KiB!
* Additional final annotationsJack Lloyd2017-10-152-4/+4
|
* Use overaligned storage for AES T-TableJack Lloyd2017-10-141-32/+56
| | | | | This improves performance by ~ .5 cycle/byte. Also it ensures that our cache reading countermeasure works as expected.
* Reduce AES to using a single T-tableJack Lloyd2017-10-131-127/+78
| | | | | | | | | Should have significantly better cache characteristics, though it would be nice to verify this. It reduces performance somewhat but less than I expected, at least on Skylake. I need to check this across more platforms to make sure t won't hurt too badly.
* Optimizations for SM4Jack Lloyd2017-10-131-35/+94
| | | | | | | | | Using a larger table helps quite a bit. Using 4 tables (ala AES T-tables) didn't seem to help much at all, it's only slightly faster than a single table with rotations. Continue to use the 8 bit table in the first and last rounds as a countermeasure against cache attacks.
* Swapped encrypt and decrypt in BlockCipher _xex functionsJack Lloyd2017-10-121-2/+2
| | | | | Missed by everything but the OCB wide tests because most ciphers have fixed width and get the override.
* Use SIMD for in ThreefishJack Lloyd2017-10-121-2/+2
| | | | GCC 7 can actually vectorize this for AVX2
* OCB optimizationsJack Lloyd2017-10-121-0/+39
| | | | From ~5 cbp to ~2.5 cbp on Skylake
* Add compile-time rotation functionsJack Lloyd2017-10-1218-196/+199
| | | | | | | | | | | | | | | | | The problem with asm rol/ror is the compiler can't schedule effectively. But we only need asm in the case when the rotation is variable, so distinguish the two cases. If a compile time constant, then static_assert that the rotation is in the correct range and do the straightforward expression knowing the compiler will probably do the right thing. Otherwise do a tricky expression that both GCC and Clang happen to have recognize. Avoid the reduction case; instead require that the rotation be in range (this reverts 2b37c13dcf). Remove the asm rotations (making this branch illnamed), because now both Clang and GCC will create a roll without any extra help. Remove the reduction/mask by the word size for the variable case. The compiler can't optimize that it out well, but it's easy to ensure it is valid in the callers, especially now that the variable input cases are easy to grep for.
* Address some bool/int conversion warnings from SonarJack Lloyd2017-10-061-1/+2
| | | | Nothing major but probably good to clean these up.
* Address various GCC warningsJack Lloyd2017-10-061-8/+8
| | | | | Things like -Wconversion and -Wuseless-cast that are noisy and not on by default.
* Remove redundant private: specifierJack Lloyd2017-10-031-1/+1
| | | | [ci skip]
* Remove redundant parensJack Lloyd2017-10-031-1/+1
| | | | Sonar
* Remove unnecessary virtuals from final classesJack Lloyd2017-10-021-2/+2
| | | | Found with Sonar
* Remove protected functions from final classesJack Lloyd2017-10-023-24/+2
| | | | | | Mostly residue from the old system of splitting impls among subclasses Found with Sonar
* Fix some cast warnings from SonarJack Lloyd2017-10-014-5/+5
|
* Remove unused namespaceJack Lloyd2017-09-301-4/+0
|
* Change this code so Sonar understands div by zero can't happenJack Lloyd2017-09-301-2/+3
|
* Use explicit on more single-argument constructorsJack Lloyd2017-09-301-1/+4
|
* Address some MSVC warningsJack Lloyd2017-09-301-2/+2
|
* Apply final annotations to the library alsoJack Lloyd2017-09-222-2/+2
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Header file cleanupsJack Lloyd2017-09-213-3/+0
| | | | Some help from include-what-you-use
* Correct an error in SHACAL2 x86 code in unrolled caseJack Lloyd2017-09-201-3/+3
| | | | [ci skip]
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2025-50/+50
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* More annotationsJack Lloyd2017-09-193-5/+5
|