| 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
|
| |
|
| |
|
|
|
|
| |
Merge xmss_privatekey.h and xmss_publickey.h -> xmss.h
|
| |
|
|
|
|
|
|
| |
This is nominally a SemVer break but there is no legit use for these
APIs by applications, and most of them were not even exported via
visibility attributes.
|
|
|
|
|
| |
Deprecate asn1_str.h asn1_time.h asn1_oid.h and alg_id.h with all
contents moved to existing asn1_obj.h
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately GCC's UbSan errors out when we cast the function
pointer derived from XMSS_Common_Ops as a XMSS_PrivateKey::*
then use an XMSS_PrivateKey* as this. Clang accepts it.
Curiously, it works in GCC if we use an XMSS_Common_Ops::* instead,
but Clang rejects that at compile time.
Short of compiler specific logic which is probably fragile, just
make everything from XMSS_Common_Ops static instead of being
inherited.
|
|
|
|
|
|
|
|
| |
Not actually useful for the most part but it ensures everything builds
in a no-filesystem environment which is useful.
Add a OS feature for atomic operations since these aren't necessarily
available.
|
| |
|
| |
|
|
|
|
| |
Flagged by Coverity.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Since draft6 and final RFC are not compatible ...
|
|
|
|
|
|
| |
Explicitly choose the correct size() method for
the key size check during XMSS_PublicKey and
XMSS_PrivateKey construction.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Internally XMSS uses a 64 Bit type for the leaf index.
This patch removes the four leading zero bytes from the
XMSS leaf index and serializes it as a four byte value
as described in RFC 8391.
Test cases are adjusted accordingly.
The 64 Bit type is kept internally which potentially
allows for code reuse when implementing XMSS^MT on top
of the current XMSS code.
|
| |
|
| |
|
|
|
|
|
| |
Changes XMSS and XMSS WOTS algorithm names and OIDs to correspond
to RFC 8391.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* i7-6700K (4 core w/SMT): 10% improvements
* Ryzen 7 2700 (8 core w/SMT): 25% improvement except SHA-256
which is over twice as fast.
* POWER8 (160 cores w/SMT): between 25 and 60% faster
|
|
|
|
|
|
|
|
|
| |
This makes the meaning and usage more clear.
Add a specific error type so invalid tags can be distinguished without
having to catch that specific type.
See also #1813
|
|
|
|
| |
No real bugs, but pointed out some odd constructs and duplicated logic
|
|
|
|
| |
static_casts for the compiler god
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid throwing base Botan::Exception type, as it is difficult to
determine what the error is in that case.
Add Exception::error_code and Exception::error_type which allows
(for error code) more information about the error and (for error type)
allows knowing the error type without requiring a sequence of catches.
See GH #1742
|
|
|
|
| |
Implements the correct signature size calculation for XMSS, required by #1641.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the core hotspot of XMSS signatures. Avoiding the
secure_vector allocation for the PRF output improves performance
quite noticably.
Before:
XMSS_SHA2-256_W16_H10 1940.74 ms/op
XMSS_SHA2-512_W16_H10 3985.98 ms/op
XMSS_SHAKE128_W16_H10 1910.48 ms/op
XMSS_SHAKE256_W16_H10 4074.65 ms/op
After:
XMSS_SHA2-256_W16_H10 1204.34 ms/op
XMSS_SHA2-512_W16_H10 2498.17 ms/op
XMSS_SHAKE128_W16_H10 1176.55 ms/op
XMSS_SHAKE256_W16_H10 2689.76 ms/op
|
|
|
|
|
|
|
|
|
|
| |
Prior to this patch the sanity check for XMSS leaf indices was wrongly based on
the tree height. As a result only half of the one-time keys could be used.
Instead base leaf index sanity check on the number of levels in a tree which
equals tree height + 1.
(see also: https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12#section-4.1.1)
|
|
|
|
| |
GH #1537
|
|\ |
|
| |
| |
| |
| | |
- Removes overload `XMSS_Hash::h_msg_update(secure_vector<uint8_t>&)`
|
| |
| |
| |
| |
| |
| | |
Codecov does not reach all parts of the `XMSS_PrivateKey` code because too few
cores are detected during the CI run. To cover the missed codepaths always
return a large enough core count if botan is compiled with coverage.
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
- Fixes out of bounds read in `XMSS_Signature` constructor when the raw
signature data supplied as arguments is shorter than the signature size
defined by the XMSS parameter set encoded in the `XMSS_PublicKey`.
- Fixes valid signatures with arbitrary appended data to be verified as
correct signature.
|
|/
|
|
|
| |
Getting this value will typically require either a system call or
a cpuid call, both of which are fairly expensive.
|
| |
|
|
|
|
| |
Just needed for the self-benchmark easier to just use fixed input.
|