#include <SecretManagement.h>
Collaboration diagram for CODEX_APSS::SecretManagement:

Public Types | |
| typedef vector< FinishedMsg > | FinishedMsgList |
| A list of FinishedMsg%s indicating termination of the protocol. | |
| typedef CODEX_Server::ServerState::ShareCallback | ShareCallbackBase |
| Shorthand for the type of a share-retrieval callback. | |
Public Member Functions | |
| SecretManagement () | |
| Constructor. | |
| virtual | ~SecretManagement () |
| Virtual destructor. | |
| void | setNum (unsigned int num) |
| Set the identification number for this shared secret. | |
| unsigned long | version () const |
| The current version (epoch) for this secret. | |
| void | setSubshareRange (const CODEX_VSS::Range *subshareRange) |
| Set the range used to generate subshares. | |
| const CODEX_VSS::Range & | subshareRange () const |
| The range in which to generate subshares. | |
| void | addSharing (LSType *sharing) |
| Add a new labeled sharing. | |
| bool | labelValid (const LabelType &label) const |
| Test the (local) validity of a label. | |
| const LSType & | sharing (const LSType::LabelType &label, unsigned int server) const |
| Get the sharing with a particular label. | |
| void | setWitness (const WitnessType &witness) |
| Set the witness for the secret. | |
| const WitnessType & | witness () const |
| Get the witness for the secret. | |
| const ShareSetType & | subsharing (const SublabelType &sublabel, unsigned int server) const |
| Get the subsharing with a particular label. | |
| SubshareList & | splittings (const LabelType &label) |
| Get the splittings of the shares with a particular label. | |
| void | addSubsharing (const SublabelType &label, const ShareType &subsharing) |
| Add a new labeled subsharing. | |
| bool | addInitMsg (const SignedInitMsg &im) |
| Add a SignedInitMsg to the log. | |
| bool | addEstablishMsg (const SignedEstablishMsg &em) |
| Add a SignedEstablishMsg to the log. | |
| bool | addComputeMsg (const SignedComputeMsg &cm) |
| Add a SignedComputeMsg to the log. | |
| bool | addFinishedMsg (const SignedFinishedMsg &fm) |
| Add a SignedFinishedMsg to the log. | |
| bool | addInitResponse (const SignedContributeMsg &cm) |
| Add a SignedContributeMsg to the log. | |
| bool | addEstablishResponse (const SignedEstablishedMsg &em) |
| Add a SignedEstablishedMsg to the log. | |
| bool | addComputeResponse (const SignedComputedMsg &cm) |
| Add a SignedComputedMsg to the log. | |
| void | clearEstablishMsgs () |
| Remove cached EstablishMsg%s. | |
| void | clearEstablishMsgs (unsigned int establisher) |
| Removed cached EstablishMsg%s that were sent by a particular server. | |
| const InitRecord & | initRecord (unsigned int i) const |
| Retrieve the InitRecord for a coordinator. | |
| const EstablishRecord & | establishRecord (unsigned int establisher, unsigned int shareNum, const LabelType &label) const |
| Retrieve the EstablishRecord for an establishing server and a specific share. | |
| const ComputeRecord & | computeRecord (unsigned int i) const |
| Retrieve the ComputeRecord for a coordinator. | |
| const SignedFinishedMsg & | finishedMsg (unsigned int i) const |
| Retrieve the SignedFinishedMsg from a coordinator. | |
| void | setEpochTime () |
| Set the beginning of the epoch to the current time. | |
| unsigned long | elapsed (unsigned long current) const |
| Length of time since the epoch began. | |
| void | beginRun () |
| Begin an instance of the APSS protocol. | |
| void | sendFinished (unsigned int server) const |
| Send a SignedFinishedMsg to a server. | |
| void | sendFinished (unsigned int coord, unsigned int server) const |
| Send a SignedFinishedMsg to a server. | |
Static Public Attributes | |
| static const unsigned int | NumServers |
| Shorthand for the number of servers in the system. | |
| static const unsigned int | NumShares = LabelType::NumShares |
| Shorthand for the number of shares in a sharing. | |
Protected Member Functions | |
| void | setRunTime () |
| Set the beginning of a protocol instance to the current time. | |
This class holds all of the necessary information for managing a shared secret. This includes version information, subshares, and cached protocol messages. By encapsulating the information in this way, the APSS protocols can accomodate multiple shared secrets.
Definition at line 42 of file SecretManagement.h.
|
|
Add a SignedComputeMsg to the log.
Definition at line 289 of file SecretManagement.cc. References CODEX_APSS::ComputeRecord::addRequest(), CODEX_ASN1::Base::initialized(), CODEX_VSS::SubshareLabel< _ShareLabel >::label(), NumShares, CODEX_APSS::ComputeRecord::request(), CODEX_APSS::ComputeMsg::subshareLabel(), and version(). |
|
|
Add a SignedComputedMsg to the log. This will be matched with the corresponding ComputeMsg.
Definition at line 541 of file SecretManagement.cc. References CODEX_APSS::ComputeRecord::addResponse(), and version(). |
|
|
Add a SignedEstablishMsg to the log.
Definition at line 254 of file SecretManagement.cc. References CODEX_APSS::EstablishRecord::addRequest(), addSubsharing(), CODEX_ASN1::Base::initialized(), CODEX_APSS::EstablishRecord::request(), and CODEX_APSS::EstablishMsg::sublabel(). |
|
|
Add a SignedEstablishedMsg to the log. This will be matched with the corresponding EstablishMsg.
Definition at line 522 of file SecretManagement.cc. References CODEX_APSS::EstablishRecord::addResponse(), CODEX_ASN1::Base::initialized(), CODEX_APSS::EstablishRecord::request(), CODEX_ASN1::Integer::value(), and CODEX_APSS::EstablishMsg::version(). |
|
|
Add a SignedFinishedMsg to the log. If this is the first SignedFinishedMsg for a new version, the following cleanup will be performed:
Definition at line 325 of file SecretManagement.cc. References CODEX_ASN1::Array< T >::element(), CODEX_APSS::FinishedMsg::evidence(), CODEX_Server::ServerState::hostNum(), CODEX_Server::ServerState::instance(), CODEX_APSS::SignedMessage< MT, ST >::message(), NumServers, NumShares, CODEX_Server::ServerState::setDefaultLabel(), setEpochTime(), CODEX_APSS::ComputedMsg::shareLabel(), and version(). |
|
|
Add a SignedInitMsg to the log.
Definition at line 216 of file SecretManagement.cc. References CODEX_APSS::InitRecord::addRequest(), CODEX_ASN1::Base::initialized(), CODEX_APSS::InitMsg::label(), CODEX_APSS::InitRecord::request(), CODEX_ASN1::Integer::value(), CODEX_APSS::InitMsg::version(), and version(). |
|
|
Add a SignedContributeMsg to the log. This will be matched with the corresponding InitMsg.
Definition at line 505 of file SecretManagement.cc. References CODEX_APSS::InitRecord::addResponse(), and version(). |
|
|
Add a new labeled sharing. If this is the first sharing for its version number, the list will be cleared and this sharing's label set as the server's default. Definition at line 75 of file SecretManagement.cc. References CODEX_ASN1::Base::initialized(), CODEX_VSS::LabeledShare< _ShareType, _OneWay >::label(), sharing(), CODEX_ASN1::Integer::value(), and version(). |
|
|
Removed cached EstablishMsg%s that were sent by a particular server.
Definition at line 572 of file SecretManagement.cc. References NumShares. |
|
|
Retrieve the ComputeRecord for a coordinator.
Definition at line 607 of file SecretManagement.cc. References NumServers. |
|
|
Length of time since the epoch began.
Definition at line 651 of file SecretManagement.cc. |
|
||||||||||||||||
|
Retrieve the EstablishRecord for an establishing server and a specific share.
Definition at line 591 of file SecretManagement.cc. References NumServers, and NumShares. |
|
|
Retrieve the SignedFinishedMsg from a coordinator.
Definition at line 617 of file SecretManagement.cc. References NumServers. |
|
|
Retrieve the InitRecord for a coordinator.
Definition at line 581 of file SecretManagement.cc. References NumServers. |
|
|
Test the (local) validity of a label. This only considers whether a label is valid at this server.
Definition at line 115 of file SecretManagement.cc. References NumServers. Referenced by sharing(). |
|
||||||||||||
|
Send a SignedFinishedMsg to a server.
Definition at line 772 of file SecretManagement.cc. References CODEX_APSS::StateInfo::domain(), CODEX_Quorum::Message::fill(), CODEX_Server::ServerState::hostNum(), CODEX_ASN1::Base::initialized(), CODEX_Server::ServerState::instance(), CODEX_APSS::SignedMessage< MT, ST >::marshal(), CODEX_Server::ServerState::newSequenceNumber(), CODEX_APSS::StateInfo::sendTo(), and CODEX_APSS::SignatureMask. |
|
|
Send a SignedFinishedMsg to a server. This method will use the message corresponding to the default label for the secret.
Definition at line 758 of file SecretManagement.cc. References NumServers. Referenced by sharing(), and subsharing(). |
|
|
Set the range used to generate subshares.
Definition at line 59 of file SecretManagement.cc. References subshareRange(). |
|
|
Set the witness for the secret.
Definition at line 119 of file SecretManagement.h. References witness(). |
|
||||||||||||
|
Get the sharing with a particular label. If the label is not present locally share recovery will be triggered, but only if the version number in the label is greater than the current local version number or they are equal and no sharing was established at this server by the specified coordinator.
Definition at line 133 of file SecretManagement.cc. References labelValid(), sendFinished(), and version(). Referenced by addSharing(). |
|
|
Get the splittings of the shares with a particular label. If a label is not present, an empty list will be returned. As the return value is a non-constant reference, it can be used to add subsharings to the stored list. This is the expected way for an object to create and store subsharings of shares. Each share that is split by the server will have a separate entry in the returned list.
Definition at line 210 of file SecretManagement.cc. |
|
||||||||||||
|
Get the subsharing with a particular label. If the label is not present locally an exception will be thrown.
Definition at line 190 of file SecretManagement.cc. References sendFinished(), and CODEX_ASN1::Integer::value(). Referenced by addSubsharing(). |
|
|
Get the witness for the secret. The witness is used to test the validity of a label.
Definition at line 126 of file SecretManagement.h. Referenced by setWitness(). |
|
|
Initial value: Shorthand for the number of servers in the system.
Definition at line 46 of file SecretManagement.h. Referenced by addFinishedMsg(), clearEstablishMsgs(), computeRecord(), establishRecord(), finishedMsg(), initRecord(), labelValid(), and sendFinished(). |
1.4.1