|
Botan 3.13.0
Crypto and TLS for C&
|
#include <pss_params.h>
Public Member Functions | |
| std::vector< uint8_t > | BER_encode () const |
| void | encode_into (DER_Encoder &to) const override |
| const AlgorithmIdentifier & | hash_algid () const |
| std::string | hash_function () const |
| const AlgorithmIdentifier & | mgf_algid () const |
| std::string | mgf_function () const |
| const AlgorithmIdentifier & | mgf_hash_algid () const |
| BOTAN_FUTURE_EXPLICIT | PSS_Params (std::span< const uint8_t > der) |
| PSS_Params (std::string_view hash_fn, size_t salt_len) | |
| size_t | salt_length () const |
| std::vector< uint8_t > | serialize () const |
| size_t | trailer_field () const |
Static Public Member Functions | |
| static PSS_Params | from_emsa_name (std::string_view padding_name) |
| static PSS_Params | from_padding_name (std::string_view padding_name) |
PSS parameters type
Handles encoding/decoding of RSASSA-PSS-params from RFC 3447
Only MGF1 is supported, and the trailer field must 1 (ie the variant from IEEE 1363a using a hash identifier is not supported)
Definition at line 24 of file pss_params.h.
| Botan::PSS_Params::PSS_Params | ( | std::string_view | hash_fn, |
| size_t | salt_len ) |
Create PSS parameters using MGF1 with the same hash as the message hash
| hash_fn | the name of the hash function to use |
| salt_len | the salt length in bytes |
Definition at line 32 of file pss_params.cpp.
References Botan::ASN1_Object::BER_encode().
Referenced by from_emsa_name(), and from_padding_name().
| Botan::PSS_Params::PSS_Params | ( | std::span< const uint8_t > | der | ) |
Decode an encoded RSASSA-PSS-params
Definition at line 39 of file pss_params.cpp.
References Botan::BER_Decoder::Limits::DER(), and Botan::BER_Decoder::verify_end().
|
inherited |
Return the encoding of this object. This is a convenience method when just one object needs to be serialized. Use DER_Encoder for complicated encodings.
Definition at line 21 of file asn1_obj.cpp.
References encode_into().
Referenced by decode_from(), Botan::PKCS12::export_to(), Botan::Certificate_Store_In_SQL::find_all_certs(), Botan::Certificate_Store_In_SQL::find_cert(), Botan::X509_Certificate::fingerprint(), Botan::Certificate_Store_In_SQL::insert_cert(), Botan::X509_Object::PEM_encode(), and Botan::PSS_Params::PSS_Params().
|
overridevirtual |
Encode whatever this object is into to
| to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 51 of file pss_params.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::start_context_specific(), and Botan::DER_Encoder::start_sequence().
|
inlinestatic |
Note that the only valid strings you can pass to this function are values returned by SignaturePaddingScheme::name() and these may change in a minor release.
Definition at line 39 of file pss_params.h.
References from_emsa_name(), from_padding_name(), and PSS_Params().
Referenced by from_emsa_name().
|
static |
Note that the only valid strings you can pass to this function are values returned by SignaturePaddingScheme::name() and these may change in a minor release.
Definition at line 19 of file pss_params.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), Botan::SCAN_Name::arg_count(), BOTAN_ARG_CHECK, Botan::fmt(), and PSS_Params().
Referenced by from_emsa_name().
|
inline |
Return the AlgorithmIdentifier of the hash used to hash the message
Definition at line 59 of file pss_params.h.
Referenced by hash_function().
|
inline |
Return the name of the hash used to hash the message
Definition at line 84 of file pss_params.h.
References hash_algid().
|
inline |
Return the AlgorithmIdentifier of the mask generation function
Definition at line 64 of file pss_params.h.
Referenced by mgf_function().
|
inline |
Return the name of the mask generation function; only MGF1 is supported
Definition at line 89 of file pss_params.h.
References mgf_algid().
|
inline |
Return the AlgorithmIdentifier of the hash used within the mask generation function
Definition at line 69 of file pss_params.h.
|
inline |
Return the salt length in bytes
Definition at line 74 of file pss_params.h.
| std::vector< uint8_t > Botan::PSS_Params::serialize | ( | ) | const |
Return the DER encoding of these RSASSA-PSS-params
Definition at line 45 of file pss_params.cpp.
References Botan::DER_Encoder::encode().
|
inline |
Return the trailer field; only a value of 1 is supported
Definition at line 79 of file pss_params.h.