[Botan-devel] DH public key generation

rippel tippel rippeltippel at gmail.com
Tue Oct 7 07:01:04 EDT 2008


Hi all,

   I was looking at the dh.cpp example and I noticed that Alice is sending
to Bob its own private key, instead of generating a proper public key. Then
Bob does the same.

I think this is wrong (ok it's just an example) but how can I generate a
different DH_PublicKey from DH_PrivateKey, so that only the public key is
sent to Bob?

Another question: referring to the DH key exchange described on Wikipedia (
http://en.wikipedia.org/wiki/Diffie-Hellman), the private key should be 'a'
for Alice and 'b' for Bob, while the public key is 'g, p, A' for Alice and
'B' for Bob. Is that correct also for Botan?

Thanks,
   Rippel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20081007/8ddad177/attachment.html>


More information about the botan-devel mailing list