|
Botan 3.13.0
Crypto and TLS for C&
|
#include <tss.h>
Public Member Functions | |
| const secure_vector< uint8_t > & | data () const |
| bool | initialized () const |
| RTSS_Share ()=default | |
| RTSS_Share (const uint8_t data[], size_t len) | |
| RTSS_Share (std::string_view hex_input) | |
| uint8_t | share_id () const |
| size_t | size () const |
| std::string | to_string () const |
Static Public Member Functions | |
| static secure_vector< uint8_t > | reconstruct (const std::vector< RTSS_Share > &shares) |
| static std::vector< RTSS_Share > | split (uint8_t M, uint8_t N, const uint8_t secret[], uint16_t secret_len, const std::vector< uint8_t > &identifier, std::string_view hash_fn, RandomNumberGenerator &rng) |
| static std::vector< RTSS_Share > | split (uint8_t M, uint8_t N, const uint8_t secret[], uint16_t secret_len, const uint8_t identifier[16], RandomNumberGenerator &rng) |
|
default |
|
explicit |
Decode a share from its hex representation
| hex_input | the share encoded in hexadecimal |
Definition at line 85 of file tss.cpp.
References Botan::hex_decode_locked().
| Botan::RTSS_Share::RTSS_Share | ( | const uint8_t | data[], |
| size_t | len ) |
|
inline |
Access the binary representation of this share
Definition at line 86 of file tss.h.
Referenced by RTSS_Share().
|
inline |
Test whether this share was initialized
Definition at line 110 of file tss.h.
Referenced by share_id().
|
static |
Reconstruct a secret from a set of shares
| shares | the list of shares |
Definition at line 191 of file tss.cpp.
References BOTAN_ASSERT_NOMSG, Botan::CT::is_equal(), Botan::make_uint16(), share_id(), and size().
| uint8_t Botan::RTSS_Share::share_id | ( | ) | const |
Return the identifier of this share
Definition at line 93 of file tss.cpp.
References initialized().
Referenced by reconstruct().
|
inline |
Return the size of this share
Definition at line 104 of file tss.h.
Referenced by reconstruct().
|
static |
Split a secret into shares
| M | the number of shares needed to reconstruct |
| N | the number of shares generated |
| secret | the secret to split |
| secret_len | the length of the secret |
| identifier | the share identifier |
| hash_fn | the hash function to use for a checksum ("None", "SHA-1", "SHA-256") |
| Random Number Generators | the random number generator to use |
Definition at line 114 of file tss.cpp.
References Botan::copy_mem(), Botan::HashFunction::create_or_throw(), Botan::get_byte(), and Botan::RandomNumberGenerator::randomize().
|
static |
Split a secret into shares
| M | the number of shares needed to reconstruct |
| N | the number of shares generated |
| secret | the secret to split |
| secret_len | the length of the secret |
| identifier | the 16 byte share identifier |
| Random Number Generators | the random number generator to use |
Definition at line 109 of file tss.cpp.
References split().
Referenced by split().
| std::string Botan::RTSS_Share::to_string | ( | ) | const |
Format this share as a hex string
Definition at line 105 of file tss.cpp.
References Botan::hex_encode().