Say I have a scheme that derives a key from N
different inputs. Each of the inputs may not be completely secure (f.x. bad passwords) but in combination they are secure. The simple way to do this is to concatenate all of the inputs in order and use a hash as a result.
Now I want to allow key-derivation (or rather key-decryption) given only N-1
out of the N
inputs. A simple way to do this is to generate a random key K
, generate N
temporary keys out of different N
subsets of the input, each with one input missing (i.e. Hash(input_{1}, ..., input_{N-1}), Hash(input_{0}, input_{2}, ..., input_{N-1}), Hash(input_{0}, input_{1}, input_{3},..., input_{N-1}), ..., Hash(input_{0}, ..., input_{N-2})
) then encrypt K
with each of the N
keys and store all of the results.
Now I want to a generalized solution, where I can decrypt the key using K
out of N
inputs. The naive way to expand the scheme above requires storing (N
choose N-K
) values, which quickly becomes infeasible.
Is there a good algorithm for this, that does not entail this much storage?
I have thought about a way to use something like Shamir's Secret Sharing Scheme, but cannot think of a good way, since the inputs are fixed.