Close Menu
    Facebook X (Twitter) Instagram
    SciTechDaily
    • Biology
    • Chemistry
    • Earth
    • Health
    • Physics
    • Science
    • Space
    • Technology
    Facebook X (Twitter) Pinterest YouTube RSS
    SciTechDaily
    Home»Science»How Do Keys Open Locks? An Engineer Explains
    Science

    How Do Keys Open Locks? An Engineer Explains

    By Scott Craver, Binghamton UniversityMay 18, 2022No Comments4 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn WhatsApp Email Reddit
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email Reddit
    Key Open Lock
    The sequence of depths of the valleys on a key acts like a code that must match the lock.

    Keys open locks by aligning pins to specific valley depths, much like passwords protect security. Both require precision and secrecy to prevent unauthorized access.

    Have you ever wondered how keys work to open locks? I teach a course in computer security where we learn how locks function – and also how they can be broken or bypassed. We do this because locks teach important principles about security in general.

    If you look closely at a key, you’ll see its upper edge has a bunch of V-shaped valleys. If you inspect the key more closely, perhaps with a ruler, you’ll notice the bottoms of these valleys are equally spaced. The depth of the valleys encodes a sequence that is accepted by the lock, with each valley contributing one value to the combination.

    Key Valley Spacing
    The spacing of the valleys is key. Credit: Scott Craver

    Pins and Shafts: Lock Functionality Explained

    Inside the lock is a cylinder – the part that moves when you stick your key in and turn it. The key can turn only if all its valleys are the right depth for your particular lock.

    But how does your lock detect whether your key’s valleys have the right sequence of depths?

    Lock Parts Pins Cylinder
    A peek at the parts inside a lock, including the pins, shafts, and cylinder. Credit: Scott Craver

    Inside the lock are vertical shafts, one centered over each valley of the key. In each shaft is a pair of metal pins that can freely slide up and down. Depending on where the pins are, they can block the cylinder from turning and prevent the lock from opening. This happens whenever a pin is partially sticking into or out of the cylinder.

    When you stick a key in the lock, the pins fall into the valleys. If a valley is too high, it causes a pin to stick out and jam the cylinder. If a valley is too low, the pin sinks too low and the pin above it will sink into the cylinder and jam it. However, if the right key is inserted with each valley at just the right depth, none of the pins get in the way.

    Pins Aligned to Open Lock
    For a cylinder to turn and a lock to open, all the pins must be aligned. Credit: Scott Carver

    Keys are made by placing a blank key into a grinding machine that is programmed to carve out the exact valleys that are needed. A locksmith can also change a lock by removing its pins and fitting it with new ones to match a chosen key.

    Keys as Security Tools: Similarities to Passwords

    In computer security, we say that security relies on “something you know, something you have or something you are.” A password is an example of something you know. A key is an example of something you have. A fingerprint would be an example of something you are. But as you can see, a key is also very much like a password, except it is encoded by grinding a piece of metal.

    For this reason, you shouldn’t ever post a picture of your house key on the internet. That would be like posting a picture of a credit card or a password – someone could use the photo to duplicate the key.

    It is also possible to unlock or “pick” locks without a key. By sliding a thin piece of metal into the cylinder and gently pushing the pins to the correct height one by one, locks can be opened. However, it takes a great deal of skill and practice to do this.

    Lessons from Locks for Computer Security

    What does this teach us about security? First, we must make keys secret by making a very large number of possible keys, so that the right one is hard to guess or build. It’s the same for passwords. Second, it’s important to engineer a lock or computer program that requires every bit of the key or password to be exactly correct.

    It’s important to study the inner workings of locks and computer programs to understand how their design might allow someone to break them.

    Written by Scott Craver, Associate Professor of Electrical and Computer Engineering, Binghamton University, State University of New York.

    This article was first published in The Conversation.The Conversation

    Never miss a breakthrough: Join the SciTechDaily newsletter.
    Follow us on Google and Google News.

    Binghamton University SUNY The Conversation
    Share. Facebook Twitter Pinterest LinkedIn Email Reddit

    Related Articles

    What Will the Earth Be Like in 500 Years?

    Cut Your Kitchen’s Carbon Footprint With Magnetic Induction Cooking

    Dawn of the Dinosaurs Triggered by Newly Discovered Mass Extinction Event

    Underwater Titans: Giant Sea Scorpions – Some Larger Than Humans – Were Fierce Marine Predators

    Einstein’s Two Big Mistakes

    Do Opposites Really Attract? Not According to Science

    Paradoxes of Probability & Statistical Strangeness

    Light vs. Dark Turkey Meat – Here’s the Reasons Behind the Different Colors

    New Research Reveals Easter Island Had a Cooperative Community

    Leave A Reply Cancel Reply

    • Facebook
    • Twitter
    • Pinterest
    • YouTube

    Don't Miss a Discovery

    Subscribe for the Latest in Science & Tech!

    Trending News

    Researchers Have Found a Dietary Compound That Increases Longevity

    Scientists Baffled by Bizarre “Living Fossil” From 275 Million Years Ago

    Your IQ at 23 Could Predict Your Wealth at 27, Study Finds

    320 Light-Years Away, a Planet Confirms a Fundamental Cosmic Assumption

    The Crown Jewel of Dentistry? Breakthrough Tech Could Transform Tooth Repair

    Python Blood Could Hold the Secret to Weight Loss Without Side Effects

    Naturally Occurring Bacteria Completely Eradicate Tumors in Mice With a Single Dose

    New “Nanozyme Hypothesis” Could Rewrite the Story of Life’s Origins

    Follow SciTechDaily
    • Facebook
    • Twitter
    • YouTube
    • Pinterest
    • Newsletter
    • RSS
    SciTech News
    • Biology News
    • Chemistry News
    • Earth News
    • Health News
    • Physics News
    • Science News
    • Space News
    • Technology News
    Recent Posts
    • 34-Million-Year-Old Snake Found in Wyoming Rewrites Our Understanding of Evolution
    • Prehistoric “Vomit Fossil” Reveals Never-Before-Seen Flying Reptile
    • Scientists Discover Bizarre Crocodile Relative That Walked on Two Legs
    • How Quantum Mechanics Went From Baffling Theory to Revolutionizing Modern Technology
    • Scientists May Have Found the Key to Jupiter and Saturn’s Moon Mystery
    Copyright © 1998 - 2026 SciTechDaily. All Rights Reserved.
    • Science News
    • About
    • Contact
    • Editorial Board
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.