Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_VSS::ShareLabel< _ShareType, _OneWay > Class Template Reference

Sharings are labelled as a means to distinguish different sharings of the same secret. More...

#include <ShareLabel.h>

Inheritance diagram for CODEX_VSS::ShareLabel< _ShareType, _OneWay >:

Inheritance graph
[legend]
Collaboration diagram for CODEX_VSS::ShareLabel< _ShareType, _OneWay >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef _ShareType ShareType
 Export the type of sharing.
typedef _OneWay OneWay
 Export the type of one-way function used to construct the validity checks.
typedef VRecon< ShareType,
OneWay
VType
 Convenient short name for the verification reconstruction class.

Public Member Functions

 ShareLabel ()
 Default constructor.
 ShareLabel (int num, int version, int id, const ShareSet< ShareType > &shareSet, const OneWay &func)
 Constructor taking a share set and one-way function.
 ShareLabel (int num, int version, int id, const typename VType::ValueType vc[NumShares])
 Constructor taking a set of verification shares.
 ShareLabel (const ShareLabel< _ShareType, _OneWay > &aOther)
 Copy constructor.
virtual ~ShareLabel ()
 Virtual destructor.
void operator= (const ShareLabel< _ShareType, _OneWay > &aOther)
 Assignment operator.
int cmp (const ShareLabel< _ShareType, _OneWay > &aOther) const
 Generic comparator method.
bool operator< (const ShareLabel< _ShareType, _OneWay > &aOther) const
 Less-than comparator.
bool operator> (const ShareLabel< _ShareType, _OneWay > &aOther) const
 Greater-than comparator.
bool operator== (const ShareLabel< _ShareType, _OneWay > &aOther) const
 Equality comparator.
bool operator!= (const ShareLabel< _ShareType, _OneWay > &aOther) const
 Inequality comparator.
bool operator<= (const ShareLabel< _ShareType, _OneWay > &aOther) const
 At-most (<=) comparator (equivalent to !>).
bool operator>= (const ShareLabel< _ShareType, _OneWay > &aOther) const
 At-least (>=) comparator (equivalent to !<).
const CODEX_ASN1::Integernum () const
 The ID number of the shared secret.
const CODEX_ASN1::Integerversion () const
 The version number of the corresponding sharing.
const CODEX_ASN1::Integerid () const
 The origin identifier for the corresponding sharing.
const VType::ValueTypevc () const
 The validity checks for the corresponding sharing.
const VType::ValueTypevc (unsigned int i) const
 A particular validity check for the corresponding sharing.
bool verify (const typename VType::ValueType &vcs, const OneWay &func) const
 Check the consistency of the verification data.
bool check (const ShareType &share, const OneWay &func) const
 Test a share against its validity information.
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.
bool initialized () const

Static Public Attributes

static const unsigned int NumShares = ShareType::NumShares
 Number of shares.

Protected Attributes

bool m_initialized
 Has this object been initialized yet, or is it still blank?

Detailed Description

template<class _ShareType, class _OneWay>
class CODEX_VSS::ShareLabel< _ShareType, _OneWay >

Sharings are labelled as a means to distinguish different sharings of the same secret.

This includes version and origin information as well as the public verification information. Because the verification data is included in the label, this is a natural place to test its validity, making the label both an indicator of a specific version and the proof that it corresponds to a valid sharing. The template parameters uniquely determine the type of sharing and the verification scheme, and these are then used to obtain the appropriate verification reconstruction class.

Definition at line 47 of file ShareLabel.h.


Member Typedef Documentation

template<class _ShareType, class _OneWay>
typedef VRecon< ShareType , OneWay > CODEX_VSS::ShareLabel< _ShareType, _OneWay >::VType
 

Convenient short name for the verification reconstruction class.

Explicit specialization of the template determines the precise behavior of VRecon.

Definition at line 62 of file ShareLabel.h.


Member Function Documentation

template<class _ShareType, class _OneWay>
bool CODEX_VSS::ShareLabel< _ShareType, _OneWay >::check const ShareType share,
const OneWay func
const [inline]
 

Test a share against its validity information.

This should be specialized for the type of share and function.

Parameters:
share The share to test.
func The one-way function to apply to share.

Definition at line 277 of file ShareLabel.h.

template<class _ShareType, class _OneWay>
int CODEX_VSS::ShareLabel< _ShareType, _OneWay >::cmp const ShareLabel< _ShareType, _OneWay > &  aOther  )  const [inline]
 

Generic comparator method.

The ordering is arbitrary, but deterministic. Since it's only used for sorting and finding purposes, this does not really matter.

Parameters:
aOther A ShareLabel with which to compare this one.
The assumed calling syntax for a and b is a.cmp(b)
Return values:
-1 a < b
0 a == b
1 a > b

