Letzte Änderung: 08. Juli 2021
GPG
Encrypt :
We use symmetric encryption !
# gpg -c file.txt or gpg --symmetric file.txt
# gpg --symmetric --cipher-algo AES256 bla.tar.bz2
# gpg --symmetric --cipher-algo AES256 bla.tar.bz2 > packedandcrypted.tar.bz2.gpg
# gpg --symmetric --cipher-algo AES256 --output packedandcrypted.tar.bz2.gpg bla.tar.bz2
2014 we use best available algorithm TWOFISH
# gpg --symmetric --cipher-algo TWOFISH --digest-algo SHA512 -o file.gpg file.txt
Non Interactive Mode :
# gpg --yes --batch --passphrase=[Enter your passphrase here] -c file.txt
Encrypt multiple files
# tar -cvpf test.tar test1 test2
# gpg --symmetric --cipher-algo AES256 --output test.tar.gpg test.tar
# rm test.tar
Encrypt folder :
# tar cvpf - home/file1 | gpg --symmetric --cipher-algo AES256 --output packedandcrypted.enc
---
Decrypt :
# gpg file.gpg
# gpg --decrypt --output bla.tar.bz2 packedandcrypted.enc
Non Interactive Mode :
# gpg --yes --batch --passphrase=[Enter your passphrase here] file.gpg