| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Now modules default to internal headers instead of defaulting to public; making
a new public API should be a visible and intentional choice.
Brings the public header count from over 300 to around 150.
Also removes the deprecated tls_blocking interface
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is as if --single-file-amalgamation was always used, except
also now botan_all_internal.h is not created.
This effectively drops support for very old GCC/Clang in the
amalgamation (only). GCC 5+ and Clang 3.8+ support the target
attribute and work fine. MSVC not affected since it doesn't need
such attributes in the first place.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Closes GH #1557
|
|
|
|
| |
Interleaving operations improves SM4/CTR from 26 cpb to 18 cpb
|
|
|
|
| |
Tested in qemu
|
|
|
|
|
| |
Previously calling update or encrypt without calling set_key first
would result in invalid outputs or else crashing.
|
|
|
|
|
|
|
|
|
| |
Using a larger table helps quite a bit. Using 4 tables (ala AES T-tables)
didn't seem to help much at all, it's only slightly faster than a single
table with rotations.
Continue to use the 8 bit table in the first and last rounds as a
countermeasure against cache attacks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
ISO C++ reserves names with double underscores in them
Closes #512
|
| |
|
|
This work was sponsored by Ribose Inc
|