Definition at line 159 of file ShareLabel.h.

References CODEX_VSS::ShareLabel< _ShareType, _OneWay >::NumShares, and CODEX_ASN1::Integer::value().

Referenced by CODEX_VSS::SubshareLabel< LabelType >::cmp(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator!=(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator<(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator<=(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator==(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator>(), and CODEX_VSS::ShareLabel< _ShareType, _OneWay >::operator>=().

bool CODEX_ASN1::Base::initialized  )  const [inline, inherited]
 

Returns:
Has this object been initialized?

Definition at line 175 of file Base.h.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_APSS::SecretManagement::addComputeMsg(), CODEX_APSS::SecretManagement::addEstablishMsg(), CODEX_APSS::SecretManagement::addEstablishResponse(), CODEX_APSS::SecretManagement::addInitMsg(), CODEX_APSS::SecretManagement::addSharing(), CODEX_APSS::SecretManagement::addSubsharing(), CODEX_VSS::Combinatoric< NumT, ThreshT >::apply(), CODEX_Server::ServerState::caKey(), CODEX_KeyService::ClientCreateCallback::ClientCreateCallback(), CODEX_VSS::Combinatoric< NumT, ThreshT >::count(), CODEX_Server::QuorumBuilderAct::handler(), CODEX_APSS::MessageVerifier::handler(), CODEX_KeyService::DelegateResponseVerifier::handler(), CODEX_KeyService::DelegateRequestDistributor::handler(), CODEX_KeyService::ClientMessageVerifier::handler(), CODEX_KeyService::ClientMessageSigner::handler(), CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_KeyService::KeyInfo::marshal(), CODEX_VSS::LabeledShare< ShareType, OneWay >::marshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal(), CODEX_VSS::ModExpFunctionalArgs::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_VSS::ModExpFunctional::operator()(), CODEX_KeyService::ClientReadCallback::operator()(), CODEX_KeyService::ClientCreateCallback::operator()(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator+=(), CODEX_Server::ServerState::readElGamalShares(), CODEX_VSS::Combinatoric< NumT, ThreshT >::recover(), CODEX_APSS::SecretManagement::sendFinished(), CODEX_Server::ServerState::serviceKey(), CODEX_Server::ServerState::setEGShareCallback(), and CODEX_Server::ServerState::setRSAShareCallback().

template<class _ShareType, class _OneWay>
int CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal unsigned char **  pp  )  const [inline, virtual]
 

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.

Parameters:
pp Serialized form of the object
Returns:
Length of the marshalled data

Implements CODEX_ASN1::Base.

Definition at line 283 of file ShareLabel.h.

References CODEX_ASN1::Base::initialized(), CODEX_ASN1::Integer::marshal(), and CODEX_VSS::ShareLabel< _ShareType, _OneWay >::NumShares.

Referenced by CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_VSS::SecretWitness< ShareType, OneWay >::marshal(), and CODEX_VSS::LabeledShare< ShareType, OneWay >::marshal().

template<class _ShareType, class _OneWay>
void* CODEX_VSS::ShareLabel< _ShareType, _OneWay >::unmarshal void *  bogus,
unsigned char **  pp,
long  length
[inline, virtual]
 

This function takes a serialized representation of the object and recreates the object representation.

This must be overridden by the concrete derived class.

Parameters:
bogus Included for compatibility with OpenSSL ASN.1 macros
pp Serialized form of the data
length Number of bytes of pp to unmarshal
Returns:
success or failure of the unmarshalling

Implements CODEX_ASN1::Base.

Definition at line 315 of file ShareLabel.h.

References CODEX_VSS::ShareLabel< _ShareType, _OneWay >::NumShares, CODEX_VSS::ShareLabel< _ShareType, _OneWay >::unmarshal(), and CODEX_ASN1::Integer::unmarshal().

Referenced by CODEX_VSS::SubshareLabel< LabelType >::unmarshal(), CODEX_VSS::LabeledShare< ShareType, OneWay >::unmarshal(), and CODEX_VSS::ShareLabel< _ShareType, _OneWay >::unmarshal().

template<class _ShareType, class _OneWay>
bool CODEX_VSS::ShareLabel< _ShareType, _OneWay >::verify const typename VType::ValueType vcs,
const OneWay func
const [inline]
 

Check the consistency of the verification data.

Parameters:
vcs The validity check for the secret, which is publicly known.
func The one-way function that can transform the secret or the shares into vcs or the validity checks. This is needed by VRecon.
Returns:
Whether or not VRecon returns a VType::ValueType equal to vcs.

Definition at line 261 of file ShareLabel.h.


The documentation for this class was generated from the following file:
Generated on Fri May 6 17:42:55 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1