Yesterday found me in the local hardware store, getting electrical conduit pipes cut to size for curtain rods. I’ve been hard at work at a super long curtain project at home, and I’ve had to revisit both curtain rods and curtain brackets; turns out that store-bought curtain rods are simply not strong enough to hold my burly, blackout-lined, homemade curtains. It’s more or less a point of pride for me. I’m even learning to sew kind of straight, also something I’m proud of.
Anyhoo, since I was there anyway, I asked the guy to copy my house keys 5 times each. I do this once or twice a year since my teenagers have a tendency to lose them at a pretty consistent rate and I was down to 4 sets. But at the same time, I was going home to wait for all my pipes to be chopped, so I needed to take my keys with me. The long and the short of the story is I told the guy working there, Daniel, that I’d wait for him to make a first set of house keys.
Then Daniel said the magic words: oh, don’t worry, I’ll just quickly write down the codes for the keys and I’ll give them back to you.
What? Keys have embedded codes? I had no idea. I thought they duplicated keys by shaving one key to look just like another. And yes, I was worried that after many many copies, my house keys would stop working, since in each round the approximation to the truth would get slightly worse.
But the system is much better than this. I can even explain how it works, thanks to Daniel’s patience. And, I should say, I have what’s known as a “Medeco” brand key, which is probably different from other brands. Daniel’s machine was fitted to cut more than one brand.
Also, it turns out there is more than one style of Medeco key. My housekeys had 6 “pins,” which is to say 6 parts to their code.
OK so basically what this means is that there are 6 decisions to make when you cut my housekey. They correspond to 6 cuts, which look like little valleys when you’re done.
There are two dimensions on each cut; the first is easy to see in the above picture, namely the depth of the cut. There’s a little mechanism that Daniel uses to measure the depth of each cut, and there end up being 6 levels.
Next, you can’t tell by looking at this picture, but Medeco keys also have an angle for each cut. There are three possibilities for the angle: center, left, or right (CLR).
Putting those two together, my apartment doorkey’s code ended up looking something like:
1C 3L 3R 4C 2L 5C
Pretty cool, right? And my building doorkey had a similar code. And now take a look at this video to see how they actually work:
Now you can take a look at your housekey and see if you can write down its code. It might have 5 pins instead of 6, and if it’s not a Medeco key it might not have angled cuts.
So, two things. First, if you think about it, this means there are 18 choices for each cut, because 6 depth levels and 3 angles, and therefore there are 18**6 = 34 million different codes altogether, which makes me feel safe.
But second, it made me wonder how master keys work. I mean, right? I know that keys have to line up pins in a certain way to open the lock, so how could two different codes work for the same lock?
To be more precise, the pins are not solid: they are columns of metal that have slices through them. When all the pins’ slices are lined up, you can turn the key and open the lock.
Well, it turns out that a master key system will have pins that have more than one slice. That means that two (actually, 2**6 = 64) different codes will work on the same lock.
Just in case you’re wondering about security, you should be. Here’s a video in which it is explained how, just using one lock and one key but knowing it’s a master key system, you can narrow the possibilities for that master key way down:
Even so, this is not a Medeco key, and angles of cuts are not discussed.
I know Medeco offers master key systems, because I found that information in their catalog. I’m left wondering if Medeco master key systems have to share angles, in which case it wouldn’t be that hard to derive a Medeco master key either. So I’m ending up feel a bit less safe after all.