In this web page GNU, it says that exporting public key using the command below will generate a public key without the secret key.
gpg --armor --export [email protected] > mykey.asc
If person B will import
mykey.asc using gpg, can they use mykey to encrypt a file? Will they not encounter a problem since there is no secret key on myKey?
The command below states that if used the secret keys will be exported. Are they referring to the private key?
gpg --export-secret-keys [email protected]
One of my colleague imported my public key and encrypted a test file using the public key shared but we encountered the error below. Is it because I exported the public key using --export option that doesn't include the private key?
Unexpected error: [gpg: keyblock resource `/usr/local/XXX/services/gnupg/secring.gpg': No such file or directory, gpg: keyblock resource `/usr/local/XXX/services/gnupg/pubring.gpg': No such file or directory, gpg: encrypted with RSA key, ID 2XXXXX16, gpg: decryption failed: No secret key]
command used to encrypt test file
gpg --output test.txt.gpg --encrypt --recipient [email protected] test.txt