Create a random key, encrypt it using the keys received from each pair (password1, password2), (password1, password3), (password1, password4), (password1, password5), (password2, password3), etc. Then store each of these ten ciphers so that you can look right when you are given two random passwords.
Alternatively, instead of storing all of these pairs, use the (2.5) -second (fx Shamir's ) exchange scheme to split the random key, and then save each of the 5 secrets encrypted with the key received from each of the passwords.
source
share