Get required size of signature before signing.

Werner Koch wk at gnupg.org
Mon May 11 09:50:29 CEST 2026


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.

There is no dummy signing, sorry.


Shalom-Salam,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 284 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20260511/88a39594/attachment.sig>


More information about the Gcrypt-devel mailing list