Op ma 11 mei 2026 om 09:47 schreef Werner Koch <[email protected]>:
>
> Hi!
>
> On Sun, 10 May 2026 07:51, Stef Bon said:
>
> > I'm using gcry_pk_sign, and I want the code to get the size of the
> > signature before using the sign function. Is there a way to do this?
>
> The size of the signature depends on the algorithm and its parameters.
> In general the size of a signature is fixed.  It is best to do trial
> signing to find out which signature size is yielded for your algorithm.

In my opinion it's the task of the crypt library to provide this
information. For me to implement a test function to find out the size
is a workaround. I thought the function
gcry_pk_algo_info can do this (using GCRY_GET_ALGO_SIGNSIZE for
example) because in general this size is fixed as you mention, but it
doesn't. Is this an idea?

Stef

_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel

Reply via email to