Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How do keys work? Explained in one Gif (theultralinx.com)
436 points by macalicious on Jan 22, 2013 | hide | past | favorite | 78 comments


How blogspam works. This is blogspam upon blogspam. I dare not say that this link

http://delima.soup.io/post/295576131/how-keys-work

is the original link, but it's at least two links closer to the original source than the link submitted here to HN.

AFTER EDIT: Many thanks to the HN reader who found the original source, which deserves traffic much more than blogspam. I flag blogspam relentlessly since another HN user asked about the issue.

http://news.ycombinator.com/item?id=4583307


Yep, looks like it's originally from here (and in much higher quality): http://www.lockpicking101.com/viewtopic.php?f=3&t=43120


Here's direct link to the original youtube: http://www.youtube.com/watch?v=QiYIYXEX9Ko


No site that has a 25x25 count grid of animated avatars to show who "reposted" deserves to get traffic


That original link grinds most browsers to a halt.


Locks are a relatively simple a fun mechanism to play with. Lock picking can be explained similarly. It's essentially simulating that key by popping the pins up to the shear line (the horizontal plane) and applying tension via your tension/torsion tool so the pin doesn't fall down. Then move onto the next one. If you get all pins to the shear line, the lock opens.

It's also a pretty cheap hobby to get into. Though the legality varies by country/state so do check into that first if interested.


A few years ago I went and bought myself the cheapest Yale type lock I could find in order to teach myself to pick it. After repeatedly failing I took it apart and discovered some of the pins had recesses that were designed to defeat this kind of attack (I think they're called "spool pins"). I never managed to put it back together again, and that was the end of my lock picking career.


Here's a video with more info about these anti-picking mechanisms and how to defeat them:

http://www.youtube.com/watch?v=ZQVsI4qyl3g


I got caught up with this guy's videos and watched all of them because they are so cool. Thanks for the share!


It also comes in handy more often than you'd think. Picking real-world residential locks is usually a Bad Idea even if you're allowed to, but with a little practice anyone can learn to open cheap wafer locks (like you find on desk drawers) or padlocks in seconds with nothing more than a couple of bobby pins.

Like when I cleverly managed to mail my apartment keys to myself, including my only mailbox key...


> Like when I cleverly managed to mail my apartment keys to myself, including my only mailbox key...

If my mailbox key was locked inside my mailbox, I would just wait for the postal person to show up. They have keys that open the entire wall of mailboxes. Just wait in the distance until they open the wall and then go get the mail out of your box. Just act like you don't see anything wrong with grabbing your mail and they probably won't question you.[1] As a backup, have a photo id with your address on it. :)

1: I've done this myself because it was easier than using my key. The postal guy saw me and we exchanged a few pleasantries.


That did occur to me, but I realized I have no idea when our mailman actually shows up at our building, since our schedules have never crossed. I decided I would feel too silly staking out our building all day :P

Although now I realize that I could have done a binary search over the course of the week by checking if mail was there or not...


kinda hard to check if the mail is there if you don't have a key to check if they mail is there.


This is bad practice from the mailman. The lock is there so that only the owner of the box can authenticate and retrieve the mail. If he allows people to walk up and select mail from the box then he is allowing a circumvention of the authentication protocol.


It's not up to the mailman to prevent theft of mail. Most mailboxes outside of apartments and businesses don't have any security other than the threat of federal charges for mail theft.


