#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 Methods | |
| 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 |
| |
| 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. | |
Static Public Attributes | |
| const unsigned int | NumShares = choose<NumT,ThreshT-1>::value+1 |
| Number of shares distributed among the NumT participants. | |
Definition at line 69 of file Combinatoric.h.
|
||||||||||||||||
|
Apply a function to each share, generating new shares.
Definition at line 267 of file Combinatoric.h. References CODEX_ASN1::Base::m_initialized. Referenced by CODEX_ThresholdCrypto::ThresholdVarRSACrypto< CODEX_VSS::Combinatoric< NumT, ThreshT > >::decrypt(), CODEX_ThresholdCrypto::ThresholdRSACrypto< CODEX_VSS::Combinatoric< NumT, ThreshT > >::decrypt(), CODEX_ThresholdCrypto::ThresholdElGamalCrypto< CODEX_VSS::Combinatoric< NumT, ThreshT > >::decrypt(), CODEX_ThresholdCrypto::ThresholdVarRSACrypto< CODEX_VSS::Combinatoric< NumT, ThreshT > >::sign(), and CODEX_ThresholdCrypto::ThresholdRSACrypto< CODEX_VSS::Combinatoric< NumT, ThreshT > >::sign(). |
|
||||||||||
|
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 333 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), CODEX_ASN1::BigNumber::marshal(), CODEX_ASN1::Integer::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares, and CODEX_ASN1::Integer::value(). Referenced by 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 208 of file Combinatoric.h. References CODEX_ASN1::Base::initialized(), CODEX_ASN1::Base::m_initialized, CODEX_VSS::Combinatoric< NumT, ThreshT >::m_shares, and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
||||||||||
|
Recover the secret from the shares.
Definition at line 283 of file Combinatoric.h. |
|
||||||||||||||||
|
Set a share in the array.
Definition at line 227 of file Combinatoric.h. References CODEX_ASN1::Base::m_initialized, and CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
||||||||||
|
Retrieve a share.
Definition at line 241 of file Combinatoric.h. References CODEX_VSS::Combinatoric< NumT, ThreshT >::NumShares. |
|
||||||||||||||||||||
|
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 367 of file Combinatoric.h. References CODEX_ASN1::Base::m_initialized, 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(), 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 79 of file Combinatoric.h. Referenced by 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 >::setShare(), CODEX_VSS::Combinatoric< NumT, ThreshT >::share(), and CODEX_VSS::Combinatoric< NumT, ThreshT >::unmarshal(). |
1.2.18