Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt something so that can be decrypted using any two of three keys?

Tags:

encryption

So say I want to encrypt a file and the only way I want it to be read is if two different people enter their keys. So, for instance there are four keys:

key1, key2, key3, key4.

If I encrypt it with key1 then the following combinations will decypt it:

  • key2,key3
  • key3,key4
  • key2,key4

Is this possible using a standard method?

like image 440
Ryan Detzel Avatar asked Nov 12 '09 01:11

Ryan Detzel


People also ask

Which encryption is used to encrypt the data with 2 keys?

Asymmetric, or public/private encryption, uses a pair of keys. Data encrypted with one key are decrypted only with the other key in the public/private key pair.

What are the 3 types of encryption keys?

There are four basic type of encryption keys: symmetric, asymmetric, public, and private. The first two describe where the keys are used in the encryption process, and the last two describe who has access to the keys.

Which cryptography uses two keys for encryption decryption?

Asymmetric cryptography involves a pair of keys to encrypt and decrypt data. The two participants in the asymmetric encryption workflow are the sender and the receiver. Each has its own pair of public and private keys. First, the sender obtains the receiver's public key.


1 Answers

Generate a unique content key to encrypt the message (this is common to many message encryption standards), then apply an erasure code scheme such as Reed-Solomon coding against that content key concatenated with enough additional random data to ensure that any m of n "shards" of the key can be put together to create the final key. Shards are only given out from the random data portion so that none of the shards given out contain actual bits from the content key. This way, any number of collected shards short of m does not give any useful information about the key itself.

EDIT: Reed-Solomon to generate key shards appears to be identical to Shamir's secret-sharing, first published in 1979; thanks to @caf for pointing out the article.

like image 52
Jeffrey Hantin Avatar answered Sep 29 '22 15:09

Jeffrey Hantin