Please note there's a constructor that migth be useful (dh.h):
DH_Domain(BufferedTransformation &bt)
{m_groupParameters.BERDecode(bt);}
see also gfpcrypt.cpp:
void DL_GroupParameters_IntegerBased::BERDecode(BufferedTransformation &bt)
On Tue, Sep 18, 2007 at 11:29:36AM -0700, greatx wrote:
>
> I have found the answer to this. I parsed the Domain Paramerers from
> the PKCS#3 structure, then put them in DPPrime and DPGenerator, like:
>
> BYTE DPPrime[] = {0x02, 0x81, 0x81, 0x00, 0xDC,.....}; // holds 'p'
> BYTE DPGenerator[] = {0x02, 0x80, 0x80, 0x2E, 0x69,.....}; // holds
> 'g'
>
> Integer iPrime, iGenerator;
> std::string sP(reinterpret_cast<const char *>(DPPrime),
> DPPrimeLength);
> iPrime.BERDecode(StringStore(sP).Ref());
> std::string sG(reinterpret_cast<const char *>(DPGenerator),
> DPGeneratorLength);
> iGenerator.BERDecode(StringStore(sG).Ref());
>
> DH dh(iPrime, iGenerator);
> ...
> ...
> ...
>
> So the whole problem was really passing correct p and g to the DH
> class.
>
> Christian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---