跳到正文
视频

锁是怎么工作的:为什么只有你的钥匙能拧开它

弹子锁要打开,锁芯就得转动,而横跨剪切线的一组组弹子挡住了它。钥匙上的每道牙把每组弹子抬到各自的高度;只有对的那把,才能让每个分界都落在线上。理论上最多 10 万种钥匙,还有总钥匙为什么也能开。一支 49 秒的科普短片,每个数字都有出处。

发布于
阅读
约 7 分钟
标签
  • locks
  • how-it-works
  • explainer
目录
  1. 一个必须转动的锁芯
  2. 横跨剪切线的弹子
  3. 没有钥匙:卡死
  4. 每道牙,各有高度
  5. 对的钥匙:每个分界都在线上
  6. 差一道牙:被挡住
  7. 理论上最多 10 万种钥匙
  8. 总钥匙:第二个分界
  9. 结论
  10. 来源

一句话总结: 弹子锁里,锁芯装在锁壳里面,要开锁,锁芯就得转动。两者之间的那条线叫剪切线,大约五组弹子横跨着它:每组是一颗下弹子、一颗上弹子和一根弹簧。没插钥匙时,弹簧把上弹子推过这条线,锁芯就被卡死。钥匙上的牙把每组弹子抬到各自的高度,只有对的钥匙,才能让每组下弹子和上弹子之间的分界恰好落在线上。哪道牙深了或浅了一点,就仍有一颗弹子挡着。五颗弹子、十种深度,理论上最多能做出 10 万种钥匙;总钥匙能开,是因为一颗中间弹子给那组弹子多加了第二个分界。

一个必须转动的锁芯

Wikipedia 讲弹子锁(pin tumbler lock):"In this type of lock, an outer casing has a cylindrical hole in which the plug is housed. To open the lock, the plug must rotate."(在这种锁里,外壳上有一个圆柱形的孔,锁芯就装在里面。要开锁,锁芯必须转动。)Lockwiki:"The plug is the inner piece of the lock that rotates upon insertion and tension of the correct key."(锁芯是锁的内部部件,插入正确的钥匙并施加扭力时会转动。)

The Engineering Mindset 给两者之间的那条线起了名字:"The intersection between the plug and the lock housing is known as the shear line."(锁芯与锁壳的交界处被称为剪切线。)

横跨剪切线的弹子

锁芯和锁壳上都钻了孔。Wikipedia:"A series of holes, typically five or six of them, are drilled vertically into the plug."(锁芯上竖着钻有一排孔,通常是五个或六个。)(我们的图里画了五个。)孔里装着"key pins of various lengths, which are rounded to permit the key to slide over them easily"(长短不一的下弹子,头部是圆的,好让钥匙轻松滑过),还有"Above each key pin is one or more spring-loaded driver pins."(每颗下弹子上方,是一颗或多颗带弹簧的上弹子。)The Engineering Mindset:"Within each chamber we find a spring which pushes another pin, known as a driver pin."(每个孔腔里都有一根弹簧,推着另一颗弹子,叫作上弹子。)

没有钥匙:卡死

Wikipedia:"When the plug and outer casing are assembled, the pins are pushed down into the plug by the springs."(锁芯和外壳装好后,弹簧会把弹子往下推进锁芯。)还有:"When the key is not in the lock, the pins straddle the shear point, preventing the plug from rotating."(钥匙不在锁里时,弹子横跨剪切点,让锁芯无法转动。)

The Engineering Mindset:"With no key inserted, the driver pins sit part way in the housing chamber and part way within the plug. This means the plug is unable to rotate."(没插钥匙时,上弹子一部分在锁壳的孔腔里,一部分在锁芯里。这意味着锁芯无法转动。)

每道牙,各有高度

钥匙就是一排高度。The Engineering Mindset:"Each key pin is a different height, and this will correspond to the profile of the key."(每颗下弹子的高度都不同,与钥匙的轮廓一一对应。)Lockwiki:"Key pins are sized differently corresponding to the different depth cuts on the key."(下弹子长短不一,对应钥匙上不同深度的牙。)这些深度就是钥匙的牙花(bitting),也就是"the depth of key cuts on a cylinder key for a pin tumbler lock, often expressed as a number"(弹子锁圆柱钥匙上牙的深度,常用数字表示)(Wikipedia)。我们示例里的钥匙,牙花是 2-6-4-8-3。

对的钥匙:每个分界都在线上

