Crypto++ and Compressed EC keys
How can I generate compressed ECDSA keys in Crypto++? AutoSeededRandomPool prng; ECDSA<ECP, SHA1>::PrivateKey privateKey; ECDSA<ECP, SHA1>::PublicKey publicKey; privateKey.Initialize( prng, CryptoPP::ASN1::secp256r1()); const Integer& x1 = privateKey.GetPrivateExponent(); cout << "priv: " << std::hex << x1 << endl; privateKey.MakePublicKey( publicKey ); const ECP::Point& q = publicKey.GetPublicElement(); const Integer& qx = q.x; const Integer& qy = q.y; cout << "pub x: " << std::hex << qx << endl; cout << "pub y: " << std::hex << qy << endl; This code generates a keypair and prints the X and Y