It’s my understanding that mass produced items are all basically the same. If you buy something like a toothbrush, for example, then any other toothbrush from that same assembly line is going to be basically the same and have all the same specs (with the exception with minor defects here and there), because the machinery and process to make any those toothbrushes are all basically the same.

But that can’t be the case with locks and keys. Because if every lock and key were the same then there’d be no point in having them. Anyone could just bought the same key/lock combo could use it to unlock your front door. So all or most keys and locks must be unique. So how are they mass produced in a way that preserves their uniqueness?

  • dbx12@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    2 hours ago

    There are actually “rules” about which pins may go into which positions. For example, you don’t want a very short pin (resulting in a “thick part” on the key’s blade) in the first position (closest to the bow, the part you are gripping on a key) and then only longer pins the further you move towards the tip. If you had such key, you could remove it from the lock while the plug is turned as only deeper cuts (for longer pins) are encountered by the first pin. And a deeper cut can take a shorter pin without issues. That’s why you don’t see keys with a “staircase pattern”.

    Another limitation is MACS (maximum adjacent cut specification), which governs which cut depths may be adjacent. When you insert a key, the pins ride up and down the cuts on the key. If you were to put a super deep cut next to a super shallow cut, the “slope” gets too steep and the key is hard to insert or remove. This means if you know the depth of one cut and the MACS for this model of lock, you can rule out certain cut depths for its direct neighbors. For example, you know that the key you want to forge has a very deep cut, let’s say depth 8, on a particular position. Since we know the model of the lock (the professionals recognize a lock just by looking at the keyhole), we know that MACS is 5 and the deepest possible cut is a 9. The direct neighbors of our 8 can be either a 9 or anything from 7 to 3. They cannot be 1 or 2 since that would violate the MACS and repeating the same depth is also very unusual, so we can rule out 8.

    Now add manufacturing tolerances into the equation and the potential key space is getting even smaller.

    Edit yes, locks are a great thing to nerd out about.