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

DLProof.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: DLProof.h,v 1.3 2004/05/19 15:57:00 mmarsh Exp $
00008 //
00009 // $Log: DLProof.h,v $
00010 // Revision 1.3  2004/05/19 15:57:00  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:51  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_THRESHOLDCRYPTO_DLPROOF_H__
00019 #define __CODEX_THRESHOLDCRYPTO_DLPROOF_H__
00020 
00021 #include "CODEX_ASN1/Base.h"
00022 #include "CODEX_ASN1/BigNumber.h"
00023 #include "CODEX_ASN1/SecureBigNumber.h"
00024 #include "CODEX_Ciphers/HashFunction.h"
00025 
00026 namespace CODEX_ThresholdCrypto
00027 {
00034    class DLProof : public CODEX_ASN1::Base
00035    {
00036       public :
00038          DLProof();
00039 
00058          DLProof( const BIGNUM * g1,
00059                   const BIGNUM * g2,
00060                   const BIGNUM * n,
00061                   const BIGNUM * max,
00062                   const BIGNUM * x,
00063                   const CODEX_Ciphers::HashFunction& H );
00064 
00066          DLProof( const DLProof& aOther );
00067 
00069          virtual ~DLProof();
00070 
00072          void operator=( const DLProof& aOther );
00073 
00084          bool verify( const BIGNUM * g1,
00085                       const BIGNUM * g2,
00086                       const BIGNUM * y1,
00087                       const BIGNUM * y2,
00088                       const BIGNUM * n,
00089                       const CODEX_Ciphers::HashFunction& H ) const;
00090 
00092          int marshal( unsigned char ** pp ) const;
00094          void* unmarshal( void* bogus, unsigned char ** pp, long length );
00095 
00096       private :
00097          CODEX_ASN1::BigNumber  m_r1;
00098          CODEX_ASN1::BigNumber  m_r2;
00099          CODEX_ASN1::BigNumber  m_t;
00100    };
00101 
00102 }
00103 
00104 #endif /* __CODEX_THRESHOLDCRYPTO_DLPROOF_H__ */

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