Mailing List Archive

Buffer sizes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

is there a way to estimate the size of the encrypted data if you know the size
of the plain text for a given algorithm (in my case RSA with 1024 bit keys)?

Or is there a way to determine the size of the data in a gcry_ac_data_t object
that holds the encryted data?

I need this value for creating buffers for converting the MPI values of the
data set to strings.

Best regards,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/ICCM7YyyfykA0YkRAoaFAKCWay6ogEE17PBaRXcUzgdXcYKwLwCfQYW6
osIfMhui/VgJmU4S3Hd0ll4=
=wyJI
-----END PGP SIGNATURE-----
Re: Buffer sizes [ In reply to ]
On Thu, 24 Jul 2003 20:08:11 +0200, Ralf Schneider said:

> I need this value for creating buffers for converting the MPI values of the
> data set to strings.

Use gcry_mpi_aprint; it returns an allocated buffer of the approriate size.

--
Werner Koch <wk@gnupg.org>
The GnuPG Experts http://g10code.com
Free Software Foundation Europe http://fsfeurope.org
Re: Buffer sizes [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Freitag, 25. Juli 2003 09:58 schrieb Werner Koch:
> On Thu, 24 Jul 2003 20:08:11 +0200, Ralf Schneider said:
> > I need this value for creating buffers for converting the MPI values of
> > the data set to strings.
>
> Use gcry_mpi_aprint; it returns an allocated buffer of the approriate size.

Great! Thanks a lot.

Best regards,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/IOzU7YyyfykA0YkRAnuGAJ9Li6PqYk36y7mhI0W9P0ALjdSScwCfbtCr
dziWfQ0WHungX8sBCzpHWHg=
=PZL/
-----END PGP SIGNATURE-----