[Botan-devel] Need help with generating ECDSA key pair

Xen Tao taoxen at gmail.com
Mon May 10 07:38:32 EDT 2010


Hi,
I want to use Botan to generate an ECDSA key pair. I plan to use this key
pair in the following manner.
1. In the client code, use private key to sign a message that is sent to a
server.
2. Server will then use the stored public key to verify that the message was
indeed signed using the corresponding private key.

I would appreciate help (with code snippet)  to understand how to generate
the ECDSA key pair (public/private key).

I looked at the example (ecdsa.cpp) that came with the library (I am using
version 1.9.4). In that example I see that public key is same as the private
key (I have copied the relevant lines from ecdsa.cpp here).

      EC_Domain_Params params(OID("1.3.132.0.8"));

      ECDSA_PrivateKey ecdsa(rng, params);

      ECDSA_PublicKey ecdsa_pub = ecdsa;

Thanks in advance,
Tao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20100510/53bc6dd0/attachment.html>


More information about the botan-devel mailing list