# Multi party authentication or encryption

I rent a room in a building. There are also 9 others who rent other rooms in this building. Just like everyone else who rents a room I only have one key of this building.

With my key I can open the front door of the building. Just like everyone else who rents a room can with their key. However, only I can open the door of my room with my key and the others can't open my room with their keys. I can also not open other peoples rooms with my key. Also, the owner of the house probably has a key that can open all the doors.

So essentially you got the front door which can be unlocked with multiple keys and my room door which can only be unlocked by my key (and the owner of the house).

Is there anything like this in cryptography? Where some messages can be decrypted by multiple people but not just everyone (you have to at least rent a room) while other messages can only be decrypted by 1 or 2 people. Even though everyone only has and uses 1 key.

• en.wikipedia.org/wiki/Secret_sharing Commented Jan 12, 2023 at 2:15
• Suppose there are two persons, A and B. Do you mean $K_A$ for front door and room door A and $K_B$ for front door and room door B? Commented Jan 12, 2023 at 6:37
• Yes, but there is also another door C that both A and B can open with their respective K_A and K_B. Commented Jan 15, 2023 at 12:50

The specification of the groups able to decrypt/sign data can be very sophisticated. For example, if we have groups such as $$A$$ for people who have reached the age of majority, $$S$$ for people who have paid a subscription, $$P$$ for privileged users then we can encrypt/verify data that is readable by the set $$(A\cap S)\cup P$$.