aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Add API stability annotations.Jack Lloyd2017-09-1920-26/+26
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Small simplification in CAST-128Jack Lloyd2017-09-161-41/+41
|
* Add support for AES extensions on ARMv8Jack Lloyd2017-09-034-0/+367
| | | | Based on the patch in GH #1146
* Fix various MSVC warningsJack Lloyd2017-08-312-2/+6
| | | | Based on VC2017 output
* Cleanup ARIAJack Lloyd2017-08-232-379/+251
| | | | Remove NEON support, replace macros with inlines
* Add ARIA Block Cipher (GH #1004)Jeffrey Walton2017-08-234-0/+738
|
* Remove BOTAN_PARALLEL_FOR from T-table AESJack Lloyd2017-08-221-1/+1
| | | | GH #1077
* In SHACAL2 be smarter about how the round keys are loadedJack Lloyd2017-08-161-9/+15
| | | | | | Using _mm_set_epi32 caused 2 distinct (adjacent) loads followed by an unpack to combine the registers. Have not tested on hardware to see if this actually improves performance.
* Optimize SHACAL2Jack Lloyd2017-08-162-46/+20
| | | | | | Combine several shuffle operations into one. Thanks to jww for the hint. Probably not noticably faster on any system.
* Add 2x unrolling for SHACAL2 on x86Jack Lloyd2017-08-141-2/+71
|
* Add support for SHACAL2 using x86 SHA extensionsJack Lloyd2017-08-144-0/+109
|
* Notify callers of parallel ops for AES, IDEA, Noekeon, SHACAL2 and ThreefishJack Lloyd2017-08-1410-0/+85
|
* Pass by reference for MSVC x86Jack Lloyd2017-08-141-6/+8
| | | | | It complains it cannot pass the __m128i without loss of alignment. (Why, I have no idea.)
* Add SHACAL2 in generic SIMDJack Lloyd2017-08-134-0/+157
| | | | Bit over 2x faster on my desktop
* Add SHACAL2Jack Lloyd2017-08-134-0/+220
| | | | 256 bit ARX block cipher with hardware support, what's not to love.
* Add SM4 block cipherJack Lloyd2017-06-164-0/+208
| | | | This work was sponsored by Ribose Inc
* Handle IV carryover in CBC, CFB, and stream ciphersJack Lloyd2017-05-131-0/+12
| | | | | | Allow an empty nonce to mean "continue using the current cipher state". GH #864
* Content:Tomasz Frydrych2017-04-031-1/+1
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-0224-25/+72
|