gpgtar decrypt failure
Posted: Thu Nov 30, 2023 5:11 pm
Hi,
As we don't have a encrypted instal of Ghost I wanted to use the native pre-installed gnugp to selectively encrypt particular data directories.
For some reason I can't fathom the decryption always fails...
I followed [https://www.baeldung.com/linux/encrypti ... -directory] example...
This fails whether I use root or me and within and between pools.
As we don't have a encrypted instal of Ghost I wanted to use the native pre-installed gnugp to selectively encrypt particular data directories.
For some reason I can't fathom the decryption always fails...
I followed [https://www.baeldung.com/linux/encrypti ... -directory] example...
Listing reveals:encryption process:
mkdir top-secret
echo "this is a secret" > top-secret/secret.txt
gpgtar --encrypt --symmetric --output top-secret.gpg --gpg-args="--passphrase=top-secret-passphrase --batch" top-secret
Decryption fails with:gpgtar --list-archive --gpg-args "--passphrase=top-secret --batch" top-secret.gpg
gpg: AES256.CFB encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: Bad session key
Please, can anyone explain the 'bad session key' failure issue?gpgtar --decrypt --directory decrypted top-secret.gpg
gpg: AES256.CFB encrypted data
gpg: problem with the agent: Inappropriate ioctl for device
gpg: encrypted with 1 passphrase
gpg: decryption failed: Bad session key
This fails whether I use root or me and within and between pools.