aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sha3
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate many publically available headersJack Lloyd2019-09-062-0/+3
|
* Fix conflict when BMI2 is enabled and --single-amalgamation-fileJack Lloyd2019-06-191-3/+3
| | | | Not sure why this wasn't causing an error in the MSVC CI builds.
* Make the ISA list a listJack Lloyd2019-04-171-1/+3
|
* Unroll SHA-3Jack Lloyd2019-02-212-132/+158
| | | | Improves performance by about 10-12%
* Add BMI2 variants for SHA-512 and SHA-3Jack Lloyd2019-01-184-0/+136
| | | | 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 message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-131-2/+2
|
* 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-301-2/+1
|
* 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-302-6/+25
| | | | Inspired by #1433
* Add compile-time rotation functionsJack Lloyd2017-10-121-29/+29
| | | | | | | | | | | | | | | | | 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.
* Use explicit on more single-argument constructorsJack Lloyd2017-09-301-1/+1
|
* Header file cleanupsJack Lloyd2017-09-211-1/+0
| | | | Some help from include-what-you-use
* 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-5/+5
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Add HashFunction::copy_stateJack Lloyd2017-05-222-0/+6
| | | | See GH #1037
* 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-53/+53
| | | | | | 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 SHAKE-128 and SHAKE-256 as hash functionsJack Lloyd2016-11-102-34/+76
|
* Add proper SHA-3Jack Lloyd2016-10-193-0/+300
Kind of a copy and paste of Keccak, but only a single copy of the permutation at least. Keccak depends on SHA-3 instead of the reverse, so that SHA-3 can be enabled without also bringing in an unapproved hash function. Updates newhope code and removes API function newhope_hash which was an unofficial SHA-3-256.