aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sha2_32
Commit message (Collapse)AuthorAgeFilesLines
* Add BMI2 variants for SHA-512 and SHA-3Jack Lloyd2019-01-182-0/+44
| | | | Both about 33% faster on Skylake
* Avoid including rotate.h in bswap.hJack Lloyd2018-12-211-0/+1
| | | | | | | It was only needed for one case which is easily hardcoded. Include rotate.h in all the source files that actually use rotr/rotl but implicitly picked it up via loadstor.h -> bswap.h -> rotate.h include chain.
* 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%.
* ABI for Aarch64 cryptoJack Lloyd2018-01-121-4/+1
|
* Add missing ISA annotationsJack Lloyd2018-01-042-1/+2
| | | | Lack of these broke single file amalgamation (GH #1386)
* Rename SSE4.x names to avoid underscoresJack Lloyd2017-12-111-1/+1
| | | | | | 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-111-1/+1
| | | | Simplifies macro generation
* Convert http:// links to https:// where possibleJack Lloyd2017-10-241-1/+1
|
* Add compile-time rotation functionsJack Lloyd2017-10-121-4/+4
| | | | | | | | | | | | | | | | | 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.
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-2/+2
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Use native compiler versioning of MSVCSimon Warta2017-07-311-1/+1
| | | | | | | | | | | | | | | | While using marketing names like 2013, 2015 etc. is more convenient at first sight, it requires keeping a table about all supported compiler versions, as there is no formular to calculate between the representations. Keeping a list of compilers leads to the following issue: if one version of Botan is released in 2017, requiring MSVS 2015 for one module, this source can be compiled using MSVS 2015 and 2017 but not a future version like 2019. Also preview/development versions of MSVC that may use an intermediate version number cannot be handled with the marketing name table because they may be unknown to the general public.
* Maintainer mode fixes: old style casts, missing override, unused functionsJack Lloyd2017-06-082-34/+11
|
* fix doxygen build: hide method definitions with ifdefs where theZoltan Gyarmati2017-06-082-0/+4
| | | | | | | function declaration is already hidden, fix some param names in doxygen comments, fixes #1067 This work was sponsored by Ribose Inc (@riboseinc).
* Merge GH #1056 Add HashFunction::copy_state and port to OpenSSL 1.1.0Jack Lloyd2017-05-222-0/+37
|\
| * Add HashFunction::copy_stateJack Lloyd2017-05-222-0/+12
| | | | | | | | See GH #1037
* | Disable ARMv8 SHA extensions on 32-bitJack Lloyd2017-05-221-1/+1
| | | | | | | | | | | | | | Works everywhere but Apple Clang. Could handle this with a hack to configure but running ARMv8 in 32-bit mode is rare and suboptimal, and it would be better to deal with this using compile-time feature detection.
* | Change SHA-2 to use a single convention for CPU extnJack Lloyd2017-05-203-9/+8
| |
* | Set minimum compiler versions for ARMv8 SHA intrinsicsJack Lloyd2017-05-201-0/+5
| |
* | Small cleanups for ARM SHA codeJack Lloyd2017-05-202-8/+12
| | | | | | | | | | | | | | Fix for new define syntax, remove old style casts. Add some randomly generated longer SHA-256 vectors, previously had precisely zero multiblock tests.
* | Add SHA-256 using ARMv8 instructionsJack Lloyd2017-05-204-35/+240
|/ | | | Based on patch from Jeffrey Walton in GH #841
* Set minimum compiler versions for SHA intrinsicsJack Lloyd2017-05-191-0/+6
|
* Add support for Intel SHA-1/SHA-2 instructionsJack Lloyd2017-05-194-1/+232
| | | | Based on GH #807 and #808
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-021-1/+3
|
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-182-31/+31
| | | | | | 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.
* Add final attribute to many classesJack Lloyd2016-01-101-2/+2
| | | | | | | In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
* Mass-prefix member vars with m_René Korthaus2016-01-082-24/+24
|
* Internal header cleanupsJack Lloyd2015-09-191-1/+0
| | | | Only user-visible change is the removal of get_byte.h
* Fix static lib registration for block, hash, mac, stream, kdfJack Lloyd2015-09-101-3/+0
| | | | | | | | | | | The support problems from having static libraries not work in the obvious way will be endless trouble. Instead have each set of registrations tag along in a source file for the basic type, at the cost of some extra ifdefs. On shared libs this is harmless - everything is going into the shared object anyway. With static libs, this means pulling in a single block cipher pulls in the text of all the them. But that's still strictly better than the amalgamation (which is really pulling in everything), and it works (unlike status quo).
* hash: Add missing overridesDaniel Seither2015-07-301-12/+12
|
* Use Algo_Registry also for hashes.lloyd2015-01-281-2/+4
|
* Ensure all files have copyright and license info.lloyd2015-01-102-2/+2
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add SHA-512/256lloyd2015-01-081-4/+2
| | | | | Define some new functions for copying out arrays of words and use them across hashes.
* Move lib into srclloyd2014-01-103-0/+292