Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

How can I decrypt a file I encrypted in PGP with someone else's key?

We encrypt a file via the command line for a 3rd party with their key.  They have been reporting that around 10% of the time they can not decrypt.  

As a result we would like to decrypt out ourselves the encrypted file before we send to them to see if the decryption process fails.  If it is good then we would send them the encrypted file.  If it fails then we would re-encrypt the file.  

On one hand it sounds logical you should be able to decrypt anything you encrypt but on the other hand it makes sense if we use someone else's key to encrypt that we can decrypt.  
0
Lotus30306
Asked:
Lotus30306
  • 2
3 Solutions
 
treetop3Commented:
Hi,

You must make sure you have both Private and Public keys to Decrypt

Regards,
TT
0
 
abbrightCommented:
PGP uses asymmetric key cryptography that is you encrypt using the public key and decrypt using the corresponding private key. So you can encrypt using the file using the public key of your 3rd party but you won't be able to decrypt it as you likely don't own the private key they have. Anyway you can encrypt the file using two different public keys, so in addition to the 3rd party's public key you can encrypt the file using a public key of your own as well and try to decrypt it using your private key. If that works it is likely your 3rd party can decrypt the file as well.
0
 
abbrightCommented:
The weay to encrypt a message for multiple recipients is to use option -r multiple times, see http://linux.die.net/man/1/gpg.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now