Botan 3.6.1
Crypto and TLS for C&
|
#include <tpm2_pkops.h>
Public Member Functions | |
virtual AlgorithmIdentifier | algorithm_identifier () const |
std::string | hash_function () const override |
std::vector< uint8_t > | sign (Botan::RandomNumberGenerator &rng) override |
virtual size_t | signature_length () const =0 |
Signature_Operation (const Object &object, const SessionBundle &sessions, const SignatureAlgorithmSelection &algorithms) | |
void | update (std::span< const uint8_t > msg) override |
Protected Member Functions | |
Botan::HashFunction * | hash () |
const Object & | key_handle () const |
virtual std::vector< uint8_t > | marshal_signature (const TPMT_SIGNATURE &signature) const =0 |
std::optional< std::string > | padding () const |
const TPMT_SIG_SCHEME & | scheme () const |
const SessionBundle & | sessions () const |
If the key is restricted, this will transparently use the TPM to hash the data to obtain a validation ticket.
TPM Library, Part 1: Architecture", Section 11.4.6.3 (4) This ticket is used to indicate that a digest of external data is safe to sign using a restricted signing key. A restricted signing key may only sign a digest that was produced by the TPM. [...] This prevents forgeries of attestation data.
Definition at line 74 of file tpm2_pkops.h.
Botan::TPM2::Signature_Operation::Signature_Operation | ( | const Object & | object, |
const SessionBundle & | sessions, | ||
const SignatureAlgorithmSelection & | algorithms ) |
Definition at line 45 of file tpm2_pkops.cpp.
|
virtualinherited |
Return an algorithm identifier associated with this signature scheme.
Default implementation throws an exception
Reimplemented in Botan::XMSS_Signature_Operation.
Definition at line 24 of file pk_ops.cpp.
|
inlineprotectedinherited |
|
inlineoverridevirtualinherited |
Implements Botan::PK_Ops::Signature.
Definition at line 43 of file tpm2_pkops.h.
|
inlineprotectedinherited |
|
protectedpure virtual |
Referenced by sign().
|
inlineprotectedinherited |
Definition at line 54 of file tpm2_pkops.h.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
overridevirtual |
Perform a signature operation
rng | a random number generator |
Implements Botan::PK_Ops::Signature.
Definition at line 51 of file tpm2_pkops.cpp.
References Botan::TPM2::as_span(), BOTAN_ASSERT_NOMSG, BOTAN_ASSERT_NONNULL, BOTAN_UNUSED, Botan::TPM2::check_rc(), Botan::Buffered_Computation::final(), Botan::TPM2::Signature_Operation_Base< PK_Ops::Signature >::hash(), Botan::TPM2::init_empty(), Botan::TPM2::Signature_Operation_Base< PK_Ops::Signature >::key_handle(), marshal_signature(), Botan::out_ptr(), Botan::TPM2::Signature_Operation_Base< PK_Ops::Signature >::scheme(), and Botan::TPM2::Signature_Operation_Base< PK_Ops::Signature >::sessions().
|
pure virtualinherited |
Return an upper bound on the length of the output signature
Implemented in Botan::XMSS_Signature_Operation.
|
inlineoverridevirtualinherited |
Implements Botan::PK_Ops::Signature.
Definition at line 41 of file tpm2_pkops.h.