# Is there a administrator key that can decrypt all ciphertexts encrypted with different keys by different persons in a group?

here is the scenario:

• $A, B, C, \ldots, Z$ are in a group with a administrator $Admin$,
• each of the users in the group has his own key $Key_A, Key_B$, and so on...
• everyone encrypt his own information with his own key,

but would it be possible to have a key such as the Admin would have the possibility to decrypt all the ciphertexts of all the users?

1. the Admin share a master key with all the members in the group,
2. all users register his identity at the Admin,
3. the Admin generate every user's secret key for every user,
4. the Admin share keys with all the users.

but in this way the Admin will know all the users' keys, this is insecure.

• You could admit that KeyA, KeyB, etc are derived from KeyAdmin. I suggest you to take a look at en.wikipedia.org/wiki/Key_derivation_function. – Raoul722 Jun 1 '16 at 8:39
• Possible duplicate of multi key encryption – Makif Jun 1 '16 at 8:54
• @Makif While this is similar, I would say that the idea is different, in your possible duplicate it is the boss that want to "give the files", here it is sort of the other way around. – Biv Jun 1 '16 at 8:59
• @Raoul722 Actually, the users' keys should not generated by the Admin's key, because in this way the Admin could have all the keys of the users, and hence counterfeit data not belong to the users. But this problem maybe solved by signed to the ciphertexts by the users' private key? – mendez Jun 1 '16 at 9:26
• Why is the admin knowing the keys of the users insecure (any more insecure than implied by the ability of the admin to decrypt everything)? Because it allows them to also encrypt data as that user? – CodesInChaos Jun 1 '16 at 10:59

Another solution (cf to @Raoul722 comment) is the following:

It is easily feasible with a mix of symmetric and asymmetric encryption.

Assume each user $k$ have a key pair: $(K_{pub}^k,K_{priv}^k)$.
The admin also have his key pair: $(K_{pub}^{admin},K_{priv}^{admin})$ where $K_{pub}^{admin}$ is known by all.

Encryption scheme for a user $k$:

1. generate a random key $K_{sym}$.
2. Encrypt your file with a symmetric encryption device such as AES with $K_{sym}$.
3. Encrypt $K_{sym}$ with assymmetric encryption (RSA, ECC...) with the $K_{pub}^k$, let's call it $K_k$.
4. Encrypt $K_{sym}$ with assymmetric encryption (RSA, ECC...) with the $K_{pub}^{admin}$ let's call it $K_{admin}$.

Decryption scheme for a user $k$:

1. Decrypt $K_k$ with his private key ($K_{priv}^k$), he will get $K_{sym}$.
2. Decrypt the file with $K_{sym}$.

Decryption scheme for a user $admin$:

1. Decrypt $K_{admin}$ with his private key ($K_{priv}^{admin}$), he will get $K_{sym}$.
2. Decrypt the file with $K_{sym}$.

The sole problem is where do you store the encrypted keys: $K_{k}$ and $K_{admin}$ (maybe in the meta-data of the encrypted files? :) )

About the key privacy: In this scheme, having a asymmetric scheme prevent the admin to know each user private key.

Note: this kind of scheme is useful in company in the following scenario. Assume that everybody encrypt his files. One happens to have a lethal accident (R.I.P.), how do you retrieve his work ? The problem that will arise is the safe storage of the master key (usually off-line and sealed to prevent malicious usages).

• thank you for the answer, it can solve my question. For each encryption, we need do generate a random encrypt key, without any other good solutions i think storing the encrypted keys in the meta-data is fine. – mendez Jun 1 '16 at 9:05
• @mendez Don't forget to accept the answer (tick under the up-vote/down-vote) if it suits you (it prevent the community account from random bumping it). Also you can wait to see if any other ones pops up and later accept it. :) – Biv Jun 1 '16 at 9:24
• okay, cause I'm a new here, some rules maybe not known well. Thank you again. :-) – mendez Jun 1 '16 at 9:29