0
We are using GnuPG to secure our files and didn't encounter any challenges when decrypting or encrypting files. However we have another public key that we imported from another client, let's call them CompanyB, and we need to decrypt the files they sent using their public key (public key B).
How do you specify in command line to use a specific public key to decrypt a file from CompanyB?
>gpg --list-keys
/.../.../gnupg/pubring.gpg
-----------------------------------------------------
pub 2048R/A3116C78 2016-06-28
uid [ultimate] CompanyA <CompanyA@abc.com>
sub 2048R/27160116 2016-06-28
pub 2048R/678434E4 2016-08-29
uid [ultimate] CompanyB <CompanyB@xyz.com>
sub 2048R/DE4D3F7E 2016-08-29
We need to use CompanyB's certificate to decrypt CompanyB files.
The public PGP key is generally used for encryption, the corresponding private key is needed for decryption. CompanyB should encrypt files for you using your public key. If that's not what you want then you need to say more about why. – Michał Politowski – 2016-10-03T10:55:07.450