Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
compress files with very high encryption
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 730

PostPosted: Thu Feb 03, 2022 2:28 am    Post subject: compress files with very high encryption Reply with quote

how to compress files with a very high encryption?

rar and 7z can use aes256, is there anything higher?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Thu Feb 03, 2022 4:31 am    Post subject: Reply with quote

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
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Thu Feb 03, 2022 5:37 am    Post subject: Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Feb 03, 2022 11:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum