aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash
Commit message (Collapse)AuthorAgeFilesLines
* Avoid calling memset, memcpy within library codeJack Lloyd2018-11-171-1/+3
| | | | | | | | | Prefer using wrappers in mem_utils for this. Current exception is where memcpy is being used to convert between two different types, since copy_mem requires input and output pointers have the same type. There should be a new function to handle conversion-via-memcpy operation.
* Fix some warnings in ARM specific codeJack Lloyd2018-10-011-12/+12
|
* Add support for hashing with CommonCryptoJose Pereira2018-09-031-3/+17
|
* Tiny optimization in MDx_HashFunction::final_resultJack Lloyd2018-05-281-2/+1
| | | | Typically not a bottleneck but this shows up in XMSS profiling
* Add BMI2-specific SHA-256Jack Lloyd2018-05-274-2/+167
| | | | | Currently just a copy of the baseline compression function, but compiled with BMI2 flags. On Skylake improves performance by about 40%.
* Add message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-131-2/+2
|
* Rename threefish module to threefish_512Jack Lloyd2018-03-062-2/+2
| | | | GH #1477
* Optimize SHA_3::expandJack Lloyd2018-01-311-15/+14
| | | | Noticable speedup for SHAKE esp with longer output lengths
* WhitespaceJack Lloyd2018-01-301-5/+5
|
* Use copy_out_vec_le instead of explicit loop in SHA-3 and KeccakJack Lloyd2018-01-302-4/+2
|
* Reorganize SHA-3 source file [ci skip]Jack Lloyd2018-01-301-35/+35
| | | | Put all the statics at beginning followed by member functions.
* Avoid allocating zero bytes for SHA-3 paddingJack Lloyd2018-01-304-27/+28
| | | | Inspired by #1433
* ABI for Aarch64 cryptoJack Lloyd2018-01-122-8/+2
|
* Make stream, block, hash and cipher mode base classes optionalJack Lloyd2018-01-122-0/+8
|
* Add missing ISA annotationsJack Lloyd2018-01-043-2/+3
| | | | Lack of these broke single file amalgamation (GH #1386)
* Avoid macros in Blake2b to workaround Visual C++ 2017 infinite loopJack Lloyd2017-12-301-39/+44
| | | | | Was fixed in 2017 SP1. Same bug hit Crypto++ - https://gihub.com/weidai11/cryptopp/issues/527
* Rename SSE4.x names to avoid underscoresJack Lloyd2017-12-112-2/+2
| | | | | | This breaks how we determine the ISA flags for amalgamation files. The code for doing that is kind of a hack but I don't want to mess with it right now, easier to just rename the ISA internally.
* Rename the SSE4 ISA extensionsJack Lloyd2017-12-112-2/+2
| | | | Simplifies macro generation
* Rename CRC24 tablesJack Lloyd2017-12-101-9/+9
| | | | These conflict with name of temp variables and MSVC gets noisy.
* Fix a typo in sha1_sse2.cppFelix Yan2017-12-031-1/+1
|
* Minor documentation fix in HashFunction::create_or_throw.Marcus Brinkmann2017-11-261-1/+1
|
* Merge GH #1281 CRC24 optimizationsJack Lloyd2017-10-292-67/+213
|\
| * CRC24 performance improvement (32 bits in parallel)Krzysztof Kwiatkowski2017-10-292-67/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Algorithm uses 4 tables of precalculated CRC24 values, thanks to which it can process in parallel 32 bits of data. This tric doubles performance Further improvements are possible. Results - (tested with RNP) processing 1GB armor data ``` OLD: rnp --enarmor=msg /tmp/1gb.rnd --output 4.48s user 0.89s system 98% cpu 5.429 total NEW: rnp --enarmor=msg /tmp/1gb.rnd --output 2.38s user 0.86s system 79% cpu 4.089 total OLD: rnp --dearmor out.xxx --output out.d 5.58s user 0.65s system 98% cpu 6.338 total NEW: rnp --dearmor out.xxx --output out.d 3.28s user 0.84s system 96% cpu 4.275 total ```
* | Include <memory> in base type headersJack Lloyd2017-10-291-0/+1
|/ | | | Needed for the create calls
* Fix build on 32-bitJack Lloyd2017-10-261-1/+1
|
* Avoid invalid iterator woesJack Lloyd2017-10-261-8/+18
|
* Blake2b optimizationsJack Lloyd2017-10-263-133/+94
| | | | | Nothing major but does improve perf for large buffers from 910 MB/s to 970 MB/s on Skylake.
* Convert http:// links to https:// where possibleJack Lloyd2017-10-242-2/+2
|
* Interleave SM3 message expansionJack Lloyd2017-10-121-141/+142
| | | | Reduces stack usage and a bit faster
* Add compile-time rotation functionsJack Lloyd2017-10-1211-370/+381
| | | | | | | | | | | | | | | | | 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.
* Merge GH #1248 Unroll SM3 compression loopJack Lloyd2017-10-111-56/+94
|\
| * Unroll SM3 compression functionJack Lloyd2017-10-101-56/+94
| |
* | Mark some functions of MDx_HashFunction finalJack Lloyd2017-10-051-3/+3
|/ | | | | The class itself can't be final but we can final the overrides from HashFunction, which helps the compiler devirtualize.
* Avoid empty methods, use =default or add a commentJack Lloyd2017-10-031-1/+1
| | | | Sonar
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-031-1/+1
| | | | | | | Generally speaking reinterpret_cast is sketchy stuff. But the special case of char*/uint8_t* is both common and safe. By isolating those, the remaining (likely sketchy) cases are easier to grep for.
* Remove protected functions from final classesJack Lloyd2017-10-023-6/+5
| | | | | | Mostly residue from the old system of splitting impls among subclasses Found with Sonar
* Fix some cast warnings from SonarJack Lloyd2017-10-011-1/+1
|
* Use explicit on more single-argument constructorsJack Lloyd2017-09-303-4/+4
|
* Apply final annotations to the library alsoJack Lloyd2017-09-222-3/+3
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Fix for minimized buildJack Lloyd2017-09-211-0/+1
|
* Header file cleanupsJack Lloyd2017-09-215-5/+0
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2023-46/+46
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* More annotationsJack Lloyd2017-09-192-4/+4
|
* Add API stability annotations.Jack Lloyd2017-09-1921-29/+29
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Fix Wshadow warningJack Lloyd2017-09-171-5/+5
|
* De-inline xor_buf, add SIMD and unrollingJack Lloyd2017-09-161-11/+24
| | | | Improves CBC and OCB performance with AES-NI quite noticably
* Rename file to match conventionsJack Lloyd2017-08-311-0/+0
| | | | [ci skip]
* More MSVC warnings fixesJack Lloyd2017-08-311-1/+1
|
* Fix various MSVC warningsJack Lloyd2017-08-311-6/+6
| | | | Based on VC2017 output
* Avoid math on booleansJack Lloyd2017-08-291-3/+3
| | | | Sonar find