system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do you design locks that allow several different keys open the entry door to the same apartment complex, but also just the door leading to one of those apartments?
gpt
A modern lock have stacks of pins in them where each pin is split in two. Only if you insert the correct key will the pins will align with the cylinder and you can turn the lock. So called master key systems have some pins that is split in three. This means that there are two possible keys that match the lock as there are two different ways to align the split pins with the cylinder. This does weaken the system as now there are more places where a lockpicker can get the lock to open in. It is also possible to have intermediate keys in the system. So for example a cleaner might have a key that only opens some apartments but not all but the manager can open all of them. This is done by having multiple triple split pins in each lock. But of course this makes it even easier for a lockpicker.