00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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