Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt one message for multiple recipients?

What are the fundamentals to accomplish data encryption with exactly two keys (which could be password-based), but needing only one (either one) of the two keys to decrypt the data?

For example, data is encrypted with a user's password and his company's password, and then he or his company can decrypt the data. Neither of them know the other password. Only one copy of the encrypted data is stored.

I don't mean public/private key. Probably via symmetric key cryptography and maybe it involves something like XORing the keys together to use them for encrypting.

Update: I would also like to find a solution that does not involve storing the keys at all.

like image 331
Brian R. Bondy Avatar asked Sep 02 '08 04:09

Brian R. Bondy


People also ask

How do you encrypt your text messages?

1. Open the Android Market app on your device and install the Secret Message app. Enter a secret key into the Secret Key box at the top of the app's screen, type the message you want to encrypt into the Message box, tap “Encrypt” and tap “Send via SMS” to send the encrypted message.

Can you encrypt something multiple times?

Multiple encryption is the process of encrypting an already encrypted message one or more times, either using the same or a different algorithm. It is also known as cascade encryption, cascade ciphering, multiple encryption, and superencipherment.

How do I encrypt private messages?

How Do You Encrypt a Message? The easiest way to encrypt a message is by using an app that does it for you. Services like Signal and WhatsApp will encrypt your messages before you send them, so only the recipient can read them.


1 Answers

The way this is customarily done is to generate a single symmetric key to encrypt the data. Then you encrypt the symmetric key with each recipient's key or password to that they can decrypt it on their own. S/MIME (actually the Cryptographic Message Syntax on which S/MIME is based) uses this technique.

This way, you only have to store one copy of the encrypted message, but multiple copies of its key.

like image 116
erickson Avatar answered Nov 03 '22 02:11

erickson