Lines 36-41
Link Here
|
36 |
#include "filters.h" |
36 |
#include "filters.h" |
37 |
#include "eprecomp.h" |
37 |
#include "eprecomp.h" |
38 |
#include "fips140.h" |
38 |
#include "fips140.h" |
|
|
39 |
#include "modarith.h" |
39 |
#include "argnames.h" |
40 |
#include "argnames.h" |
40 |
#include <memory> |
41 |
#include <memory> |
41 |
|
42 |
|
Lines 142-153
Link Here
|
142 |
class TF_CryptoSystemBase : public INTERFACE, protected BASE |
143 |
class TF_CryptoSystemBase : public INTERFACE, protected BASE |
143 |
{ |
144 |
{ |
144 |
public: |
145 |
public: |
145 |
unsigned int FixedMaxPlaintextLength() const {return GetMessageEncodingInterface().MaxUnpaddedLength(PaddedBlockBitLength());} |
146 |
unsigned int FixedMaxPlaintextLength() const {return this->GetMessageEncodingInterface().MaxUnpaddedLength(PaddedBlockBitLength());} |
146 |
unsigned int FixedCiphertextLength() const {return GetTrapdoorFunctionBounds().MaxImage().ByteCount();} |
147 |
unsigned int FixedCiphertextLength() const {return this->GetTrapdoorFunctionBounds().MaxImage().ByteCount();} |
147 |
|
148 |
|
148 |
protected: |
149 |
protected: |
149 |
unsigned int PaddedBlockByteLength() const {return BitsToBytes(PaddedBlockBitLength());} |
150 |
unsigned int PaddedBlockByteLength() const {return BitsToBytes(PaddedBlockBitLength());} |
150 |
unsigned int PaddedBlockBitLength() const {return GetTrapdoorFunctionBounds().PreimageBound().BitCount()-1;} |
151 |
unsigned int PaddedBlockBitLength() const {return this->GetTrapdoorFunctionBounds().PreimageBound().BitCount()-1;} |
151 |
}; |
152 |
}; |
152 |
|
153 |
|
153 |
//! . |
154 |
//! . |
Lines 288-294
Link Here
|
288 |
class PK_MessageAccumulatorImpl : public PK_MessageAccumulatorBase, protected ObjectHolder<HASH_ALGORITHM> |
289 |
class PK_MessageAccumulatorImpl : public PK_MessageAccumulatorBase, protected ObjectHolder<HASH_ALGORITHM> |
289 |
{ |
290 |
{ |
290 |
public: |
291 |
public: |
291 |
HashTransformation & AccessHash() {return m_object;} |
292 |
HashTransformation & AccessHash() {return this->m_object;} |
292 |
}; |
293 |
}; |
293 |
|
294 |
|
294 |
//! . |
295 |
//! . |
Lines 297-318
Link Here
|
297 |
{ |
298 |
{ |
298 |
public: |
299 |
public: |
299 |
unsigned int SignatureLength() const |
300 |
unsigned int SignatureLength() const |
300 |
{return GetTrapdoorFunctionBounds().MaxPreimage().ByteCount();} |
301 |
{return this->GetTrapdoorFunctionBounds().MaxPreimage().ByteCount();} |
301 |
unsigned int MaxRecoverableLength() const |
302 |
unsigned int MaxRecoverableLength() const |
302 |
{return GetMessageEncodingInterface().MaxRecoverableLength(MessageRepresentativeBitLength(), GetHashIdentifier().second, GetDigestSize());} |
303 |
{return this->GetMessageEncodingInterface().MaxRecoverableLength(MessageRepresentativeBitLength(), GetHashIdentifier().second, GetDigestSize());} |
303 |
unsigned int MaxRecoverableLengthFromSignatureLength(unsigned int signatureLength) const |
304 |
unsigned int MaxRecoverableLengthFromSignatureLength(unsigned int signatureLength) const |
304 |
{return MaxRecoverableLength();} |
305 |
{return MaxRecoverableLength();} |
305 |
|
306 |
|
306 |
bool IsProbabilistic() const |
307 |
bool IsProbabilistic() const |
307 |
{return GetTrapdoorFunctionInterface().IsRandomized() || GetMessageEncodingInterface().IsProbabilistic();} |
308 |
{return this->GetTrapdoorFunctionInterface().IsRandomized() || this->GetMessageEncodingInterface().IsProbabilistic();} |
308 |
bool AllowNonrecoverablePart() const |
309 |
bool AllowNonrecoverablePart() const |
309 |
{return GetMessageEncodingInterface().AllowNonrecoverablePart();} |
310 |
{return this->GetMessageEncodingInterface().AllowNonrecoverablePart();} |
310 |
bool RecoverablePartFirst() const |
311 |
bool RecoverablePartFirst() const |
311 |
{return GetMessageEncodingInterface().RecoverablePartFirst();} |
312 |
{return this->GetMessageEncodingInterface().RecoverablePartFirst();} |
312 |
|
313 |
|
313 |
protected: |
314 |
protected: |
314 |
unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());} |
315 |
unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());} |
315 |
unsigned int MessageRepresentativeBitLength() const {return GetTrapdoorFunctionBounds().ImageBound().BitCount()-1;} |
316 |
unsigned int MessageRepresentativeBitLength() const {return this->GetTrapdoorFunctionBounds().ImageBound().BitCount()-1;} |
316 |
virtual HashIdentifier GetHashIdentifier() const =0; |
317 |
virtual HashIdentifier GetHashIdentifier() const =0; |
317 |
virtual unsigned int GetDigestSize() const =0; |
318 |
virtual unsigned int GetDigestSize() const =0; |
318 |
}; |
319 |
}; |
Lines 401-407
Link Here
|
401 |
// for signature scheme |
402 |
// for signature scheme |
402 |
HashIdentifier GetHashIdentifier() const |
403 |
HashIdentifier GetHashIdentifier() const |
403 |
{ |
404 |
{ |
404 |
typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L; |
405 |
typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::template HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L; |
405 |
return L::Lookup(); |
406 |
return L::Lookup(); |
406 |
} |
407 |
} |
407 |
unsigned int GetDigestSize() const |
408 |
unsigned int GetDigestSize() const |
Lines 446-452
Link Here
|
446 |
class TF_PublicObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PublicKey>, public PublicKeyCopier<SCHEME_OPTIONS> |
447 |
class TF_PublicObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PublicKey>, public PublicKeyCopier<SCHEME_OPTIONS> |
447 |
{ |
448 |
{ |
448 |
public: |
449 |
public: |
449 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = GetKey();} |
450 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = this->GetKey();} |
450 |
}; |
451 |
}; |
451 |
|
452 |
|
452 |
//! . |
453 |
//! . |
Lines 454-461
Link Here
|
454 |
class TF_PrivateObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PrivateKey>, public PrivateKeyCopier<SCHEME_OPTIONS> |
455 |
class TF_PrivateObjectImpl : public TF_ObjectImpl<BASE, SCHEME_OPTIONS, typename SCHEME_OPTIONS::PrivateKey>, public PrivateKeyCopier<SCHEME_OPTIONS> |
455 |
{ |
456 |
{ |
456 |
public: |
457 |
public: |
457 |
void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const {key = GetKey();} |
458 |
void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const {key = this->GetKey();} |
458 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = GetKey();} |
459 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const {key = this->GetKey();} |
459 |
}; |
460 |
}; |
460 |
|
461 |
|
461 |
//! . |
462 |
//! . |
Lines 674-696
Link Here
|
674 |
|
675 |
|
675 |
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const |
676 |
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const |
676 |
{ |
677 |
{ |
677 |
return GetValueHelper(this, name, valueType, pValue, &GetAbstractGroupParameters()) |
678 |
return GetValueHelper(this, name, valueType, pValue, &this->GetAbstractGroupParameters()) |
678 |
CRYPTOPP_GET_FUNCTION_ENTRY(PublicElement); |
679 |
CRYPTOPP_GET_FUNCTION_ENTRY(PublicElement); |
679 |
} |
680 |
} |
680 |
|
681 |
|
681 |
void AssignFrom(const NameValuePairs &source); |
682 |
void AssignFrom(const NameValuePairs &source); |
682 |
|
683 |
|
683 |
// non-inherited |
684 |
// non-inherited |
684 |
virtual const Element & GetPublicElement() const {return GetPublicPrecomputation().GetBase(GetAbstractGroupParameters().GetGroupPrecomputation());} |
685 |
virtual const Element & GetPublicElement() const {return this->GetPublicPrecomputation().GetBase(this->GetAbstractGroupParameters().GetGroupPrecomputation());} |
685 |
virtual void SetPublicElement(const Element &y) {AccessPublicPrecomputation().SetBase(GetAbstractGroupParameters().GetGroupPrecomputation(), y);} |
686 |
virtual void SetPublicElement(const Element &y) {AccessPublicPrecomputation().SetBase(this->GetAbstractGroupParameters().GetGroupPrecomputation(), y);} |
686 |
virtual Element ExponentiatePublicElement(const Integer &exponent) const |
687 |
virtual Element ExponentiatePublicElement(const Integer &exponent) const |
687 |
{ |
688 |
{ |
688 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
689 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
689 |
return GetPublicPrecomputation().Exponentiate(params.GetGroupPrecomputation(), exponent); |
690 |
return GetPublicPrecomputation().Exponentiate(params.GetGroupPrecomputation(), exponent); |
690 |
} |
691 |
} |
691 |
virtual Element CascadeExponentiateBaseAndPublicElement(const Integer &baseExp, const Integer &publicExp) const |
692 |
virtual Element CascadeExponentiateBaseAndPublicElement(const Integer &baseExp, const Integer &publicExp) const |
692 |
{ |
693 |
{ |
693 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
694 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
694 |
return params.GetBasePrecomputation().CascadeExponentiate(params.GetGroupPrecomputation(), baseExp, GetPublicPrecomputation(), publicExp); |
695 |
return params.GetBasePrecomputation().CascadeExponentiate(params.GetGroupPrecomputation(), baseExp, GetPublicPrecomputation(), publicExp); |
695 |
} |
696 |
} |
696 |
|
697 |
|
Lines 709-727
Link Here
|
709 |
|
710 |
|
710 |
void MakePublicKey(DL_PublicKey<T> &pub) const |
711 |
void MakePublicKey(DL_PublicKey<T> &pub) const |
711 |
{ |
712 |
{ |
712 |
pub.AccessAbstractGroupParameters().AssignFrom(GetAbstractGroupParameters()); |
713 |
pub.AccessAbstractGroupParameters().AssignFrom(this->GetAbstractGroupParameters()); |
713 |
pub.SetPublicElement(GetAbstractGroupParameters().ExponentiateBase(GetPrivateExponent())); |
714 |
pub.SetPublicElement(this->GetAbstractGroupParameters().ExponentiateBase(GetPrivateExponent())); |
714 |
} |
715 |
} |
715 |
|
716 |
|
716 |
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const |
717 |
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const |
717 |
{ |
718 |
{ |
718 |
return GetValueHelper(this, name, valueType, pValue, &GetAbstractGroupParameters()) |
719 |
return GetValueHelper(this, name, valueType, pValue, &this->GetAbstractGroupParameters()) |
719 |
CRYPTOPP_GET_FUNCTION_ENTRY(PrivateExponent); |
720 |
CRYPTOPP_GET_FUNCTION_ENTRY(PrivateExponent); |
720 |
} |
721 |
} |
721 |
|
722 |
|
722 |
void AssignFrom(const NameValuePairs &source) |
723 |
void AssignFrom(const NameValuePairs &source) |
723 |
{ |
724 |
{ |
724 |
AccessAbstractGroupParameters().AssignFrom(source); |
725 |
this->AccessAbstractGroupParameters().AssignFrom(source); |
725 |
AssignFromHelper(this, source) |
726 |
AssignFromHelper(this, source) |
726 |
CRYPTOPP_SET_FUNCTION_ENTRY(PrivateExponent); |
727 |
CRYPTOPP_SET_FUNCTION_ENTRY(PrivateExponent); |
727 |
} |
728 |
} |
Lines 738-744
Link Here
|
738 |
pPrivateKey->MakePublicKey(*this); |
739 |
pPrivateKey->MakePublicKey(*this); |
739 |
else |
740 |
else |
740 |
{ |
741 |
{ |
741 |
AccessAbstractGroupParameters().AssignFrom(source); |
742 |
this->AccessAbstractGroupParameters().AssignFrom(source); |
742 |
AssignFromHelper(this, source) |
743 |
AssignFromHelper(this, source) |
743 |
CRYPTOPP_SET_FUNCTION_ENTRY(PublicElement); |
744 |
CRYPTOPP_SET_FUNCTION_ENTRY(PublicElement); |
744 |
} |
745 |
} |
Lines 806-813
Link Here
|
806 |
|
807 |
|
807 |
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs ¶ms) |
808 |
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs ¶ms) |
808 |
{ |
809 |
{ |
809 |
if (!params.GetThisObject(AccessGroupParameters())) |
810 |
if (!params.GetThisObject(this->AccessGroupParameters())) |
810 |
AccessGroupParameters().GenerateRandom(rng, params); |
811 |
this->AccessGroupParameters().GenerateRandom(rng, params); |
811 |
// std::pair<const byte *, int> seed; |
812 |
// std::pair<const byte *, int> seed; |
812 |
Integer x(rng, Integer::One(), GetAbstractGroupParameters().GetMaxExponent()); |
813 |
Integer x(rng, Integer::One(), GetAbstractGroupParameters().GetMaxExponent()); |
813 |
// Integer::ANY, Integer::Zero(), Integer::One(), |
814 |
// Integer::ANY, Integer::Zero(), Integer::One(), |
Lines 827-834
Link Here
|
827 |
{GetAbstractGroupParameters().SavePrecomputation(storedPrecomputation);} |
828 |
{GetAbstractGroupParameters().SavePrecomputation(storedPrecomputation);} |
828 |
|
829 |
|
829 |
// DL_Key |
830 |
// DL_Key |
830 |
const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return GetGroupParameters();} |
831 |
const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return this->GetGroupParameters();} |
831 |
DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return AccessGroupParameters();} |
832 |
DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return this->AccessGroupParameters();} |
832 |
|
833 |
|
833 |
// DL_PrivateKey |
834 |
// DL_PrivateKey |
834 |
const Integer & GetPrivateExponent() const {return m_x;} |
835 |
const Integer & GetPrivateExponent() const {return m_x;} |
Lines 873-879
Link Here
|
873 |
bool Validate(RandomNumberGenerator &rng, unsigned int level) const |
874 |
bool Validate(RandomNumberGenerator &rng, unsigned int level) const |
874 |
{ |
875 |
{ |
875 |
bool pass = GetAbstractGroupParameters().Validate(rng, level); |
876 |
bool pass = GetAbstractGroupParameters().Validate(rng, level); |
876 |
pass = pass && GetAbstractGroupParameters().ValidateElement(level, GetPublicElement(), &GetPublicPrecomputation()); |
877 |
pass = pass && GetAbstractGroupParameters().ValidateElement(level, this->GetPublicElement(), &GetPublicPrecomputation()); |
877 |
return pass; |
878 |
return pass; |
878 |
} |
879 |
} |
879 |
|
880 |
|
Lines 908-915
Link Here
|
908 |
} |
909 |
} |
909 |
|
910 |
|
910 |
// DL_Key |
911 |
// DL_Key |
911 |
const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return GetGroupParameters();} |
912 |
const DL_GroupParameters<Element> & GetAbstractGroupParameters() const {return this->GetGroupParameters();} |
912 |
DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return AccessGroupParameters();} |
913 |
DL_GroupParameters<Element> & AccessAbstractGroupParameters() {return this->AccessGroupParameters();} |
913 |
|
914 |
|
914 |
// DL_PublicKey |
915 |
// DL_PublicKey |
915 |
const DL_FixedBasePrecomputation<Element> & GetPublicPrecomputation() const {return m_ypc;} |
916 |
const DL_FixedBasePrecomputation<Element> & GetPublicPrecomputation() const {return m_ypc;} |
Lines 917-923
Link Here
|
917 |
|
918 |
|
918 |
// non-inherited |
919 |
// non-inherited |
919 |
bool operator==(const DL_PublicKeyImpl<GP> &rhs) const |
920 |
bool operator==(const DL_PublicKeyImpl<GP> &rhs) const |
920 |
{return GetGroupParameters() == rhs.GetGroupParameters() && GetPublicElement() == rhs.GetPublicElement();} |
921 |
{return this->GetGroupParameters() == rhs.GetGroupParameters() && this->GetPublicElement() == rhs.GetPublicElement();} |
921 |
|
922 |
|
922 |
private: |
923 |
private: |
923 |
typename GP::BasePrecomputation m_ypc; |
924 |
typename GP::BasePrecomputation m_ypc; |
Lines 991-998
Link Here
|
991 |
public: |
992 |
public: |
992 |
unsigned int SignatureLength() const |
993 |
unsigned int SignatureLength() const |
993 |
{ |
994 |
{ |
994 |
return GetSignatureAlgorithm().RLen(GetAbstractGroupParameters()) |
995 |
return GetSignatureAlgorithm().RLen(this->GetAbstractGroupParameters()) |
995 |
+ GetSignatureAlgorithm().SLen(GetAbstractGroupParameters()); |
996 |
+ GetSignatureAlgorithm().SLen(this->GetAbstractGroupParameters()); |
996 |
} |
997 |
} |
997 |
unsigned int MaxRecoverableLength() const |
998 |
unsigned int MaxRecoverableLength() const |
998 |
{return GetMessageEncodingInterface().MaxRecoverableLength(0, GetHashIdentifier().second, GetDigestSize());} |
999 |
{return GetMessageEncodingInterface().MaxRecoverableLength(0, GetHashIdentifier().second, GetDigestSize());} |
Lines 1008-1014
Link Here
|
1008 |
|
1009 |
|
1009 |
protected: |
1010 |
protected: |
1010 |
unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());} |
1011 |
unsigned int MessageRepresentativeLength() const {return BitsToBytes(MessageRepresentativeBitLength());} |
1011 |
unsigned int MessageRepresentativeBitLength() const {return GetAbstractGroupParameters().GetSubgroupOrder().BitCount();} |
1012 |
unsigned int MessageRepresentativeBitLength() const {return this->GetAbstractGroupParameters().GetSubgroupOrder().BitCount();} |
1012 |
|
1013 |
|
1013 |
virtual const DL_ElgamalLikeSignatureAlgorithm<CPP_TYPENAME KEY_INTERFACE::Element> & GetSignatureAlgorithm() const =0; |
1014 |
virtual const DL_ElgamalLikeSignatureAlgorithm<CPP_TYPENAME KEY_INTERFACE::Element> & GetSignatureAlgorithm() const =0; |
1014 |
virtual const PK_SignatureMessageEncodingMethod & GetMessageEncodingInterface() const =0; |
1015 |
virtual const PK_SignatureMessageEncodingMethod & GetMessageEncodingInterface() const =0; |
Lines 1024-1032
Link Here
|
1024 |
// for validation testing |
1025 |
// for validation testing |
1025 |
void RawSign(const Integer &k, const Integer &e, Integer &r, Integer &s) const |
1026 |
void RawSign(const Integer &k, const Integer &e, Integer &r, Integer &s) const |
1026 |
{ |
1027 |
{ |
1027 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1028 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1028 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1029 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1029 |
const DL_PrivateKey<T> &key = GetKeyInterface(); |
1030 |
const DL_PrivateKey<T> &key = this->GetKeyInterface(); |
1030 |
|
1031 |
|
1031 |
r = params.ConvertElementToInteger(params.ExponentiateBase(k)); |
1032 |
r = params.ConvertElementToInteger(params.ExponentiateBase(k)); |
1032 |
alg.Sign(params, key.GetPrivateExponent(), k, e, r, s); |
1033 |
alg.Sign(params, key.GetPrivateExponent(), k, e, r, s); |
Lines 1036-1042
Link Here
|
1036 |
{ |
1037 |
{ |
1037 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1038 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1038 |
ma.m_recoverableMessage.Assign(recoverableMessage, recoverableMessageLength); |
1039 |
ma.m_recoverableMessage.Assign(recoverableMessage, recoverableMessageLength); |
1039 |
GetMessageEncodingInterface().ProcessRecoverableMessage(ma.AccessHash(), |
1040 |
this->GetMessageEncodingInterface().ProcessRecoverableMessage(ma.AccessHash(), |
1040 |
recoverableMessage, recoverableMessageLength, |
1041 |
recoverableMessage, recoverableMessageLength, |
1041 |
ma.m_presignature, ma.m_presignature.size(), |
1042 |
ma.m_presignature, ma.m_presignature.size(), |
1042 |
ma.m_semisignature); |
1043 |
ma.m_semisignature); |
Lines 1044-1067
Link Here
|
1044 |
|
1045 |
|
1045 |
unsigned int SignAndRestart(RandomNumberGenerator &rng, PK_MessageAccumulator &messageAccumulator, byte *signature, bool restart) const |
1046 |
unsigned int SignAndRestart(RandomNumberGenerator &rng, PK_MessageAccumulator &messageAccumulator, byte *signature, bool restart) const |
1046 |
{ |
1047 |
{ |
1047 |
GetMaterial().DoQuickSanityCheck(); |
1048 |
this->GetMaterial().DoQuickSanityCheck(); |
1048 |
|
1049 |
|
1049 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1050 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1050 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1051 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1051 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1052 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1052 |
const DL_PrivateKey<T> &key = GetKeyInterface(); |
1053 |
const DL_PrivateKey<T> &key = this->GetKeyInterface(); |
1053 |
|
1054 |
|
1054 |
SecByteBlock representative(MessageRepresentativeLength()); |
1055 |
SecByteBlock representative(this->MessageRepresentativeLength()); |
1055 |
GetMessageEncodingInterface().ComputeMessageRepresentative( |
1056 |
this->GetMessageEncodingInterface().ComputeMessageRepresentative( |
1056 |
rng, |
1057 |
rng, |
1057 |
ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1058 |
ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1058 |
ma.AccessHash(), GetHashIdentifier(), ma.m_empty, |
1059 |
ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty, |
1059 |
representative, MessageRepresentativeBitLength()); |
1060 |
representative, this->MessageRepresentativeBitLength()); |
1060 |
ma.m_empty = true; |
1061 |
ma.m_empty = true; |
1061 |
Integer e(representative, representative.size()); |
1062 |
Integer e(representative, representative.size()); |
1062 |
|
1063 |
|
1063 |
Integer r; |
1064 |
Integer r; |
1064 |
if (MaxRecoverableLength() > 0) |
1065 |
if (this->MaxRecoverableLength() > 0) |
1065 |
r.Decode(ma.m_semisignature, ma.m_semisignature.size()); |
1066 |
r.Decode(ma.m_semisignature, ma.m_semisignature.size()); |
1066 |
else |
1067 |
else |
1067 |
r.Decode(ma.m_presignature, ma.m_presignature.size()); |
1068 |
r.Decode(ma.m_presignature, ma.m_presignature.size()); |
Lines 1075-1088
Link Here
|
1075 |
if (restart) |
1076 |
if (restart) |
1076 |
RestartMessageAccumulator(rng, ma); |
1077 |
RestartMessageAccumulator(rng, ma); |
1077 |
|
1078 |
|
1078 |
return SignatureLength(); |
1079 |
return this->SignatureLength(); |
1079 |
} |
1080 |
} |
1080 |
|
1081 |
|
1081 |
protected: |
1082 |
protected: |
1082 |
void RestartMessageAccumulator(RandomNumberGenerator &rng, PK_MessageAccumulatorBase &ma) const |
1083 |
void RestartMessageAccumulator(RandomNumberGenerator &rng, PK_MessageAccumulatorBase &ma) const |
1083 |
{ |
1084 |
{ |
1084 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1085 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1085 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1086 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1086 |
ma.m_k.Randomize(rng, 1, params.GetSubgroupOrder()-1); |
1087 |
ma.m_k.Randomize(rng, 1, params.GetSubgroupOrder()-1); |
1087 |
ma.m_presignature.New(params.GetEncodedElementSize(false)); |
1088 |
ma.m_presignature.New(params.GetEncodedElementSize(false)); |
1088 |
params.ConvertElementToInteger(params.ExponentiateBase(ma.m_k)).Encode(ma.m_presignature, ma.m_presignature.size()); |
1089 |
params.ConvertElementToInteger(params.ExponentiateBase(ma.m_k)).Encode(ma.m_presignature, ma.m_presignature.size()); |
Lines 1097-1125
Link Here
|
1097 |
void InputSignature(PK_MessageAccumulator &messageAccumulator, const byte *signature, unsigned int signatureLength) const |
1098 |
void InputSignature(PK_MessageAccumulator &messageAccumulator, const byte *signature, unsigned int signatureLength) const |
1098 |
{ |
1099 |
{ |
1099 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1100 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1100 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1101 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1101 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1102 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1102 |
|
1103 |
|
1103 |
unsigned int rLen = alg.RLen(params); |
1104 |
unsigned int rLen = alg.RLen(params); |
1104 |
ma.m_semisignature.Assign(signature, rLen); |
1105 |
ma.m_semisignature.Assign(signature, rLen); |
1105 |
ma.m_s.Decode(signature+rLen, alg.SLen(params)); |
1106 |
ma.m_s.Decode(signature+rLen, alg.SLen(params)); |
1106 |
|
1107 |
|
1107 |
GetMessageEncodingInterface().ProcessSemisignature(ma.AccessHash(), ma.m_semisignature, ma.m_semisignature.size()); |
1108 |
this->GetMessageEncodingInterface().ProcessSemisignature(ma.AccessHash(), ma.m_semisignature, ma.m_semisignature.size()); |
1108 |
} |
1109 |
} |
1109 |
|
1110 |
|
1110 |
bool VerifyAndRestart(PK_MessageAccumulator &messageAccumulator) const |
1111 |
bool VerifyAndRestart(PK_MessageAccumulator &messageAccumulator) const |
1111 |
{ |
1112 |
{ |
1112 |
GetMaterial().DoQuickSanityCheck(); |
1113 |
this->GetMaterial().DoQuickSanityCheck(); |
1113 |
|
1114 |
|
1114 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1115 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1115 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1116 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1116 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1117 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1117 |
const DL_PublicKey<T> &key = GetKeyInterface(); |
1118 |
const DL_PublicKey<T> &key = this->GetKeyInterface(); |
1118 |
|
1119 |
|
1119 |
SecByteBlock representative(MessageRepresentativeLength()); |
1120 |
SecByteBlock representative(this->MessageRepresentativeLength()); |
1120 |
GetMessageEncodingInterface().ComputeMessageRepresentative(NullRNG(), ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1121 |
this->GetMessageEncodingInterface().ComputeMessageRepresentative(NullRNG(), ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1121 |
ma.AccessHash(), GetHashIdentifier(), ma.m_empty, |
1122 |
ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty, |
1122 |
representative, MessageRepresentativeBitLength()); |
1123 |
representative, this->MessageRepresentativeBitLength()); |
1123 |
ma.m_empty = true; |
1124 |
ma.m_empty = true; |
1124 |
Integer e(representative, representative.size()); |
1125 |
Integer e(representative, representative.size()); |
1125 |
|
1126 |
|
Lines 1129-1147
Link Here
|
1129 |
|
1130 |
|
1130 |
DecodingResult RecoverAndRestart(byte *recoveredMessage, PK_MessageAccumulator &messageAccumulator) const |
1131 |
DecodingResult RecoverAndRestart(byte *recoveredMessage, PK_MessageAccumulator &messageAccumulator) const |
1131 |
{ |
1132 |
{ |
1132 |
GetMaterial().DoQuickSanityCheck(); |
1133 |
this->GetMaterial().DoQuickSanityCheck(); |
1133 |
|
1134 |
|
1134 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1135 |
PK_MessageAccumulatorBase &ma = static_cast<PK_MessageAccumulatorBase &>(messageAccumulator); |
1135 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = GetSignatureAlgorithm(); |
1136 |
const DL_ElgamalLikeSignatureAlgorithm<T> &alg = this->GetSignatureAlgorithm(); |
1136 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1137 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1137 |
const DL_PublicKey<T> &key = GetKeyInterface(); |
1138 |
const DL_PublicKey<T> &key = this->GetKeyInterface(); |
1138 |
|
1139 |
|
1139 |
SecByteBlock representative(MessageRepresentativeLength()); |
1140 |
SecByteBlock representative(this->MessageRepresentativeLength()); |
1140 |
GetMessageEncodingInterface().ComputeMessageRepresentative( |
1141 |
this->GetMessageEncodingInterface().ComputeMessageRepresentative( |
1141 |
NullRNG(), |
1142 |
NullRNG(), |
1142 |
ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1143 |
ma.m_recoverableMessage, ma.m_recoverableMessage.size(), |
1143 |
ma.AccessHash(), GetHashIdentifier(), ma.m_empty, |
1144 |
ma.AccessHash(), this->GetHashIdentifier(), ma.m_empty, |
1144 |
representative, MessageRepresentativeBitLength()); |
1145 |
representative, this->MessageRepresentativeBitLength()); |
1145 |
ma.m_empty = true; |
1146 |
ma.m_empty = true; |
1146 |
Integer e(representative, representative.size()); |
1147 |
Integer e(representative, representative.size()); |
1147 |
|
1148 |
|
Lines 1149-1156
Link Here
|
1149 |
Integer r(ma.m_semisignature, ma.m_semisignature.size()); |
1150 |
Integer r(ma.m_semisignature, ma.m_semisignature.size()); |
1150 |
alg.RecoverPresignature(params, key, r, ma.m_s).Encode(ma.m_presignature, ma.m_presignature.size()); |
1151 |
alg.RecoverPresignature(params, key, r, ma.m_s).Encode(ma.m_presignature, ma.m_presignature.size()); |
1151 |
|
1152 |
|
1152 |
return GetMessageEncodingInterface().RecoverMessageFromSemisignature( |
1153 |
return this->GetMessageEncodingInterface().RecoverMessageFromSemisignature( |
1153 |
ma.AccessHash(), GetHashIdentifier(), |
1154 |
ma.AccessHash(), this->GetHashIdentifier(), |
1154 |
ma.m_presignature, ma.m_presignature.size(), |
1155 |
ma.m_presignature, ma.m_presignature.size(), |
1155 |
ma.m_semisignature, ma.m_semisignature.size(), |
1156 |
ma.m_semisignature, ma.m_semisignature.size(), |
1156 |
recoveredMessage); |
1157 |
recoveredMessage); |
Lines 1166-1179
Link Here
|
1166 |
|
1167 |
|
1167 |
unsigned int MaxPlaintextLength(unsigned int cipherTextLength) const |
1168 |
unsigned int MaxPlaintextLength(unsigned int cipherTextLength) const |
1168 |
{ |
1169 |
{ |
1169 |
unsigned int minLen = GetAbstractGroupParameters().GetEncodedElementSize(true); |
1170 |
unsigned int minLen = this->GetAbstractGroupParameters().GetEncodedElementSize(true); |
1170 |
return cipherTextLength < minLen ? 0 : GetSymmetricEncryptionAlgorithm().GetMaxSymmetricPlaintextLength(cipherTextLength - minLen); |
1171 |
return cipherTextLength < minLen ? 0 : GetSymmetricEncryptionAlgorithm().GetMaxSymmetricPlaintextLength(cipherTextLength - minLen); |
1171 |
} |
1172 |
} |
1172 |
|
1173 |
|
1173 |
unsigned int CiphertextLength(unsigned int plainTextLength) const |
1174 |
unsigned int CiphertextLength(unsigned int plainTextLength) const |
1174 |
{ |
1175 |
{ |
1175 |
unsigned int len = GetSymmetricEncryptionAlgorithm().GetSymmetricCiphertextLength(plainTextLength); |
1176 |
unsigned int len = GetSymmetricEncryptionAlgorithm().GetSymmetricCiphertextLength(plainTextLength); |
1176 |
return len == 0 ? 0 : GetAbstractGroupParameters().GetEncodedElementSize(true) + len; |
1177 |
return len == 0 ? 0 : this->GetAbstractGroupParameters().GetEncodedElementSize(true) + len; |
1177 |
} |
1178 |
} |
1178 |
|
1179 |
|
1179 |
protected: |
1180 |
protected: |
Lines 1193-1203
Link Here
|
1193 |
{ |
1194 |
{ |
1194 |
try |
1195 |
try |
1195 |
{ |
1196 |
{ |
1196 |
const DL_KeyAgreementAlgorithm<T> &agreeAlg = GetKeyAgreementAlgorithm(); |
1197 |
const DL_KeyAgreementAlgorithm<T> &agreeAlg = this->GetKeyAgreementAlgorithm(); |
1197 |
const DL_KeyDerivationAlgorithm<T> &derivAlg = GetKeyDerivationAlgorithm(); |
1198 |
const DL_KeyDerivationAlgorithm<T> &derivAlg = this->GetKeyDerivationAlgorithm(); |
1198 |
const DL_SymmetricEncryptionAlgorithm &encAlg = GetSymmetricEncryptionAlgorithm(); |
1199 |
const DL_SymmetricEncryptionAlgorithm &encAlg = this->GetSymmetricEncryptionAlgorithm(); |
1199 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1200 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1200 |
const DL_PrivateKey<T> &key = GetKeyInterface(); |
1201 |
const DL_PrivateKey<T> &key = this->GetKeyInterface(); |
1201 |
|
1202 |
|
1202 |
Element q = params.DecodeElement(cipherText, true); |
1203 |
Element q = params.DecodeElement(cipherText, true); |
1203 |
unsigned int elementSize = params.GetEncodedElementSize(true); |
1204 |
unsigned int elementSize = params.GetEncodedElementSize(true); |
Lines 1227-1237
Link Here
|
1227 |
|
1228 |
|
1228 |
void Encrypt(RandomNumberGenerator &rng, const byte *plainText, unsigned int plainTextLength, byte *cipherText) const |
1229 |
void Encrypt(RandomNumberGenerator &rng, const byte *plainText, unsigned int plainTextLength, byte *cipherText) const |
1229 |
{ |
1230 |
{ |
1230 |
const DL_KeyAgreementAlgorithm<T> &agreeAlg = GetKeyAgreementAlgorithm(); |
1231 |
const DL_KeyAgreementAlgorithm<T> &agreeAlg = this->GetKeyAgreementAlgorithm(); |
1231 |
const DL_KeyDerivationAlgorithm<T> &derivAlg = GetKeyDerivationAlgorithm(); |
1232 |
const DL_KeyDerivationAlgorithm<T> &derivAlg = this->GetKeyDerivationAlgorithm(); |
1232 |
const DL_SymmetricEncryptionAlgorithm &encAlg = GetSymmetricEncryptionAlgorithm(); |
1233 |
const DL_SymmetricEncryptionAlgorithm &encAlg = this->GetSymmetricEncryptionAlgorithm(); |
1233 |
const DL_GroupParameters<T> ¶ms = GetAbstractGroupParameters(); |
1234 |
const DL_GroupParameters<T> ¶ms = this->GetAbstractGroupParameters(); |
1234 |
const DL_PublicKey<T> &key = GetKeyInterface(); |
1235 |
const DL_PublicKey<T> &key = this->GetKeyInterface(); |
1235 |
|
1236 |
|
1236 |
Integer x(rng, Integer::One(), params.GetMaxExponent()); |
1237 |
Integer x(rng, Integer::One(), params.GetMaxExponent()); |
1237 |
Element q = params.ExponentiateBase(x); |
1238 |
Element q = params.ExponentiateBase(x); |
Lines 1307-1313
Link Here
|
1307 |
// for signature scheme |
1308 |
// for signature scheme |
1308 |
HashIdentifier GetHashIdentifier() const |
1309 |
HashIdentifier GetHashIdentifier() const |
1309 |
{ |
1310 |
{ |
1310 |
typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L; |
1311 |
typedef CPP_TYPENAME SchemeOptions::MessageEncodingMethod::HashIdentifierLookup::template HashIdentifierLookup2<CPP_TYPENAME SchemeOptions::HashFunction> L; |
1311 |
return L::Lookup(); |
1312 |
return L::Lookup(); |
1312 |
} |
1313 |
} |
1313 |
unsigned int GetDigestSize() const |
1314 |
unsigned int GetDigestSize() const |
Lines 1348-1354
Link Here
|
1348 |
{ |
1349 |
{ |
1349 |
public: |
1350 |
public: |
1350 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const |
1351 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const |
1351 |
{key = GetKey();} |
1352 |
{key = this->GetKey();} |
1352 |
}; |
1353 |
}; |
1353 |
|
1354 |
|
1354 |
//! . |
1355 |
//! . |
Lines 1357-1365
Link Here
|
1357 |
{ |
1358 |
{ |
1358 |
public: |
1359 |
public: |
1359 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const |
1360 |
void CopyKeyInto(typename SCHEME_OPTIONS::PublicKey &key) const |
1360 |
{GetKey().MakePublicKey(key);} |
1361 |
{this->GetKey().MakePublicKey(key);} |
1361 |
void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const |
1362 |
void CopyKeyInto(typename SCHEME_OPTIONS::PrivateKey &key) const |
1362 |
{key = GetKey();} |
1363 |
{key = this->GetKey();} |
1363 |
}; |
1364 |
}; |
1364 |
|
1365 |
|
1365 |
//! . |
1366 |
//! . |
Lines 1369-1375
Link Here
|
1369 |
PK_MessageAccumulator * NewSignatureAccumulator(RandomNumberGenerator &rng = NullRNG()) const |
1370 |
PK_MessageAccumulator * NewSignatureAccumulator(RandomNumberGenerator &rng = NullRNG()) const |
1370 |
{ |
1371 |
{ |
1371 |
std::auto_ptr<PK_MessageAccumulatorBase> p(new PK_MessageAccumulatorImpl<CPP_TYPENAME SCHEME_OPTIONS::HashFunction>); |
1372 |
std::auto_ptr<PK_MessageAccumulatorBase> p(new PK_MessageAccumulatorImpl<CPP_TYPENAME SCHEME_OPTIONS::HashFunction>); |
1372 |
RestartMessageAccumulator(rng, *p); |
1373 |
this->RestartMessageAccumulator(rng, *p); |
1373 |
return p.release(); |
1374 |
return p.release(); |
1374 |
} |
1375 |
} |
1375 |
}; |
1376 |
}; |
Lines 1518-1536
Link Here
|
1518 |
PK_FinalTemplate() {} |
1519 |
PK_FinalTemplate() {} |
1519 |
|
1520 |
|
1520 |
PK_FinalTemplate(const Integer &v1) |
1521 |
PK_FinalTemplate(const Integer &v1) |
1521 |
{AccessKey().Initialize(v1);} |
1522 |
{this->AccessKey().Initialize(v1);} |
1522 |
|
1523 |
|
1523 |
PK_FinalTemplate(const typename BASE::KeyClass &key) {AccessKey().operator=(key);} |
1524 |
PK_FinalTemplate(const typename BASE::KeyClass &key) {this->AccessKey().operator=(key);} |
1524 |
|
1525 |
|
1525 |
template <class T> |
1526 |
template <class T> |
1526 |
PK_FinalTemplate(const PublicKeyCopier<T> &key) |
1527 |
PK_FinalTemplate(const PublicKeyCopier<T> &key) |
1527 |
{key.CopyKeyInto(AccessKey());} |
1528 |
{key.CopyKeyInto(this->AccessKey());} |
1528 |
|
1529 |
|
1529 |
template <class T> |
1530 |
template <class T> |
1530 |
PK_FinalTemplate(const PrivateKeyCopier<T> &key) |
1531 |
PK_FinalTemplate(const PrivateKeyCopier<T> &key) |
1531 |
{key.CopyKeyInto(AccessKey());} |
1532 |
{key.CopyKeyInto(this->AccessKey());} |
1532 |
|
1533 |
|
1533 |
PK_FinalTemplate(BufferedTransformation &bt) {AccessKey().BERDecode(bt);} |
1534 |
PK_FinalTemplate(BufferedTransformation &bt) {this->AccessKey().BERDecode(bt);} |
1534 |
|
1535 |
|
1535 |
#if (defined(_MSC_VER) && _MSC_VER < 1300) |
1536 |
#if (defined(_MSC_VER) && _MSC_VER < 1300) |
1536 |
|
1537 |
|
Lines 1566-1624
Link Here
|
1566 |
|
1567 |
|
1567 |
template <class T1, class T2> |
1568 |
template <class T1, class T2> |
1568 |
PK_FinalTemplate(const T1 &v1, const T2 &v2) |
1569 |
PK_FinalTemplate(const T1 &v1, const T2 &v2) |
1569 |
{AccessKey().Initialize(v1, v2);} |
1570 |
{this->AccessKey().Initialize(v1, v2);} |
1570 |
|
1571 |
|
1571 |
template <class T1, class T2, class T3> |
1572 |
template <class T1, class T2, class T3> |
1572 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3) |
1573 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3) |
1573 |
{AccessKey().Initialize(v1, v2, v3);} |
1574 |
{this->AccessKey().Initialize(v1, v2, v3);} |
1574 |
|
1575 |
|
1575 |
template <class T1, class T2, class T3, class T4> |
1576 |
template <class T1, class T2, class T3, class T4> |
1576 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) |
1577 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) |
1577 |
{AccessKey().Initialize(v1, v2, v3, v4);} |
1578 |
{this->AccessKey().Initialize(v1, v2, v3, v4);} |
1578 |
|
1579 |
|
1579 |
template <class T1, class T2, class T3, class T4, class T5> |
1580 |
template <class T1, class T2, class T3, class T4, class T5> |
1580 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) |
1581 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) |
1581 |
{AccessKey().Initialize(v1, v2, v3, v4, v5);} |
1582 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5);} |
1582 |
|
1583 |
|
1583 |
template <class T1, class T2, class T3, class T4, class T5, class T6> |
1584 |
template <class T1, class T2, class T3, class T4, class T5, class T6> |
1584 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6) |
1585 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6) |
1585 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6);} |
1586 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6);} |
1586 |
|
1587 |
|
1587 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
1588 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
1588 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7) |
1589 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7) |
1589 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);} |
1590 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);} |
1590 |
|
1591 |
|
1591 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
1592 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
1592 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8) |
1593 |
PK_FinalTemplate(const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8) |
1593 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);} |
1594 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);} |
1594 |
|
1595 |
|
1595 |
template <class T1, class T2> |
1596 |
template <class T1, class T2> |
1596 |
PK_FinalTemplate(T1 &v1, const T2 &v2) |
1597 |
PK_FinalTemplate(T1 &v1, const T2 &v2) |
1597 |
{AccessKey().Initialize(v1, v2);} |
1598 |
{this->AccessKey().Initialize(v1, v2);} |
1598 |
|
1599 |
|
1599 |
template <class T1, class T2, class T3> |
1600 |
template <class T1, class T2, class T3> |
1600 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3) |
1601 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3) |
1601 |
{AccessKey().Initialize(v1, v2, v3);} |
1602 |
{this->AccessKey().Initialize(v1, v2, v3);} |
1602 |
|
1603 |
|
1603 |
template <class T1, class T2, class T3, class T4> |
1604 |
template <class T1, class T2, class T3, class T4> |
1604 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) |
1605 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) |
1605 |
{AccessKey().Initialize(v1, v2, v3, v4);} |
1606 |
{this->AccessKey().Initialize(v1, v2, v3, v4);} |
1606 |
|
1607 |
|
1607 |
template <class T1, class T2, class T3, class T4, class T5> |
1608 |
template <class T1, class T2, class T3, class T4, class T5> |
1608 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) |
1609 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) |
1609 |
{AccessKey().Initialize(v1, v2, v3, v4, v5);} |
1610 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5);} |
1610 |
|
1611 |
|
1611 |
template <class T1, class T2, class T3, class T4, class T5, class T6> |
1612 |
template <class T1, class T2, class T3, class T4, class T5, class T6> |
1612 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6) |
1613 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6) |
1613 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6);} |
1614 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6);} |
1614 |
|
1615 |
|
1615 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
1616 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7> |
1616 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7) |
1617 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7) |
1617 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);} |
1618 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7);} |
1618 |
|
1619 |
|
1619 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
1620 |
template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8> |
1620 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8) |
1621 |
PK_FinalTemplate(T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8) |
1621 |
{AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);} |
1622 |
{this->AccessKey().Initialize(v1, v2, v3, v4, v5, v6, v7, v8);} |
1622 |
|
1623 |
|
1623 |
#endif |
1624 |
#endif |
1624 |
}; |
1625 |
}; |