Yes i am talking about signature. ECDSA_SIG this ouptput structure will have r and s componet of 28 bytes each. So if I merge both r and s I will get 56 bytes right? These will not have any padding information?.
Thanks jeet On 17 December 2012 13:04, Dave Thompson <dthomp...@prinpay.com> wrote: >> From: owner-openssl-us...@openssl.org On Behalf Of jeetendra gangele >> Sent: Sunday, 16 December, 2012 22:57 > >> Actaully I was trying to generate the signature of lenght 56 bytes but >> its failing. >> When I check the code it said lenght of the sig should not >> lessa than 56. >> can anybody help me how can I generate the signature of >> lenght 56 bytes?. >> > To be clear: you are talking about the length of the *signature*, > not of the data that was signed? > > If you are using a 224-bit ECDSA keypair, as your previous posts > suggest, the signature semantically consists of two numbers > each 224 bits or 28 bytes; however, openssl (at least) encodes > these numbers in an ASN.1 SEQUENCE with total length 62-64 bytes. > > If you want to generate such a signature, either use the EVP_Sign* > functions to do the usual process for you (hash the bulk data, > using a hash you specify whose output size should not be larger > than your keysize, then ECDSA-sign the hash) or do the hash yourself > and then call ECDSA_sign or one of its variants yourself. > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org -- ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org