How a Pin Tumbler Lock Works弹子锁是怎么工作的

The lock on your front door is a row of tiny stacked pins. Slide a key in, cut your own, and then pick one yourself.

你家门上的锁,里面是一排叠在一起的小弹子。插一把钥匙、自己削一把,最后亲手撬开一把锁。

A cylinder that refuses to turn一个拒绝转动的圆柱

Look at the lock face-on and you see a smaller cylinder, the plug, sitting inside a fixed housing. The key goes into the plug, and turning the key turns the plug, which pulls back the bolt. The whole job of the lock is to stop that plug from turning unless the right key is inside.

从正面看锁,你会看到一个小圆柱(锁芯)装在固定的锁壳里。钥匙插进锁芯,转动钥匙就转动锁芯,从而拉回锁舌。锁的全部任务,就是在插入正确钥匙之前,不让锁芯转动。

It does that with a stack of pins in a hole drilled through both parts. The bottom one, the key pin, touches the key. The top one, the driver pin, is pushed down by a spring. The boundary between plug and housing is called the shear line.

它靠的是一组叠放在孔里的弹子,这个孔同时穿过锁芯和锁壳。下面那颗叫下弹子,直接碰到钥匙;上面那颗叫上弹子,被弹簧往下压。锁芯和锁壳之间的分界面叫剪切线。

Try to turn the plug, then lift the pins and try again. It only turns when the gap between the two pins sits exactly on the shear line. Lift too far and the key pin blocks it instead.
先试着转动锁芯,再抬起弹子试一次。只有当两颗弹子之间的缝恰好落在剪切线上时,锁芯才转得动。抬过头了,就换成下弹子把它卡住。

Whatever crosses the shear line locks the two parts together, like a bolt through a hinge. Nothing crosses it only when the split between the pins lands precisely on the line.

任何横跨剪切线的东西,都会像插销穿过合页一样把两部分锁死。只有当弹子之间的缝精确落在这条线上,才没有东西横跨它。

What the key does钥匙在做什么

A real lock has five or six of these stacks in a row, each with a key pin of a different length. Seen from the side, the cuts along the top of a key are a set of heights. Slide the key in and each cut lifts its stack by exactly the amount that parks the gap on the shear line.

真实的锁有五六组这样的弹子排成一排,每组的下弹子长短不一。从侧面看,钥匙上的齿就是一组高度。钥匙插到底时,每个齿恰好把对应的那组弹子抬到让缝落在剪切线上的位置。

Drag the key in and out. Notice how the sloped tip and the ramps between cuts push the pins up and let them fall as it slides. With the right key fully inserted, every gap is on the shear line.
把钥匙拖进拖出。注意钥匙尖的斜面和齿之间的坡道,是怎样在滑动中把弹子顶起、又让它们落下的。正确的钥匙插到底时,每一道缝都在剪切线上。

Cut your own key自己削一把钥匙

Each cut can be one of a handful of standard depths. Drag the cuts below up and down. The lock tells you which stacks are still in the way.

每个齿只能是几种标准深度之一。上下拖动下面钥匙上的齿,锁会告诉你哪几组弹子还挡着路。

Drag a cut up or down. A ✓ means that stack's gap sits on the shear line; an arrow shows which way the cut needs to go. The numbers on the key blade are the depth codes a locksmith would write down.
上下拖动一个齿。✓ 表示这组弹子的缝已经在剪切线上;箭头告诉你这个齿该往哪个方向改。钥匙上的数字,就是锁匠会记下来的齿深编码。

How many different keys are there?一共能有多少种钥匙?

A lock with 5 pins and 10 depths could in principle have 105 = 100,000 different keys. Manufacturers throw many of those away. Neighbouring cuts can't differ by too much, or the steep slope between them would break off or jam the pins. That rule is called the maximum adjacent cut specification.

5 组弹子、10 种齿深的锁,理论上有 105 = 100,000 种钥匙。但厂家会扔掉其中很多:相邻两个齿的深度不能差太多,否则中间的陡坡要么容易折断,要么会卡住弹子。这条规则叫“最大相邻齿差”。

The bar compares all possible cut combinations (outline) with the ones allowed by the maximum step between neighbouring cuts (filled).
长条对比了所有可能的齿深组合(外框)和满足相邻齿差限制的组合(填充)。

Tens of thousands of combinations sounds like a lot, until you notice that a lock doesn't really check the key all at once. It checks one pin at a time.

几万种组合听起来很多。可你很快会发现,锁其实并不是一次性检查整把钥匙,而是一次检查一颗弹子。

Why a lock can be picked锁为什么能被撬开

Nothing is machined perfectly. The holes for the pins are drilled a hair off from a straight line. So when you gently twist the plug with a small lever called a tension wrench, it rotates by a fraction of a millimetre and one driver pin gets pinched before all the others. That pin is binding.

没有任何东西能加工得绝对精确。弹子孔总会稍微偏离一条直线。所以当你用一根叫“张力扳手”的小杠杆轻轻拧锁芯时,它会转动不到一毫米,某一颗上弹子会比其他所有弹子先被夹住。这颗弹子就是卡紧的那颗。

Push the binding pin up with a pick and you'll feel it stiff and gritty. The moment its gap reaches the shear line, the plug rotates a tiny bit further and the driver pin gets stranded on top of the plug's edge. It is now set. Then the next-tightest pin starts binding, and you do it again. The lock is being solved one digit at a time instead of all at once.

用拨片往上推这颗卡紧的弹子,你会感觉它又紧又涩。它的缝一到剪切线,锁芯就再多转一点点,上弹子被搁在了锁芯边沿上方。这颗就到位了。接着,下一颗最紧的弹子开始卡紧,你再来一次。锁就这样被一位一位地解开,而不是一次性破解。

Press and drag a pin up with the pick, then let go. The binding pin resists and sets with a click at the shear line; the others just spring back. Push too far and you overset it: turn the tension off to reset. The misalignment is exaggerated so you can see it.
按住一颗弹子往上拖(相当于用拨片推),再松手。卡紧的那颗会有阻力,到剪切线时“咔”一声到位;其余的只会弹回去。推过头就会过位:关掉张力即可复位。图中的偏差被放大了,方便你看清。

Real locks fight back. Many use security pins shaped like spools or with serrations, which fake a set and then trap the pick. Better locks add sidebars and extra rows of pins. But the basic weakness stays the same: a lock that can be tested one pin at a time can be solved one pin at a time. (Only pick locks you own.)

真实的锁会反击。很多锁用了防盗弹子,做成线轴形或带锯齿,会制造假的到位、再把拨片卡住;更好的锁还加了侧杆和额外的弹子排。但根本弱点不变:一把能被逐颗测试的锁,就能被逐颗解开。(只撬你自己的锁。)