Question about symmetric AES cipher in GnuPG

Damien Goutte-Gattat dgouttegattat at incenp.org
Sun Oct 27 21:40:17 CET 2019


Hi,

On Sun, Oct 27, 2019 at 08:25:10PM +0100, Stefan Claas via Gnupg-users wrote:
>Can you please, or somebody else, explain in laymen terms why this is 
>so?

Simply put, gpg and openssl enc don’t use the same file formats.  
Different formats may encode the same data differently, so you can’t 
expect the two outputs to be similar or to be of a similar size.

In GnuPG’s case, the format is the one defined by the RFC 4880 standard 
[1]. I don’t know what is the format used by OpenSSL, but some of the 
differences with GnuPG’s format include:

* GnuPG adds a “Modification Detection Code” to the encrypted data;

* GnuPG also adds some metadata, including the name of the original 
  file.

Those differences alone already explain easily why the file generated by 
GnuPG is bigger.

Cheers,

- Damien


[1] https://tools.ietf.org/html/rfc4880
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20191027/2adecedb/attachment.sig>


More information about the Gnupg-users mailing list