Theoretical codes. What are they?

You often read the term “theoretical codes”, “theoretical code differences” or “theoretical permutations” in advertisements or descriptions of mechanical locks.

Over 200,000 theoretical codes, what does that mean? Well, since it’s advertising, you initially suspect that the number of real code differences is less than 200,000. And that’s true. The theoretical value is simply calculated:

For combination locks – number of graduation marks high Number of code disks

For key locks – Number of cutting depths high Number of cuts

However, these numbers do not really provide any information about the security of a mechanical lock, because the properties of the mechanics are completely ignored.

If you turn a 3-wheel combination lock half or a whole number too far when setting the last wheel, you will find that the lock will still open. This is OK (to a certain extent) as long as the lock still meets the requirement of 100,000 differences per the EN1300 standard. It is just nonsense to mention the theoretical value of 1 million in the context of the lock’s security.

Manufacturing tolerances

All mechanical locks consist of mechanical parts that interlock. And each part has corresponding manufacturing tolerances. The more precisely the parts are manufactured, the more real code differences can be achieved. In other words: the wobblier the key or the dial feels when turning, the fewer real codes the lock has.

Intentional play

That said, it is to consider that a certain amount of play in the parts is necessary to ensure that the lock still works even if some dust has penetrated or corrosion has set in after years of use. As you can imagine, this also comes at the expense of the actual codes available.

User-friendliness

Let’s take a double-bit key with 7 notches, each of which can have 6 different depths, as an example. The theoretical number of codes is therefore 6 to the power of 7 = 279,936. In reality, however, many of the theoretically possible keys are never manufactured. This is roughly how you imagine the key:

However, nobody wants to have any of the following keys:

The corresponding locks would be easy to pick and the individual prongs on such keys would bend or break very easy. Rendering them unsecure and/or extremely user unfriendly. In fact, in our example, almost half of the theoretically possible keys are unsuitable in reality for various reasons.

Another example

You set the code on a combination lock and look at the dial at a slight angle. In the theoretical world, the lock should not open because of the parallax. In reality, however, it does because the width of the fence on the lever is much smaller than the width of the gate in the wheel. The technical term for this is “dialing span” and indicates how much inaccuracy the lock allows when setting the code. But: the greater the user-friendliness, the less remains of the theoretical code differences.

Conclusion

With mechanical locks, specifying theoretical codes is stupid and misleading. Only with electronic locks do theory and reality agree.