aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Fix incorrect password truncation in bcrypt password hashing.Jack Lloyd2017-03-241-7/+11
| | | | | | | | | | The 56 char bound is bogus; Blowfish itself allows at most 448 bits in the key schedule, but Bcrypt's modification allows up to 72 chars for the password. Bug pointed out by Solar Designer. Also reject work factors 0...3 since all other extant bcrypt implementations require at least work factor 4. Adds more bcrypt tests generated by crypt_bcrypt and OpenBSD's version.
* Remove some commented out code from NoekeonJack Lloyd2017-01-281-13/+0
| | | | | | It was bogus and so potentially confusing [ci skip]
* Add BOTAN_UNUSED in creator functionsJack Lloyd2017-01-271-0/+3
| | | | | | If all (say) stream ciphers are disabled, avoid unused arg warning. [ci skip]
* Fix various SunCC and Solaris warnings and build problems.Jack Lloyd2017-01-244-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | Based on build output sent by @noloader. If RLIMIT_MEMLOCK is not defined, assume regular user is not able to call mlock. This probably also affected Clang/GCC on Solaris. Work around resolution issue in SIMD_4x32 where it finds ambiguity between arg taking uint32_t and __m128i. This is probably some artifact of how SunCC represents vector types, and seems highly bogus in general but is easy to work around here. Change constructor taking a single value to instead be `SIMD_4x32::splat` function. The SIMD class is internal, so no API implications. Fix various warnings about lambda functions that were missing return types and which were not a single return statement. AIUI C++11 doesn't guarantee that lambda return type will be deduced in that situation, though in practice every compiler including SunCC seems to handle it. Disable AVX2 usage, since SunCC's intrinsics seem to be broken - its _mm_loadu_si256 takes non-const pointer. Rename a few variables in the tests to avoid shadowed var warnings.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1848-702/+702
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Fix clang-analyzer warning in AES codeJack Lloyd2016-12-161-6/+4
| | | | | | The previous assert had been already put there for the benefit of clang-analyzer, but in Clang 3.9 it does not help. Instead test X value directly, which works.
* Remove <source> block from info.txt filesJack Lloyd2016-12-082-8/+0
| | | | | | Kind of a vestigial thing from an earlier iteration of the module design, and never useful to specify anymore since taking all the cpp files is what you want exactly 100% of the time.
* Inline Twofish::rs_mul into its only callerJack Lloyd2016-12-082-24/+19
|
* Rename Serpent SIMD and Twofish SBOX source filesJack Lloyd2016-12-082-0/+0
| | | | Some attempt at consistency
* Add Cilk/OpenMP supportJack Lloyd2016-11-2611-251/+204
|
* Remove blowfish table source file.Jack Lloyd2016-11-031-190/+0
| | | | | Split commit with 4c777878 because, no git, I did not rename blfs_tab.cpp -> blowfish.cpp
* Inline Blowfish tables to blowfish.cppJack Lloyd2016-11-032-3/+182
| | | | Only needed there.
* Move ISA optimized versions under the main algo dirJack Lloyd2016-11-0312-8/+0
| | | | | | | | Previously it made sense for them to be in distinct dirs because they were standalone. However with #580 that is no longer the case, so move them to subdirs. Configure knows that anything underneath a directory has a dependency on the parent dir, so update info.txt files accordingly to remove explicit dependencies where set.
* Remove alias logic from SCAN_NameJack Lloyd2016-10-211-30/+30
| | | | | | This required taking a global lock and doing a map lookup each time an algorithm was requested (and so many times during a TLS handshake).
* Remove Algo_RegistryJack Lloyd2016-10-216-96/+184
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Improve block doxygen [ci skip]René Korthaus2016-10-191-3/+6
|
* Add ISA annotations to functions using SIMD, AES, etcJack Lloyd2016-10-144-0/+39
| | | | | | | | Also emit `#pragma GCC target` in the ISA specific amalgamation files. This allows compiling without any special compiler flags, at least with GCC 6.2 and Clang 3.8. The ISA annotations are ignored in MSVC, which just emits whatever instruction the intrinsic requires.
* Missing inline specifierJack Lloyd2016-10-021-1/+1
|
* Change T::provider to return std::stringJack Lloyd2016-09-1511-16/+15
|
* Add T::provider() to allow user to inquire about implementation usedJack Lloyd2016-09-1511-0/+88
| | | | | For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage.
* Add cpuid overload to test frameworkJack Lloyd2016-09-151-3/+3
|
* Merge optimized implementations into base classJack Lloyd2016-09-1526-633/+413
| | | | | | | | | | Various algorithms had an optimized implementation (for SSE2, AVX2, etc) which was offered alongside the 'base' implementation. This is admittedly very useful for testing, but it breaks user expectations in bad ways. See GH #477 for background. Now encrypting with `AES_128` (say) just runs whatever implementation is best on the current processor/build.
* These vectors can be constJack Lloyd2016-09-091-2/+2
|
* Remove XTEA SIMD implJack Lloyd2016-09-023-165/+0
| | | | | Testing showed no actual speedup on either i7 (SSE2) or POWER7 (Altivec), so it is just dead weight.
* Remove deprecated ciphers MARS, RC2, RC5, RC6, SAFER-SK and TEAJack Lloyd2016-09-0219-1478/+0
| | | | | XTEA was also deprecated but has been spared, it does seem to be somewhat common (eg, included in the Go x/crypto library)
* Threefish-512 AVX2 optimizationsJack Lloyd2016-08-101-76/+165
| | | | | | | | | | | Remove loop variable R, instead derive from macro param constant Support 2 block parallel decrypt, improves raw perf from 456 MB/s to 710 MB/s for decrypt. Switch to alternate key schedule for encrypt. Uses 3 ymm registers instead of 9 at the cost of more computation. Not much faster on Skylake, unclear if this is worthwhile.