I can't reproduce this error. Please post the following information (as 
requested on Crypto++ website under Mailing List)

    * stack trace (please copy from the call stack window of your debugger, 
or use the "bt" command in gdb)
    * a minimal program with a main() function, that reproduces the problem
    * version of Crypto++, operating system (output of "uname -a" command if 
using Unix), and compiler (output of "gcc -v" if using GCC)

--------------------------------------------------
From: "Max Sivkov" <[EMAIL PROTECTED]>
Sent: Thursday, November 20, 2008 5:18 AM
To: "Crypto++ Users" <[EMAIL PROTECTED]>
Subject: Re: creating public key using only public point data

>
> ECC_ALGORITHM is a define for CryptoPP::EC2N
>
> On Nov 20, 3:16 pm, Max Sivkov <[EMAIL PROTECTED]> wrote:
>> Hello Crypto++ gurus!
>>
>> I need to create a public key based on a public pint data for future
>> comparation with SHA1 coded signature
>> here is my code:
>>
>> SecByteBlock pubkey = Base64Decode(pubkey_base64);
>>
>> // Thanks Wei Dai!
>> CryptoPP::ECIES< CryptoPP::EC2N >::PublicKey PublicKey;
>> PublicKey.AccessGroupParameters().Initialize(CryptoPP::ASN1::sect163k1
>> ());
>>
>> PublicKey.GetGroupParameters().GetCurve().DecodePoint(p, pubkey,
>> PublicKey.GetGroupParameters().GetCurve().EncodedPointSize(true));
>> PublicKey.SetPublicElement(p);
>> AutoSeededX917RNG<AES> m_rng;
>> bool status = PublicKey.Validate(m_rng, 3); // status returns true, so
>> far so good
>> CryptoPP::ECIES<ECC_ALGORITHM>::Encryptor Encryptor(PublicKey);// At
>> this line I had the following exception:
>> ----
>> CryptoPP::Exception caught: NameValuePairs: type mismatch for
>> 'ThisObject:class
>> CryptoPP::DL_PublicKeyImpl<class CryptoPP::DL_GroupParameters_EC<class
>> CryptoPP:
>> :EC2N> >', stored 'class CryptoPP::DL_PublicKeyImpl<class
>> CryptoPP::DL_GroupPara
>> meters_EC<class CryptoPP::EC2N> >', trying to retrieve 'class
>> CryptoPP::DL_Publi
>> cKey_EC<class CryptoPP::EC2N>'
>> -----
>>
>> Could anybody help me with this?
> > 

--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to