CCF
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ccf::ShareManager Class Reference

#include <share_manager.h>

Public Member Functions

 ShareManager (const std::shared_ptr< LedgerSecrets > &ledger_secrets_)
 
void issue_recovery_shares (ccf::kv::Tx &tx)
 
void issue_recovery_shares (ccf::kv::Tx &tx, LedgerSecretPtr new_ledger_secret)
 
void shuffle_recovery_shares (ccf::kv::Tx &tx)
 
LedgerSecretsMap restore_recovery_shares_info (ccf::kv::Tx &tx, const RecoveredEncryptedLedgerSecrets &recovery_ledger_secrets, const std::optional< LedgerSecretPtr > &restored_ls_opt=std::nullopt)
 
size_t submit_recovery_share (ccf::kv::Tx &tx, MemberId member_id, const std::vector< uint8_t > &submitted_recovery_share)
 

Static Public Member Functions

static std::optional< EncryptedShareget_encrypted_share (ccf::kv::ReadOnlyTx &tx, const MemberId &member_id)
 
static bool is_full_key (const std::vector< uint8_t > &submitted_recovery_share)
 
static void clear_submitted_recovery_shares (ccf::kv::Tx &tx)
 

Constructor & Destructor Documentation

◆ ShareManager()

ccf::ShareManager::ShareManager ( const std::shared_ptr< LedgerSecrets > &  ledger_secrets_)
inline

Member Function Documentation

◆ clear_submitted_recovery_shares()

static void ccf::ShareManager::clear_submitted_recovery_shares ( ccf::kv::Tx tx)
inlinestatic

◆ get_encrypted_share()

static std::optional< EncryptedShare > ccf::ShareManager::get_encrypted_share ( ccf::kv::ReadOnlyTx tx,
const MemberId member_id 
)
inlinestatic

◆ is_full_key()

static bool ccf::ShareManager::is_full_key ( const std::vector< uint8_t > &  submitted_recovery_share)
inlinestatic

◆ issue_recovery_shares() [1/2]

void ccf::ShareManager::issue_recovery_shares ( ccf::kv::Tx tx)
inline

Issue new recovery shares for the current ledger secret, recording the wrapped new ledger secret and encrypted previous ledger secret in the store.

Parameters
txStore transaction object

◆ issue_recovery_shares() [2/2]

void ccf::ShareManager::issue_recovery_shares ( ccf::kv::Tx tx,
LedgerSecretPtr  new_ledger_secret 
)
inline

Issue new recovery shares of the new ledger secret, recording the wrapped new ledger secret and encrypted current (now previous) ledger secret in the store.

Parameters
txStore transaction object
new_ledger_secretPointer to new ledger secret

Note: The version at which the new ledger secret is applicable from is derived from the hook at which the ledger secret is applied to the store.

◆ restore_recovery_shares_info()

LedgerSecretsMap ccf::ShareManager::restore_recovery_shares_info ( ccf::kv::Tx tx,
const RecoveredEncryptedLedgerSecrets recovery_ledger_secrets,
const std::optional< LedgerSecretPtr > &  restored_ls_opt = std::nullopt 
)
inline

◆ shuffle_recovery_shares()

void ccf::ShareManager::shuffle_recovery_shares ( ccf::kv::Tx tx)
inline

Issue new recovery shares of the same current ledger secret to all active recovery members. The encrypted ledger secrets recorded in the store are not updated.

Parameters
txStore transaction object

◆ submit_recovery_share()

size_t ccf::ShareManager::submit_recovery_share ( ccf::kv::Tx tx,
MemberId  member_id,
const std::vector< uint8_t > &  submitted_recovery_share 
)
inline

The documentation for this class was generated from the following file: