# How to securely share a secret/ password by between n individuals, so that majority consensus is required to retrieve the password / secret?

The following constraints apply

• cannot use physical storage medium (such as Safe/ Vault)
• the service used to store secret/ password should be highly available and accessible from anywhere in the world.
• This is such an arbitrary situation that it looks like homework. We are happy to help but we require that you at least try to provide an attempt at an answer. – schroeder Apr 15 at 10:42
• It is not a homework, but a real world and work problem. We are looking to protect and make available the secret for Disaster Recovery purposes, but at the same time trying to implement a security control that doesn't give one person the power to recover the secret. I have been thinking on the lines of Samir's secret sharing but I do not know if that would work. – kaushal Apr 15 at 20:58

This sounds like Secret Sharing or Secret Splitting.

Secret sharing (also called secret splitting) refers to methods for distributing a secret among a group of participants, each of whom is allocated a share of the secret. The secret can be reconstructed only when a sufficient number, of possibly different types, of shares are combined together; individual shares are of no use on their own.

More specifically Shamir's_Secret_Sharing

is an algorithm in cryptography created by Adi Shamir. It is a form of secret sharing, where a secret is divided into parts, giving each participant its own unique part.

To reconstruct the original secret, a minimum number of parts is required. In the threshold scheme this number is less than the total number of parts. Otherwise all participants are needed to reconstruct the original secret.

Shamir's Secret Sharing (SSS) is used to secure a secret in a distributed way, most often to secure other encryption keys. The secret is split into multiple parts, called shares. These shares are used to reconstruct the original secret.

To unlock the secret via Shamir's secret sharing, you need a minimum number of shares. This is called the threshold, and is used to denote the minimum number of shares needed to unlock the secret. Let us walk through an example:

Problem: Company XYZ needs to secure their vault's passcode. They could use something standard, such as AES, but what if the holder of the key is unavailable or dies? What if the key is compromised via a malicious hacker or the holder of the key turns rogue, and uses their power over the vault to their benefit?

This is where SSS comes in. It can be used to encrypt the vault's passcode and generate a certain number of shares, where a certain number of shares can be allocated to each executive within Company XYZ. Now, only if they pool their shares can they unlock the vault. The threshold can be appropriately set for the number of executives, so the vault is always able to be accessed by the authorized individuals. Should a share or two fall into the wrong hands, they couldn't open the passcode unless the other executives cooperated.

There is an example Python program of Shamir's_Secret_Sharing.

If you want to keep this simple you can just make the password a big long number. Then create several smaller numbers that together add up to the big number. If a calculator that can handle such a long number won't be available, then the numbers can be made easier add up by hand by selecting smaller numerals which don't overflow in to the next number's spot when adding.

This doesn't allow for a designed minimum portion of those who know the partial secret to agree to obtain the secret, unless multiple partial sets of the secret are distributed to different sets of the people involved. That would get messy very quickly with all the required permutations. It's just meant to be a simple way!