Compress and encrypt files and folders

Robert J. Hansen rjh at sixdemonbag.org
Fri May 29 18:34:56 CEST 2026


> cipher-algo AES256
> digest-algo SHA512

Those are bad news: you can sabotage your interoperability with other
RFC4880 or LibrePGP applications that way. Better by far to use the
cipher preference mechanism. An example is found in section 8.7 of the
official FAQ:

	https://www.gnupg.org/faq/gnupg-faq.html#new_user_gpg_conf

> Suppose I have a file called "schema.sql" that I need to compress
> and encrypt, or a folder called "daily_backup" which consists of 5
> files and 3 subdirectories (each containing various files). How
> would you recommend I compress and encrypt this data?

$ tar cJf daily_backup.txz /path/to/daily_backup
$ gpg --symmetric daily_backup.txz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260529/2a7d5ce7/attachment.sig>


More information about the Gnupg-users mailing list