Client A typically encrypts a file with a public key and sends it to Client B who has the corresponding private key to decrypt the file.
My team is going to take over the responsibilities of Client A, and they have provided me with the public key (emailed an unarmored PUB_KEY.asc
file) which I have successfully imported and can see on my keyring:
gpg --list-keys
pub 1024R/21FG3F01 2008-11-05
uid PUB_KEY
sub 1024R/3287SBN9 2008-11-05
I encrypted the file with the exact same command as Client A and sent it to Client B and their decryption failed:
gpg --output file.txt.gpg -e -r PUB_KEY file.txt
Client B gets the following decryption error: 1080:no private key could be found for decryption (while they indeed have the private key).
They mentioned perhaps signing the key, and so I tried to sign the public key using gpg --sign-key PUB_KEY
and I receive the following error:
pub 1024R/21FG3F01 created: 2008-11-05 expires: never usage: SC
trust: unknown validity: unknown
sub 1024R/3287SBN9 created: 2008-11-05 expires: never usage: E
[ unknown] (1). PUB_KEY
gpg: no default secret key: No secret key
Why would I need a secret key to sign a public key? What could cause Client B to be unable to decrypt the file when I am indeed using the correct public key?