It may be worth reiterating that I (or anyone) can open my (or anyone's) mailbox with a pair of bobby pins. This "authentication protocol" may not be worth making too much hay over.


Depending on where you live the mailman can even be fired or sued.


Depends on the type of mailbox; some styles have a drop-slot for delivery that doesn't allow retrieval.


When I was in college, I wanted to learn how to pick locks (just because I thought it would be an interesting "party trick" -- I would never steal, having been a victim of theft several times myself). I ordered a set of lock picks and practiced on a knob lock from Home Depot...to my surprise I was able to open the lock within minutes.


I ordered lock picks on Thursday. I can't wait for them to arrive!


reddit.com/r/lockpicking is also a great resource.


Old but still relevant. I learnt about locks here.

http://www.lysator.liu.se/mit-guide/MITLockGuide.pdf


> ...it is worth pointing out that lock picking is just one way to bypass a lock

A sobering insight after a break-in and a conversation with a locksmith. A lock is only as good as the latch, and door that it's sitting in, and the hinges attaching the door, and the molding surrounding it, and the wall it's in.


There's a Mythbusters where they quite literally tackled the action-movie-style busting down the door. Turns out it doesn't matter how many locks are on the door when Jamie kept knocking them off their hinges.


most of the time though, you're going to be picking your or a friend's lock, and in those cases it's much more desirable to preserve the wall/door/hinges..


And the window in the wall (if not the door, itself).


... and the person who is responsible for locking the door, and the person who is responsible for following up on reports of suspicious behavior near that door, and the person who is called out when someone finally discovers the lock must have been picked at some point in the past, and the legal system surrounding all of them, and the civil society that gives that legal system authority and legitimacy, and the broader cultural scope that gives the civil society a foundation and a sphere in which to act confidently, which depends on people believing that, if they do wrong in that society, someone will punish them.

So picking a lock in Compton might be perfectly safe assuming you don't get shot outright, unless Compton's been gentrified while I wasn't looking.

On the flip side, you won't even get close to Fort Knox with bad intent, largely because you know you won't get close to Fort Knox with bad intent.


"...you won't even get close to Fort Knox with bad intent..."

Depends how powerful you are. Why did the gold audit that was supposed to take place been refused? Maybe because there's not anywhere as much gold in Fort Knox as what there's supposed to be. If this is true, people with bad intent managed to bypass the "locks": there's more than one way to defeat the purpose of locks ; )


Learned how to pick locks decently well with that guide. It's a good read.


Same. My Dad gave me a lock and a copy of this he printed at work one evening. I was pretty young (I think 11?) but I learnt a lot. Dads are awesome!


As a kid, I learned how keyed locks work by playing the video game ZZT. http://en.wikipedia.org/wiki/ZZT In "Town of ZZT", one of the built-in worlds, there is a board where you have to move what are effectively tumblers to clear a path through which a column can move freely.

Ah, here's a screenshot of the board! http://tf2tags.com/dr_dos/img/zzt/town/zzt_036.png

This board is show as a whole, but in the game the board was "dark" and so you could only see what was within about 5-6 blocks from your character.


Seen a similar image a while back. Locks suddenly made a lot of sense then.

Perhaps make another one about how walker keys work with locks like these? If I remember correctly, they were keys with filed down teeth. You had to put the key all but one tooth into the lock and then nudge it all the way in while turning, which would knock the top half of the metal rods up, allowing the lock to open.


Same thing as a bump key? Basically you cut down all the notches to the lowest setting (ie the deepest cut for that model of key), and then exactly as you described you put the key in up to the penultimate notch, at which point you apply rotational pressure on the key and knock the key in with some force (aka "bump" it in). The force of the insert bumps all the pins up, and the torque applied to the key catches the top half of the pin in the "open" position as the mechanism falls. If you catch all the top halves, the lock is breached.


I have been brought up picking since I was in secondary school (Both Father and older Brother are locksmiths). It's very interesting stuff and once you see the in's and out's of peoples daily "security" you realise it's just about a game of not being the lowest common denominator. If a thief wants in, they aren't going to spend there time picking (or even bumping) they go straight for the snapper, or simply put the window through.

Apologies on the video music, you might want to turn it down but this is the first Video I come across of snapping a euro cylinder on youtube: http://www.youtube.com/watch?v=vVeij3jffCM


This design is a good visual for why lock bumping is fairly easy on most residential locks.

http://en.wikipedia.org/wiki/Lock_bumping


On residential locks the tolerances on each pin's traveling cylinder are loose enough to allow you to apply shearing force on the pin by holding the lock tight (as if trying to open it) and quickly bump each pin up so they land on the salient edge of the entire cylinder block and avoid dropping back into a locking position.


Wikipedia disagrees with you, albeit without a citation:

"High-quality locks may be more vulnerable to bumping unless they employ specific countermeasures. More precise manufacturing tolerances within the cylinder make bumping easier because the mechanical tolerances of the lock are smaller, which means there is less loss of force in other directions and mostly pins move more freely and smoothly. Locks made of hardened steel are more vulnerable because they are less prone to damage during the bumping process that might cause a cheaper lock to jam."

http://en.wikipedia.org/wiki/Lock_bumping


I'd like to see a version of the gif done with lock picks.


http://i.imgur.com/kaOa0G3.gif

Here's a version I found on reddit a while back.


what exactly is that little dirt stain that moves from cylinder to cylinder supposed to be? is it supposed to represent tension or something?


It's the currently binding cylinder. With the right amount of tension applied via the wrench, one pin binds at a time, which is what allows you to set the pins one at a time.


What's the difference in feeling where he's 'testing' which one's the binding cylinder or not? Is it just a tiny bit more 'grainy' harder to push or something?


The binding pin won't bounce up and down when you actuate it with the pick. The non-binding pins won't offer any resistance at all. Also, when you manage to get the binding pin to the shear line, the tension wrench will sometimes give up a little more rotation.


why does only one cylinder bind at a time?

It seems to me like the lock shouldn't be able to turn at all until all of the cylinders are pressed to the right height.


Due to imperfections in the lock. It only takes a tiny difference for that tension to not be applied evenly so you can focus on one pin at a time.


Manufacturing tolerances aren't 100% perfect.


it's the next 'key' pin. (the little stain is a key icon.)


Interesting. What is that little gold-ish looking thing that moves from one pin to the other in this gif?


When you turn a lock, small machining defects mean that more load is borne by one pin than the others. Pushing up that pin while applying torque (using the allen wrench in the GIF) will cause that pin to be held up, which applies more load to some other pin.


It's suppose to show you which pin is the correct one. The lock picker obviously can't know that's why he tries all of them.


This is what you're after. http://toool.us/deviant/index.html


The "MIT Lockpicking Guide" covers the subject nicely, if you are just interested in how it works. A slick gif would be nice though.


That's what I was thinking. That would be quite nice.


If I wanted more content like a single gif in a blog post I'd go to reddit. This is currently #1 on HN.


If I wanted more comments complaining about GIFs turning a site into Reddit I'd go to Quora.

;)


