Hi all!
Just a short question: Does crypto++ support decoding of DH domain parameters in PKCS#3 encoding?
DHParameter ::= SEQUENCE {
prime INTEGER,
base INTEGER,
privateValueLength INTEGER OPTIONAL}
While stepping through the code it just seems to support a different encoding very similar to that one above, but definitely not the same (it tries to decode subgroup generators, probably regarding X9.42?). I don't find any other way to use the PKCS#3 encoding correctly.
I'm using the following code:
CryptoPP::ByteQueue bqDomain;
bqDomain.Put(m_DomainParameter.data(), m_DomainParameter.size());
if (m_strAlgorithm.compare(ALG_DH) == 0) {
m_pDH = new CryptoPP::DH(bqDomain);
CryptoPP::AutoSeededRandomPool randPool;
bool bValidate = m_pDH->GetCryptoParameters().Validate(randPool,
3);
:
:
}
The validation of course fails....
Best regards
-----
Norbert A. Richartz
Sorry for repost, original message was connected to wrong thread !
