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