Okay, Thankd for ur reply. If i have only private key in my ECC_key object Will be able to sign the data?. I mean i will load only private key and use the curve.Will I be able to sign the data? and How can i load other parametes like a,b,g,n in to the object.
On 14 December 2012 16:12, Matt Caswell (fr...@baggins.org) <fr...@baggins.org> wrote: > > > On 14 December 2012 10:32, jeetendra gangele <gangele...@gmail.com> wrote: >> >> But why we need to load the public key for signing the data? >> for signing I need only private key. >> When I load the public and private both key I could sign the data. >> but when I load only private key and calling Key_check function its >> failing. > > > Well technically of course you never need to explicitly have the public key > if you have the private key - it can always be generated if needed. However > thats not the way the library works. According to the way the library has > been written an EC_KEY object is only valid if it contains either a public > key, or a private/public key pair. If you are going to call EC_KEY_check_key > then you must have a public key present (even if it is never used for your > scenario). The presence of a public key is one of the first things that > EC_KEY_check_key looks for. > > Matt > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org