aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss
Commit message (Collapse)AuthorAgeFilesLines
* Apply final annotations to the library alsoJack Lloyd2017-09-227-7/+7
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* More include header cleanupsJack Lloyd2017-09-216-4/+4
|
* Clean up header includesJack Lloyd2017-09-2115-31/+13
| | | | | | | Avoid including build.h or assert.h directly, instead always take them though types.h Avoid math.h in favor of cmath
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2022-44/+44
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-196-6/+6
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Clean up use of <limits> headerJack Lloyd2017-09-035-14/+3
| | | | Don't include it where it is not needed, included it where it is used.
* More MSVC warnings fixesJack Lloyd2017-08-311-1/+1
|
* Fix various MSVC warningsJack Lloyd2017-08-311-1/+1
| | | | Based on VC2017 output
* Fix warnings from clangs -Wdocumentation flagJack Lloyd2017-07-284-7/+3
|
* Content:Tomasz Frydrych2017-04-0310-14/+13
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-021-1/+3
|
* Remove unnecessary BOTAN_DLL annotationsJack Lloyd2016-12-273-4/+4
|
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1832-256/+256
| | | | | | 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.
* Public_Key derived class ctors take an std::vector<byte>René Korthaus2016-12-113-6/+6
| | | | | | | Changes all the Public_Key derived classes ctors to take a std::vector instead of a secure_vector for the DER encoded public key bits. There is no point in transporting a public key in secure storage. (GH #768)
* Remove <source> block from info.txt filesJack Lloyd2016-12-081-18/+0
| | | | | | Kind of a vestigial thing from an earlier iteration of the module design, and never useful to specify anymore since taking all the cpp files is what you want exactly 100% of the time.
* Add Private_Key::private_key_info()René Korthaus2016-12-053-4/+4
| | | | | | | Adds new Private_Key::private_key_info() that returns a PKCS#8 PrivateKeyInfo structure. Renames the current Private_Key::pkcs8_private_key() to private_key_bits(). BER_encode() just invokes private_key_info().
* Add Public_Key::subject_public_key()René Korthaus2016-12-053-9/+8
| | | | | | | Adds new Public_Key::subject_public_key() that returns a X.509 SubjectPublicKey structure. Renames the current Public_Key::x509_subject_public_key() to public_key_bits(). BER_encode() just invokes subject_public_key().
* Expose pk_ops.h as public interface againJack Lloyd2016-12-045-5/+5
| | | | | | | | | | | | I was initially thinking of Botan as somewhat closed system, but @cordney has a legit use case of wanting to expose a TPM sign operation, but using their internal TPM library and TPM key type. This requires the API be exposed so the derivation can occur. Add a comment in the header explaining that the header is not for normal application use and directing them to pubkey.h This basically reverts 2747e8e23aec43162
* Merge GH #718 Add XMSS WOTS schemeJack Lloyd2016-11-2616-43/+563
|\
| * Adds changes from XMSS Review & resolves conflictsMatthias Gierlings2016-11-1210-120/+32
| |
| * Adds optional XMSS WOTS stand-alone componentsMatthias Gierlings2016-11-1213-8/+566
| | | | | | | | | | | | | | | | | | | | | | The main XMSS implementation does not expose stand-alone access to XMSS Winternitz One Time Signatures through the Botan::PK_Ops interfaces. XMSS WOTS is used by XMSS internally though. This PR implements a possible XMSS WOTS interface for stand-alone use. XMSS WOTS is tested through the XMSS tests, therefore there are no dedicated XMSS WOTS test vectors and test bench components implemented in this PR.
| * Added Extended Hash-Based Signatures (XMSS)Matthias Gierlings2016-11-125-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [1] XMSS: Extended Hash-Based Signatures, draft-itrf-cfrg-xmss-hash-based-signatures-06 Release: July 2016. https://datatracker.ietf.org/doc/ draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1 Provides XMSS_PublicKey and XMSS_PrivateKey classes as well as implementations for the Botan interfaces PK_Ops::Signature and PK_Ops::Verification. XMSS has been integrated into the Botan test bench, signature generation and verification can be tested independently by invoking "botan-test xmss_sign" and "botan-test xmss_verify" - Some headers that are not required to be exposed to users of the library have to be declared as public in `info.txt`. Declaring those headers private will cause the amalgamation build to fail. The following headers have been declared public inside `info.txt`, even though they are only intended for internal use: * atomic.h * xmss_hash.h * xmss_index_registry.h * xmss_address.h * xmss_common_ops.h * xmss_tools.h * xmss_wots_parameters.h * xmss_wots_privatekey.h * xmss_wots_publickey.h - XMSS_Verification_Operation Requires the "randomness" parameter out of the XMSS signature. "Randomness" is part of the prefix that is hashed *before* the message. Since the signature is unknown till sign() is called, all message content has to be buffered. For large messages this can be inconvenient or impossible. **Possible solution**: Change PK_Ops::Verification interface to take the signature as constructor argument, and provide a setter method to be able to update reuse the instance on multiple signatures. Make sign a parameterless member call. This solution requires interface changes in botan. **Suggested workaround** for signing large messages is to not sign the message itself, but to precompute the message hash manually using Botan::HashFunctio and sign the message hash instead of the message itself. - Some of the available test vectors for the XMSS signature verification have been commented out in order to reduce testbench runtime.
* | Correct XMSS crash when a hash was disabledJack Lloyd2016-11-254-12/+20
| | | | | | | | Require SHA-256 in XMSS since that is mandatory for the index registry.
* | Make XMSS more friendly about invalid params.Jack Lloyd2016-11-254-30/+53
| | | | | | | | | | | | Previously just throw an exception from map.at Add an XMSS keygen test, and add default params for create_private_key
* | Merge GH #736 Add SHAKE support to XMSSJack Lloyd2016-11-254-102/+94
|\ \
| * | Adds SHAKE support for XMSSMatthias Gierlings2016-11-254-102/+94
| | | | | | | | | | | | | | | | | | | | | - Enables code for shake support - Creating SHAKE hash function by name now allows to select output size of 256 Bit for SHAKE128 and 512 Bit for SHAKE256. - Adds *self-generated*, unverified test vectors for XMSS/SHAKE.
* | | Avoid having source files start with /**Jack Lloyd2016-11-2529-29/+29
|/ / | | | | | | | | | | | | This caused Doxygen to dump the copyright notices for those files into the Botan namespace description, which is not helpful. [ci skip]
* / Don't force HMAC_DRBG to be enabledJack Lloyd2016-11-182-2/+1
|/ | | | | No need to strictly require it, and some applications may only want system RNG or RDRAND.
* Remove unused Key_Type typedefsJack Lloyd2016-11-122-4/+0
| | | | [ci skip]
* Fixes for XMSS wrt 9c72dabc9Jack Lloyd2016-11-125-31/+6
|
* Implements changes from XMSS reviewMatthias Gierlings2016-11-1113-82/+18
| | | | | | | | | - Removes custom XMSS_Hash assignment operator. - Changes mutex type used in XMSS_Index_Registryfrom std::mutex to Botan::mutex_type, changes lock_guard accordingly. - Removes singleton and endianess detection from XMSS_Tools, changes XMSS_Tools::concat() to be a static method. - XMSS/XMSS_WOTS check_key() now always returns true.
* Added Extended Hash-Based Signatures (XMSS)Matthias Gierlings2016-11-1131-0/+4099
[1] XMSS: Extended Hash-Based Signatures, draft-itrf-cfrg-xmss-hash-based-signatures-06 Release: July 2016. https://datatracker.ietf.org/doc/ draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1 Provides XMSS_PublicKey and XMSS_PrivateKey classes as well as implementations for the Botan interfaces PK_Ops::Signature and PK_Ops::Verification. XMSS has been integrated into the Botan test bench, signature generation and verification can be tested independently by invoking "botan-test xmss_sign" and "botan-test xmss_verify" - Some headers that are not required to be exposed to users of the library have to be declared as public in `info.txt`. Declaring those headers private will cause the amalgamation build to fail. The following headers have been declared public inside `info.txt`, even though they are only intended for internal use: * atomic.h * xmss_hash.h * xmss_index_registry.h * xmss_address.h * xmss_common_ops.h * xmss_tools.h * xmss_wots_parameters.h * xmss_wots_privatekey.h * xmss_wots_publickey.h - XMSS_Verification_Operation Requires the "randomness" parameter out of the XMSS signature. "Randomness" is part of the prefix that is hashed *before* the message. Since the signature is unknown till sign() is called, all message content has to be buffered. For large messages this can be inconvenient or impossible. **Possible solution**: Change PK_Ops::Verification interface to take the signature as constructor argument, and provide a setter method to be able to update reuse the instance on multiple signatures. Make sign a parameterless member call. This solution requires interface changes in botan. **Suggested workaround** for signing large messages is to not sign the message itself, but to precompute the message hash manually using Botan::HashFunctio and sign the message hash instead of the message itself. - Some of the available test vectors for the XMSS signature verification have been commented out in order to reduce testbench runtime.