Hi!
To get the public ecc key (basically a point) the following code snippet should be useful:
CryptoPP::ECPPoint point = pubkey.GetPublicElement(); CryptoPP::Integer x = point.x; CryptoPP::Integer y = point.y; std::cout << "x = " << x; std::cout << "y = " << y;
Cheers, Luigi.
Scott Guthery wrote:
I'm trying to extract the public key of an ECC pair. The following doesn't work:
unsigned char array[1024];
privkey.MakePublicKey(pubkey);
StringSource ss(array, sizeof(array), true, new HexDecoder);
pubkey.DEREncodeKey(ss);
What should?
Thanks for any insight.
Cheers, Scott
-- Luigi Lo Iacono ------------------------------------------------------------- Institute for Data Communications Systems University of Siegen, Germany http://www.dcs.uni-siegen.de/ ------------------------------------------------------------- PGP: 057E 2A17 47B2 4749 1D37 8A07 286E 2238 HTTP: http://www.dcs.uni-siegen.de/staff/loiacono/index.php EMail: mailto:[EMAIL PROTECTED] Phone: +49 271 740-2516 Fax: +49 271 740-2536 Mobile: +49 177 2442521 -------------------------------------------------------------
