Hi Damias, to Question 1 - 3: ECDH consists of 2 parts: the curve and the transmitted data. You load the curve as described in the article, using OIDs and pre-defined curves. The Keydata is different: Keydata are just raw byte arrays of appropriate size ( call
.PublicKeyLength() and .PrivateKeyLength to get those). If you use SecByteBlocks you might be able to use a load-like function but I'd recommend using just BytePtr() to Question 4: In The Agree function you just pass in your private key, the other's public key and a pointer to an array receiving the agreed value and all the magic is done. BR JPM Am Donnerstag, 29. Mai 2014 14:57:56 UTC+2 schrieb Damias: > > Hi all, I need to implement an AES256 code with EC-DH key agreement. > > At the moment I have the encryption and decryption with AES256 done > but generating the key and the IV with a random number generator (in my > case AutoSeededRandomPool). > So I created my pair of keys with this commands > http://www.cryptopp.com/wiki/Keys_and_formats#ECC_Public_Key_.28SubjectPublicKeyInfo.29 > . > Now, looking at this > http://www.cryptopp.com/wiki/Elliptic_Curve_Diffie-Hellman I guess I must > load my private key and the couterparty's public key in order > to use the function "Agree" from the class DH_Domain. I'm going in the > right direction? My questions are: > > How I declare an EC key in my code? Then I will be able to use .Load? I > know that in RSA is RSA::PrivateKey name but in ECC I don't have any idea... > How do I use the public key and the private to use as parameters in the > function Agree? > -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
