This question already has an answer here:

Say you have a plain text:

How are you today?

and you encrypt it so it becomes:


Now you have multiple people that need to know the plain text of this cipher text but you do not want them to have the same key. It might be they each come up with their own password or they all have a key which identifies that individual.

Now one way of doing this would be adapting this answer so every user encrypts the one key with their own key so you'd get ten encrypted files (for ten people) of the same key. (I don't know if this is good practice but I think it's a secure option.)

Are there any other ways of having different people using different keys to get the same plain text from the same cipher text (and vice versa)? Is there a special algorithm for this?


marked as duplicate by yyyyyyy, Maarten Bodewes, K.G., Gilles 'SO- stop being evil', DrLecter Mar 2 '15 at 13:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


In short: hybrid encryption.

Encrypt the content with a random symmetric key. And encrypt this key with the public key of each recipient.

Then all you need is a public key from all the people you want to share the content with. It doesn't even have to be the same public key cryptosystem for all the receivers.

It might be they each come up with their own password or ...

Passwords alone are quite useless, and if you just use a password as key in a crytposystem, you screwed up badly. From a practical point of view, the concepts of a key and a password might be quite similar, from a security perspective they are not.

Of course you can design a system, where the users actually have to enter a password to decrypt their locally stored private key, like it is done for ssh keyfiles. But that is another issue.

  • $\begingroup$ Well that's what i meant, enter a password to decrypt their locally stored private key. sorry should have phrased that better. $\endgroup$ – Vincent Mar 2 '15 at 7:10

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