#include <StateInfo.h>
Collaboration diagram for CODEX_KeyService::StateInfo:

Public Types | |
|
typedef map< CODEX_Events::Activity *, ClientActivity * > | ClientMap |
| Map an activity to itself as a derived type. | |
|
typedef map< const unsigned char *, CODEX_Events::Activity *, CODEX_Quorum::memless< CODEX_Server::ServerState::nMID > > | RequestMap |
| Map a sequence number to an Activity. | |
| typedef map< CODEX_ASN1::ustring, KeyInfo * > | KeyMap |
| Map a key name to its information. | |
| typedef CODEX_Server::ServerState::ShareType | ShareType |
| Shorthand for type of a share. | |
| typedef CODEX_Server::ServerState::LSType | LSType |
| Shorthand for a labelled share type. | |
|
typedef CryptoSystem< CODEX_Client::CipherTextType, ShareType > | CryptoSystemType |
| Set up some configuration-specific typedefs. | |
| typedef CryptoSystemType::ThresholdType | ThresholdDecryptionType |
| Specify the threshold scheme to use for decryptions. | |
| enum | SynchronyState { kFailed, kWrote, kRead } |
| Indicates the result of a call to synchronize(). | |
Public Member Functions | |
| void | configure (const CONF *conf, const char *sec, const string &fname) |
| Configure the state from an OpenSSL CONF-format file. | |
| void | setMessageDomain (unsigned char d) |
| Set the 1-byte domain identifier for client messages. | |
| void | setDelegationDomain (unsigned char d) |
| Set the 1-byte domain identifier for internal delegation messages. | |
| unsigned char | messageDomain () |
| The domain identifier for client messages. | |
| unsigned char | delegationDomain () |
| The domain identifier for internal delegation messages. | |
| long | clientPort () const |
| The port on which to listen for client connections. | |
| bool | addClient (ClientActivity *clientAct) |
| Add a new ClientActivity to the client map. | |
| ClientActivity * | getClient (CODEX_Events::Activity *clientAct) const |
Pointer to the ClientActivity, or NULL if not present. | |
| bool | removeClient (CODEX_Events::Activity *clientAct) |
| Remote a ClientActivity from the map. | |
| bool | registerSequenceNumber (const unsigned char *seqNum, CODEX_Events::Activity *clientAct) |
| Affiliate a sequence number with an activity, so that cleanup of bad connections can be done. | |
| CODEX_Events::Activity * | getActFromSeqNum (const unsigned char *seqNum) const |
| Given a sequence number, return the ClientActivity for which the request is acting. | |
| bool | removeSequenceNumber (const unsigned char *seqNum) |
| Remove a sequence number. | |
| bool | addKeyName (const CODEX_ASN1::ustring &name, const CODEX_Client::SignedBoundNameMsg &binding) |
| Add a new key name and its binding to the key map. | |
| bool | addKeyName (const CODEX_ASN1::ustring &name, const CODEX_Client::BoundNameMsg &binding) |
| Add a new key name and its binding to the key map. | |
| const KeyInfo * | getKeyInfo (const CODEX_ASN1::ustring &name) const |
Pointer to the key's KeyInfo, or NULL if not present. | |
| bool | addKeySignature (const CODEX_ASN1::ustring &name, const CODEX_Ciphers::RSASignature &signature) |
| Add a signature to a binding. | |
| bool | replaceKeyBinding (const CODEX_ASN1::ustring &name, const CODEX_Client::SignedBoundNameMsg &binding) |
| Replace a binding with a signed binding. | |
| bool | addKeyValue (const CODEX_ASN1::ustring &name, const CODEX_Client::RequestCipherTextType &keyValue) |
| Add a key value for an already-bound key name. | |
| bool | verifyKeyValue (const CODEX_ASN1::ustring &name) |
| Add a bit indicating that a key value is verified. | |
| const LSType & | decryptionShares (const LSType::LabelType &label, unsigned int server) const |
| The shares of the private key used to perform decryptions. | |
| const LSType::LabelType & | defaultDecryptionLabel () const |
| The label for the default sharing of the decryption key. | |
| const ThresholdDecryptionType & | thresholdDecryption () const |
| The threshold cryptosystem for performing decryptions. | |
| template<class T> | |
| const LSType & | shareTemplate (const LSType::LabelType &label, unsigned int server) const |
| This templated method does type distinction for us, which makes switching between cryptosystems somewhat cleaner. | |
| template<class T> | |
| const LSType::LabelType & | labelTemplate () const |
| This templated method does type distinction for us, which makes switching between cryptosystems somewhat cleaner. | |
| template<class T> | |
| const T & | thresholdTemplate () const |
| This templated method does type distinction for us, which makes switching between cryptosystems somewhat cleaner. | |
| unsigned int | ppkSecurityParam () const |
| The security parameter for the proof of plaintext knowledge. | |
| SynchronyState | synchronize (const char *fname, bool force_read=false) |
| Synchronize the object state with stable storage. | |
Static Public Member Functions | |
| static StateInfo * | instance () |
| Static method to fetch the unique instance. | |
| static void | destroy () |
| Destroys the unique instance. | |
Protected Member Functions | |
| StateInfo () | |
| Protected constructor, prevents multiple instances. | |
| virtual | ~StateInfo () |
| Protected virtual destructor. | |
Static Protected Attributes | |
| static StateInfo * | m_instance |
| Unique instance of this class. | |
Implementing the state this way allows us not to have to pass pointers and references to the state everywhere. There is, of course, the danger that something that really shouldn't be accessing the state will be able to, but since the server code has to be trusted on that server in any event, this shouldn't matter. The state information can also be saved to and read from disk, so that state can persist between sessions.
Definition at line 169 of file CODEX_KeyService/StateInfo.h.
|
|
Map a key name to its information.
Definition at line 200 of file CODEX_KeyService/StateInfo.h. |
|
|
Add a new ClientActivity to the client map.
Referenced by CODEX_KeyService::ClientActivity::ClientActivity(). |
|
||||||||||||
|
The shares of the private key used to perform decryptions.
Referenced by CODEX_KeyService::ClientMessageSigner::handler(). |
|
|
Given a sequence number, return the ClientActivity for which the request is acting.
Referenced by CODEX_KeyService::ResponseCallback::fail(), CODEX_KeyService::VerifyWriteCallback::operator()(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_KeyService::ClientWriteCallback::operator()(), CODEX_KeyService::ClientReadCallback::operator()(), and CODEX_KeyService::ClientCreateCallback::operator()(). |
|
|
The security parameter for the proof of plaintext knowledge. This is the number of proof elements to provide. Definition at line 373 of file CODEX_KeyService/StateInfo.h. |
|
||||||||||||
|
Synchronize the object state with stable storage.
Snapshots can be implemented using different file names at specified points. If the file does not exist, it will be created. If the state information is empty, a read will be attempted. Otherwise a write will be attempted unless force_read is
|
1.4.1