aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sm3
Commit message (Collapse)AuthorAgeFilesLines
* Interleave SM3 message expansionJack Lloyd2017-10-121-141/+142
| | | | Reduces stack usage and a bit faster
* Add compile-time rotation functionsJack Lloyd2017-10-121-62/+62
| | | | | | | | | | | | | | | | | 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.
* Unroll SM3 compression functionJack Lloyd2017-10-101-56/+94
|
* Remove protected functions from final classesJack Lloyd2017-10-021-2/+1
| | | | | | Mostly residue from the old system of splitting impls among subclasses Found with Sonar
* 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
* More annotationsJack Lloyd2017-09-191-1/+1
|
* Cleanups in SM3 codeJack Lloyd2017-06-291-81/+25
| | | | | | | | T[] variable is actually a constant, so precompute it in SM3_TJ W1 expansion is very simple and can just be done inline. Somewhat faster on my machine.
* Add HashFunction::copy_stateJack Lloyd2017-05-222-0/+6
| | | | See GH #1037
* Re-roll two loops in SM3 hash compression function that are causing test ↵Daniel Wyatt2017-04-041-94/+32
| | | | failures for some compilers.
* Unroll loops in SM3 hash compress_n.Daniel Wyatt2017-04-032-65/+241
|
* Fix info.txt date and update to new format.Daniel Wyatt2017-04-031-1/+3
|
* Add SM3 hash functionDaniel Wyatt2017-04-033-0/+207