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

VerifiableBlindKeyMsg.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: VerifiableBlindKeyMsg.h,v 1.5 2005/01/21 19:44:17 mmarsh Exp $
00008 //
00009 // $Log: VerifiableBlindKeyMsg.h,v $
00010 // Revision 1.5  2005/01/21 19:44:17  mmarsh
00011 // Updated for compatibility with Doxygen 1.4.1
00012 //
00013 // Revision 1.4  2004/05/19 15:56:53  mmarsh
00014 // *** empty log message ***
00015 //
00016 // Revision 1.3  2003/11/04 22:31:49  mmarsh
00017 // *** empty log message ***
00018 //
00019 //
00020 
00021 #ifndef __CODEX_KEYSERVICE_VERIFIABLEBLINDKEYMSG_H__
00022 #define __CODEX_KEYSERVICE_VERIFIABLEBLINDKEYMSG_H__
00023 
00024 #include "CODEX_Client/Message.h"
00025 #include "CODEX_ThresholdCrypto/DLProof.h"
00026 #include "CODEX_Server/ServerState.h"
00027 
00028 namespace CODEX_KeyService
00029 {
00042    class VerifiableBlindKeyMsg : public CODEX_Client::BlindKeyMsg
00043    {
00044       public :
00046          static const unsigned int
00047          NumProofs = CODEX_Server::ServerState::ShareType::NumShares;
00048 
00050          typedef CODEX_Server::ServerState::ShareType::ValueType  ValueType;
00051 
00053          typedef CODEX_Server::ServerState::LSType::LabelType  LabelType;
00054 
00056          typedef CODEX_ThresholdCrypto::DLProof  DLProof;
00057 
00059          typedef CODEX_Client::CipherTextType  CipherTextType;
00060 
00062          typedef CODEX_Client::BlindCipherTextType  BlindCipherTextType;
00063 
00065          typedef CODEX_Client::BlindPlainTextType  BlindPlainTextType;
00066 
00068          VerifiableBlindKeyMsg();
00069 
00071          VerifiableBlindKeyMsg(
00072             const CODEX_ASN1::OctetString& name,
00073             const BlindPlainTextType& blindedKey,
00074             const CODEX_Ciphers::RSASignature& requestSignature,
00075 #ifdef ELGAMAL
00076             const LabelType& label,
00077             const CODEX_Server::ServerState::ShareSetType& partials,
00078             const vector< DLProof >& proofs,
00079 #endif /* ELGAMAL */
00080             const BlindCipherTextType& blindCipher );
00081 
00083          VerifiableBlindKeyMsg( const VerifiableBlindKeyMsg& aBKM );
00084 
00086          virtual ~VerifiableBlindKeyMsg() {}
00087 
00089          void operator=( const VerifiableBlindKeyMsg& aBKM );
00090 
00092          CODEX_Client::BlindKeyMsg upcast() const
00093          {
00094             return CODEX_Client::BlindKeyMsg(*this);
00095          }
00096 
00098          int marshal( unsigned char ** pp ) const;
00100          void* unmarshal( void* bogus, unsigned char ** pp, long length );
00101 
00103          const BlindCipherTextType& blindCipher() const
00104          {
00105             return m_blindCipher;
00106          }
00107 
00108 #ifdef ELGAMAL
00109 
00110          const LabelType& label() const { return m_label; }
00111 
00119          const ValueType& partial( unsigned int i ) const
00120          {
00121             if ( i >= NumProofs )
00122             {
00123                throw CODEX_Exceptions::IllegalIndexException( __FILE__ ,
00124                                                               __LINE__ );
00125             }
00126             return m_partials[i];
00127          }
00128 
00136          const DLProof& proof( unsigned int i ) const
00137          {
00138             if ( i >= NumProofs )
00139             {
00140                throw CODEX_Exceptions::IllegalIndexException( __FILE__ ,
00141                                                               __LINE__ );
00142             }
00143             return m_proofs[i];
00144          }
00145 #endif /* ELGAMAL */
00146 
00147       private :
00148 #ifdef ELGAMAL
00149          LabelType            m_label;
00150          ValueType            m_partials[NumProofs];
00151          DLProof              m_proofs[NumProofs];
00152 #endif /* ELGAMAL */
00153          BlindCipherTextType  m_blindCipher;
00154    };
00155 
00156 }
00157 
00158 #endif /* __CODEX_KEYSERVICE_VERIFIABLEBLINDKEYMSG_H__ */

Generated on Fri May 6 17:41:27 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1