DSA_sign()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DSA_sign()

Julien Demoor
Hello,

I'm getting an error with the DSA_sign() function : "data too large for
key size". I have inputed a 40-byte-long string representing a
hexadecimal SHA-1 digest. I can't find what the correct digest format
is, nor if anything else may lead to that error.
Any help will be greatly appreciated.



Julien Demoor

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DSA_sign()

Nils Larsch
Julien Demoor wrote:
> Hello,
>
> I'm getting an error with the DSA_sign() function : "data too large for
> key size". I have inputed a 40-byte-long string representing a
> hexadecimal SHA-1 digest. I can't find what the correct digest format
> is, nor if anything else may lead to that error.

DSA_sign() expects binary input and not hex.

Cheers,
Nils
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DSA_sign()

jimmy-6
In reply to this post by Julien Demoor
Julien Demoor wrote:
> Hello,
>
> I'm getting an error with the DSA_sign() function : "data too large for
> key size". I have inputed a 40-byte-long string representing a
> hexadecimal SHA-1 digest.


I think the acceptable size would be size of 'q' in ur dsa key and i
guess the o/p of the sha digest function can be given directly to the
dsa sign function not in hexa string format.


-jb
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DSA_sign()

Julien Demoor
jimmy wrote:

> Julien Demoor wrote:
>
>> Hello,
>>
>> I'm getting an error with the DSA_sign() function : "data too large for
>> key size". I have inputed a 40-byte-long string representing a
>> hexadecimal SHA-1 digest.
>
>
>
> I think the acceptable size would be size of 'q' in ur dsa key and i
> guess the o/p of the sha digest function can be given directly to the
> dsa sign function not in hexa string format.

In my case, this is not possible, the digest is computed externally and
can be passed only as a string.

Thanks for the answers.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DSA_sign()

jimmy-6
Julien Demoor wrote:

> jimmy wrote:
>
>> Julien Demoor wrote:
>>
>>> Hello,
>>>
>>> I'm getting an error with the DSA_sign() function : "data too large for
>>> key size". I have inputed a 40-byte-long string representing a
>>> hexadecimal SHA-1 digest.
>>
>>
>> I think the acceptable size would be size of 'q' in ur dsa key and i
>> guess the o/p of the sha digest function can be given directly to the
>> dsa sign function not in hexa string format.
>
> In my case, this is not possible, the digest is computed externally and
> can be passed only as a string.
>
> Thanks for the answers.

If it's always a hex string representing the hash then you cud get back
the binary. Point is dsa sign needs the raw hash from SHA1.


-jb
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]