Is there a way to store data in an encrypted way such that it can be decrypted with several different keys?
IE, if I've encrypted data with key1, but I want to be able to decrypted with keys 2, 3, and 4.
Is this possible?
Is there a way to store data in an encrypted way such that it can be decrypted with several different keys?
IE, if I've encrypted data with key1, but I want to be able to decrypted with keys 2, 3, and 4.
Is this possible?
Yes, it's possible. Google "multiparty encryption" for a start.
AFAIK, there are no drop 'em in and use 'em packages for it though.
-- MarkusQ
P.S. For a sketch of how it could be done, consider this. The encrypted message consists of:
The recipient who hold key i just decrypts their copy of the pad with their key, and then decrypts the payload.
However, this is just a proof that it could be done and would suck as an actual implementation. If at all possible, you should avoid rolling your own encryption. If you don't understand why, you should definitely avoid rolling your own encryption.
-----Edit ------------
If I'm wrong and the Gnu tools do that, use them. But I can't seem to find any information on how to do it.
GnuPG does multi-key encryption in standard.
The following command will encrypt doc.txt
using the public key for Alice and the public key for bob. Alice can decrypt using or private key. Bob can also decrypt using his private key.
gpg --encrypt --recipient [email protected] \
--recipient [email protected] doc.txt
This feature is detailed in the user guide section entitled "Encrypting and decrypting documents"