5

According to https://www.gnupg.org/gph/en/manual/x110.html

To decrypt a message the option --decrypt is used. You need the private key to which the message was encrypted. Similar to the encryption process, the document to decrypt is input, and the decrypted result is output.

Scenario:

Bob has a file, he wants to keep the file secret. He wants only wants his friend Alice, John and Paul to be able to look at the file.

He encrypts the single file with each of his friends public keys.

His intention is, that whenever for example Alice needs to look at the file, she does not need to be with the others to access it.

An Attacker finds the encrypted file.

What i'm asking is:

Would the attacker need to find out each of the friends private keys in order to decrypt it? Or would the attacker only need to know one of the friends private keys?

  • 3
    Your scenario doesn't hang together - do you mean it has been encrypted so that it can only be dencrypted by all the group of friends working together? Or do you mean it has been protected so any of the group of friends can open it? – Rory Alsop Mar 16 '16 at 13:34
  • I have updated my question to try and make it more clear what it is i am asking, I hope that helps you. – Kōdo no musō-ka Mar 16 '16 at 14:05
  • I agree with Rory Alsop, the scenario is unclear. If Bob encrypts consecutively a single file with the 3 public keys, creating a single encrypted file, Alice will need to be with the others to decrypt it. But you wrote right after that Bob wants Alice to be able to decrypt the file by her own, which means that Bob must have encrypted the file 3 separate times, creating 3 encrypted files. One for each friend. SmokeDispenser's answer seems to cover both of your cases. – Yuriko Mar 17 '16 at 9:42
5

There are two possible interpretations of your question. I'll asume what you have in mind is the following:

Suppose your friends have key pairs (sk_1,pk_1), (sk_2,pk_2), (sk_3,pk_3) and e(pk, data) encrypts and (sk, data) decrypts and p is your plain text.

First interpretation

You encrypt like this:

c = e(pk_3,e(pk_2,e(pk_1, p)))

Then, yes, to decrypt c you need to do

p = d(sk_1,d(sk_2,d(sk_3,c)))

e.g. need all your friends' keys.

Note that the ordering in crutial and that no single user can decrypt the data nor can it be salvaged whenever one key is lost.

Also, this would require your friends to in turn share the intermediate results (because no one will giva away his secret key, hopefully) with one another and the decrypted file. Especially the last step might impose other security concerns if not carefully done.

There are however systems that require a group of people to work together for decryption that are tailored for that purpose, which GPG is not.

Second interpretation

The other interpretation is:

You create one file for each friend, like

c1 = e(pk_1, p)
c2 = e(pk_2, p)
c3 = e(pk_3, p)

Then each one of your friends can decrypt 'his/her' file on their own.

3

No, you would only need one of the keys used for encrypting. What would happen in this situation is that the file will be encrypted using symmetrical encryption e.g. AES, the key used with this encryption is then encrypted once with every public key supplied. This way anyone with one of the private keys can decrypt the symmetric key and use this to decrypt the file.

  • 1
    This doesn't seem to match the question. He says that a "single file" would be encrypted with 3 different public keys. In this case, you would need to have all 3 private keys and the correct order in order to decrypt the single file. – multithr3at3d Mar 16 '16 at 16:13
  • As I read it, the file is encrypted so that not every key is needed to decrypt. The way I described this is the way kleopatra encrypts a file when you select multiple keys. This would not encrypt the file 3 time with all keys but encrypt it once and encrypt the (symmetric) key with the public keys. – BadSkillz Mar 16 '16 at 16:26
1

@SmokeDispenser is correct for standard symmetric cryptography provided by GnuPG. However, you also have the option of using Shamir's Secret Sharing Scheme. That is designed in such a way that you can specify how many "keys" must be present in order for the decryption to be possible.

You can construct a ciphertext such that any one of Alice, John, or Paul's individual keys will decrypt it. Or any pair of them. Or all three of them.

  • 1
    That was what I was aiming at with the last paragraph of the first interpretation. Yet OP does not to be consistent with what is actually needed; as per accept, I'd guess my second interpretation might be the one the question aims at. – Tobi Nary Mar 17 '16 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.