#include <Combinatoric.h>
Inheritance diagram for CODEX_VSS::Combinatoric< NumT, ThreshT >:


Public Types | |
| typedef CODEX_ASN1::SecureBigNumber | ValueType |
| Export the type of the share. | |
Public Member Functions | |
| Combinatoric () | |
| Default constructor, for creating an object to be unmarshalled. | |
| Combinatoric (const Combinatoric< NumT, ThreshT > &aOther) | |
| Copy constructor. | |
| Combinatoric (const ShareSet< Combinatoric< NumT, ThreshT > > &shareSet, unsigned int partNum) | |
| Create a Combinatoric from a ShareSet. | |
| virtual | ~Combinatoric () |
| Virtual destructor. | |
| void | operator= (const Combinatoric< NumT, ThreshT > &aOther) |
| Assignment operator. | |
| void | operator+= (const Combinatoric< NumT, ThreshT > &aOther) |
| In-place addition operator. | |
| void | setShare (unsigned int i, const CODEX_ASN1::SecureBigNumber &share) |
| Set a share in the array. | |
| const CODEX_ASN1::SecureBigNumber & | share (unsigned int i) const |
| Retrieve a share. | |
| unsigned int | count () const |
| The number of shares held by this object. | |
| void | apply (const ShareFunctional &func, Combinatoric< NumT, ThreshT > &result) const |
| Apply a function to each share, generating new shares. | |
| void | recover (CODEX_ASN1::SecureBigNumber &result) const |
| Recover the secret from the shares. | |
| int | marshal (unsigned char **pp) const |
| This function creates a serialized representation of the object, which is returned through the argument pp. | |
| void * | unmarshal (void *bogus, unsigned char **pp, long length) |
| This function takes a serialized representation of the object and recreates the object representation. | |
| void | toFile (const char *fname) const |
| Store the shares in a file. | |
| void * | fromFile (const char *fname) |
| Read shares from a file. | |
| bool | initialized () const |
Static Public Attributes | |
| static const unsigned int | NumShares = choose<NumT,ThreshT-1>::value+1 |
| Number of shares distributed among the NumT participants. | |
Protected Attributes | |
| bool | m_initialized |
| Has this object been initialized yet, or is it still blank? | |
Definition at line 72 of file Combinatoric.h.
|
||||||||||||||||
|
Apply a function to each share, generating new shares.
Definition at line 270 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), CODEX_ASN1::Base::m_initialized, and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
|
||||||||||
|
This function creates a serialized representation of the object, which is returned through the argument pp. This must be overridden by the concrete derived class.
Implements CODEX_ASN1::Base. Definition at line 336 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), CODEX_ASN1::BigNumber::marshal(), CODEX_ASN1::Integer::marshal(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. Referenced by CODEX_KeyService::ClientMessageSigner::handler(), CODEX_APSS::RecoveredMsg::marshal(), CODEX_APSS::EstablishMsg::marshal(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::toFile(). |
|
||||||||||
|
In-place addition operator. The semantics of this are different than are typical for scalar types. Elements that have been set are not changed. What is done is that any elements present in aOther but not the current object are added to the list of shares. Definition at line 211 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
||||||||||
|
Recover the secret from the shares.
Definition at line 286 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
||||||||||||||||
|
Set a share in the array.
Definition at line 230 of file Combinatoric.h. References CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares, and CODEX_VSS::Combinatoric< NumT, ThreshT >::share(). Referenced by CODEX_VSS::ShareSplitting< Combinatoric< NumT, ThreshT > >::split(). |
|
||||||||||
|
Retrieve a share.
Definition at line 244 of file Combinatoric.h. References CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. Referenced by CODEX_VSS::Combinatoric< NumT, ThreshT >::setShare(). |
|
||||||||||||||||||||
|
This function takes a serialized representation of the object and recreates the object representation. This must be overridden by the concrete derived class.
Implements CODEX_ASN1::Base. Definition at line 370 of file Combinatoric.h. References CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares, CODEX_VSS::Combinatoric< NumT, ThreshT >::unmarshal(), CODEX_ASN1::Integer::unmarshal(), and CODEX_ASN1::Integer::value(). Referenced by CODEX_VSS::Combinatoric< NumT, ThreshT >::fromFile(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_APSS::RecoveredMsg::unmarshal(), CODEX_APSS::EstablishMsg::unmarshal(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::unmarshal(). |
|
|||||
|
Number of shares distributed among the NumT participants. This includes a public share that every participant receives. Definition at line 82 of file Combinatoric.h. Referenced by CODEX_VSS::Combinatoric< NumT, ThreshT >::apply(), CODEX_VSS::Combinatoric< NumT, ThreshT >::Combinatoric(), CODEX_VSS::Combinatoric< NumT, ThreshT >::count(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator+=(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator=(), CODEX_VSS::Combinatoric< NumT, ThreshT >::recover(), CODEX_VSS::Combinatoric< NumT, ThreshT >::setShare(), CODEX_VSS::Combinatoric< NumT, ThreshT >::share(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::unmarshal(). |
1.4.1