[botan-devel] PEM_encode and ECDH_PrivateKey

Sean Cassidy sean.a.cassidy at gmail.com
Wed Feb 1 17:11:52 EST 2012


I don't think the OID for ECDH is properly configured.
OIDS::lookup("ECDH"), the algorithm name given in ecdh.h, results in
an exception. Here is some code that exhibits this problem in v1.10.1
on Ubuntu:

LibraryInitializer botan;
AutoSeeded_RNG rng;
DH_PrivateKey key(rng, EC_Group(OIDS::lookup("secp521r1")));
//RSA_PrivateKey key(rng, 1024); // works
//GOST_3410_PrivateKey key(rng, EC_Group(OIDS::lookup("secp521r1"))); // works
cout << PKCS8::PEM_encode(key) << endl;

Is this a bug?

More information about the botan-devel mailing list