Wikipedia:"With a key properly cut and inserted into the groove on the end of the plug, the pins will rise causing them to align exactly at the shear point. This allows the plug to rotate, thus opening the lock."(插入锁芯端部槽口的钥匙只要牙齿开得正确,弹子就会升起,恰好在剪切点对齐。这样锁芯就能转动,锁也就开了。)Lockwiki:"Each pin stack must be properly aligned to allow pins to separate at the shear line. Once all pin stacks are properly aligned the plug can freely rotate and actuate the locking bolt to lock or unlock the lock."(每组弹子都必须正确对齐,弹子才能在剪切线处分开。所有弹子组都对齐后,锁芯就能自由转动,带动锁舌来上锁或开锁。)

锁芯一转,弹子就在线上分开。The Engineering Mindset:"The driver pins will have been pushed up and will now fully sit within the housing while the key pins sits fully within the plug. This means the plug is now able to rotate."(上弹子被推上去,此时完全待在锁壳里,下弹子则完全待在锁芯里。这意味着锁芯现在可以转动了。)

差一道牙:被挡住

Wikipedia:"If the wrong key is used, the pins remain misaligned, preventing the plug from turning"(如果用错了钥匙,弹子就对不齐,锁芯转不动)。牙太深,上弹子就留在线上;牙太浅,下弹子就被推过了线。能同时挡住这两种情况的设计由来已久:Wikipedia 讲历史时把双向弹子锁描述为"one where lifting the pins too much or too little prevented opening"(弹子抬得太高或太低都打不开的锁)。Lockwiki:"An incorrect key will not align all components correctly; rotation of the plug will be blocked at the shear-line."(错误的钥匙无法让所有部件正确对齐;锁芯的转动会在剪切线处被挡住。)

理论上最多 10 万种钥匙

Lockwiki:"Theoretically, most locks have a very high number of differs but in reality tolerances and bitting restrictions lower this number dramatically. For example, a 5 pin lock with 10 depth spacings has 10⁵ (100,000) theoretical key differs."(理论上,大多数锁的钥匙差异数都非常高,但实际上公差和牙花限制会让这个数字大幅下降。例如,一把五颗弹子、十级深度的锁,理论上有 10⁵(100,000)种不同的钥匙。)也就是 10 × 10 × 10 × 10 × 10。正如 Lockwiki 所说,实际会少一些;具体少多少,我们不给数字。

总钥匙:第二个分界

Wikipedia:"In a master-keyed lock, some or all of the pin chambers in the lock have three pins in them instead of two. Between the driver pin and the key pin is a third pin called the spacer pin, also known as a master wafer. Thus each pin line has two shear points."(在有总钥匙的锁里,部分或全部弹子孔里装的是三颗弹子,而不是两颗。上弹子和下弹子之间多了第三颗,叫中间弹子,也叫主片。这样每列弹子就有两个剪切点。)还有:"So the lock will open with two keys; one aligns the first set of shear points and the other aligns the second set of shear points."(所以这把锁能用两把钥匙打开:一把对齐第一组剪切点,另一把对齐第二组剪切点。)

一栋楼就是这样运作的:"Each tenant is given a key that only unlocks their own door, called the change key, but the second key is the master key, which unlocks all the doors."(每个住户拿到一把只能开自己家门的钥匙,叫分钥匙;而第二把钥匙是总钥匙,能开所有的门。)

结论

  1. 只有每组弹子都恰好在剪切线上分开,锁芯才会转动;没有钥匙时,弹簧会把上弹子推过这条线。
  2. 你的钥匙是一排高度:每道牙把各组弹子抬起不同的量,只要一道牙差一级,就有一颗弹子挡在路上。
  3. 五颗弹子、十种深度,理论上最多 10 万种钥匙;总钥匙能开,是因为中间弹子给每组弹子多加了第二个分界。

来源

视频用代码制作动画,脚本在 AI 辅助下撰写;上面每条引文都对照出处核实过。示意部分:锁和钥匙的图(比例、五组弹子、弹子长度、钥匙槽、端面视图)、牙花 2-6-4-8-3 和它均匀的十级深度、错误的钥匙、总钥匙锁里那组弹子的长度,以及一大堆钥匙。本片只讲原理,不涉及任何不用钥匙开锁的方法。视频为英文旁白。视频用 Shotloop 制作:我做的免费 Mac 应用,用代码做科普短视频,一个镜头一个镜头地改。

How It Works 更多

YouTube 播放列表 ↗
关注我

我会持续分享正在做的项目、实验和经验。

YouTube 上发视频,X 上发短笔记。这里的每篇文章都会链接到两边。

YouTube