View previous topic :: View next topic |
Author |
Message |
SarahS93 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 21 Nov 2013 Posts: 730
|
Posted: Thu Feb 03, 2022 2:28 am Post subject: compress files with very high encryption |
|
|
how to compress files with a very high encryption?
rar and 7z can use aes256, is there anything higher? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Thu Feb 03, 2022 4:31 am Post subject: |
|
|
Please clarify. Are you taking existing highly encrypted files and applying compression to them, or are you taking existing files, compressing them, and then applying a high quality encryption to the compressed object? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
figueroa Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/911990856608daafc46b9c.gif)
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Thu Feb 03, 2022 5:37 am Post subject: |
|
|
Pipe your archiving command through gpg, then you can use any cipher available to gnupg. Use gpg --version to see what's available on your system.
Example:
Code: | tar cvf - wwww/* | gpg -c --batch --yes --passphrase-file /scratch/bin/.passrc --compress-algo none -o /run/media/USERNAME/SPBlaze02/www2.tar.gpg |
In the example above, my current working directory is already /mnt/backup0 that already contains a zstd compressed archive of my server's /var/www/localhost/htdocs. My default gpg encryption has already been set to AES256 via ~/gnupg/gnupg.conf, a strong cipher. If the source directory had not already been compressed, replace "--compress-algo none" with the compression of choice which one can view in the output of "gpg --version". The output in the example is set to a flash drive.
For more information about strong (and weaker) ciphers, see the following link.
https://security.stackexchange.com/questions/155774/what-is-the-most-robust-available-algo-for-gpg-symmetric-encryption _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mike155 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Feb 03, 2022 11:27 am Post subject: |
|
|
Code: | time tar cf - \
<files to tar> \
| /usr/bin/zstd -7 \
| /usr/bin/openssl \
aes-256-cbc \
-e \
-pass "file:${BACKUP_KEYFILE}" \
-pbkdf2 \
-out "${BACKUP_OUTPUT_FILE}" |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|