I don't see what is wrong with it. It appeals to hackers and explains it instantly. Would you be happy if it was 1000 word article instead?


Right. Because I'm dissatisfied with a single gif I want an essay. Sandwiches appeal to hackers. All I'm saying is that there are other places that this is more suited to and this isn't one of them in my opinion.


Did anyone follow that blog post, back to Gizmodo, back to the source it originally came from? (Soup) What a weird site, showing all manner of strange things. The internet is a weird place sometimes.


This page seems to have debug.phonegap.com script tag included, means anyone can see everyone else viewing the page (and execute javascript in their browser)... http://debug.phonegap.com/client/#ultralinx


I recommend "Practical Lock Picking" by Deviant Ollam for those whose interest was piqued by this. Besides all the technical goodies, it contains some interesting moral views on locks and lock picking that apply to the digital world as well.


This is how the most common lock works, but it doesn't cover side-bar locks, Medeco's, or other slightly more advanced setups. Still, good reference point for a basic understanding.


That's a great way to explain it.

However, can anyone explain how lock picking works, that GIF makes it seem like it would be very difficult. On TV at least they do it in a matter of moments.


SquareWheel explained it very well.

As for the difficulty, you'd be surprised how easy it is. I started picking a few weeks ago for fun and I've been able to pick your basic store bought locks within a couple minutes with the hook tool (where you have to lock each pin individually).

There is another tool, called a 'rake', that tries to set several pins at once -- it basically has several jagged edges, much like a key. With rakes I can beat these locks in a matter of seconds, and I'm a newbie! I'm working on the lower end of locks, but even still, it has made me more wary of home security.


I just wrote a quick explanation above, but let me know if you want more detail. Picking difficulty varies quite greatly by number of pins, number of security pins (some are tougher!), quality of the lock (the imperfections make it possible), and the tool/experience you have.

I'm also by no means an expert, just somebody interested in the hobby.


From the source this might help explain:

Nitesh - yesterday Related, the flaws in the machining of the pin chambers is what you exploit while lock picking. You turn the lock slightly, then use another tool to push pins up one at a time, and hopefully when they come down they get stuck on the top of the lower pin chamber. Once you do that with every pin, it's unlocked.


It makes me wonder how strong the cylinders are. They look quite small, so it seems like with a tool shaped like a "T" with a wide top you'd be able to force a lock open.


Pretty sure they are stonger than any key you could make, so the key would snap before the cylinders do.

Plus, you need to be able to allow the entire mechanism to turn in order to disengage the lock, which the broken cylinders would interfere with.


One cut more to every drum and it would explain master keys


I remember seeing this explained on Mr. Wizard as a kid :) He used a giant cardboard key and a poster with moveable tumblers attached to demonstrate it.


Since I'm on HN, I was expecting and hoping this to be about public-key cryptography.


It doesn't explain MacGyver at all.


Very well done


What about Mul-T-Lock double-sided keys? Is there any .gif or YouTube video showing how they work?

They seem to be much much harder to lockpick. My key-guy can lockpick garage doors and cars and whatnots but if I forget my Mult-T-Lock double-sided keys he needs to drill through the hole and destroy the entire system to be able to open the door, which then needs a new mechanism.

One of my neighbour got robbed and the thiefs did the same: they drilled through the Mult-T-Lock hole.

Can these be lockpicked? If they can, it seems to be way harder than regular keys or than typical double-sided keys.


Welcome to the new Reddit


Whoa, mind blown


I wonder how did people come up with a structure like that...back in the days people were smarter.


This is super interesting as well!

http://woodgears.ca/combolock/index.html

Now you know why you had to go twice around when opening your school locker. ;-)


The modern pin tumbler lock is more or less an evolutionary step along a long line of lock designs. The basic principles of all locks are basically the same; you have some sort of hidden configuration (in this case, the lengths of each pin, or in the case of a much more primitive warded lock, the positions of the posts) which must be matched by the key for mechanical movement to be possible.

How you combine those elements takes some intuition, but if you really look around you at the world today I don't think it can be said that this sort of creativity and insight has been lost to history. We're building some pretty wild stuff these days.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: