Physical Keygen: Duplicating House Keys on a 3D Printer

3D Printed House Key

It occurred to me recently that I had printed almost nothing actually useful on my RepRap 3D printer, aside from parts to improve on or build more RepRaps.  I am rectifying that with this project.  The goal here is to generate working house keys by inputing the key code of the lock into a parametric OpenSCAD model.  Instead of having to explain to my landlord how I ended up with a wedge of plastic jammed in my front door, I ordered a box of (well) used locks and latches from eBay to experiment on.  Luckily, the lot includes both Kwikset KW1 and Schlage SC1 locks, which are the two most commonly found in the US.  I created an SC1 model to start with, but I’ll probably make a KW1 soon.  I’ve uploaded the KW1 model now as well.

Key in Lock

Designing the key model was actually pretty straightforward.  I measured a key with a ruler and calipers and created an approximate model of it that is reasonably easy to print.  I then got pin depth specifications and parametrically differenced them out of the model.  To generate new keys, you can just edit the last line of the file and enter in the key code for your key.  If the code isn’t written on the key, you can measure the height of each bit and compare to the numbers in the Root Depth column on the aforementioned pin depth site.  Perhaps more nefariously, you could implement something like SNEAKEY to generate key codes without physically measuring the key.

You’ll of course need OpenSCAD to edit the .scad file and generate an STL to print out, unless your key just happens to be 33172 like the example STL posted below.  If it is, you can unlock the doorknob currently sitting on my desk.  As a small, precise object, this is a great test of how accurate your Skeinforge settings are.  You may need to adjust some thicknesses or the built in pin depth fudge factor to get it working properly with your printer.  The pictures above show the key being used on a disconnected lock cylinder, but I found it was also strong enough to turn a deadbolt.  If your lock needs a lot of force to turn, you may need to cut a space into the key to use a torsion wrench with it.

Download:
sc1.scad
sc1.stl
kw1.scad
kw1.stl

Related Posts

33 Responses to “Physical Keygen: Duplicating House Keys on a 3D Printer”


  • Wow! This is a really neat use of OpenSCAD. I’ll have to see if I can dig up an old lock and key to try it on this week.

  • I am very impressed. My only concern would be durability. This would probably be great if u lost a key i suppose, especially because u could make one then take it to be copied to a brass/zinc blank.

    I just don’t like the idea of sticking plastic into a lock cylinder, not when i’ve broken so many normal keys lol.
    great idea though!

    • With a plastic key you can make a mold…

      • Molds of keys have minor issues, we’ve tried at fablocker (an organization of 3d printer enthusiasts and lockpicks – this kind of thing is right up our alley!)

        I think our biggest issue was that we didn’t want to use high melting temperature metals – if you were doing something like lost wax casting it might work well… but RTV and field’s metal, don’t try it lol

  • http://www.oscar-diaz.net/?p=773

    A year ago now… the same project, but also re-designing the key.

    • Very cool. Though that appears to have been a design show of a concept (a very nice one), printed on a high-end 3d printer. This is a working key printed by a MakerBot, which is an impressive feat.

  • Hey Nirav, I recently made an iPhone application to copy keys by taking a photo. http://www.dittokey.com . We should probably talk :-)

  • While printing “pre-cut” keys is cool, being able to duplicate the blank+keyway is a nicer trick. Why? Copying common keys isn’t too hard with hand tools, and it only costs $2 or less at most hardware stores. But getting high security blanks can be a challenge and makes research+experimentation a little more challenging. An Easy Entrie key blank duplicator is nice but costs about $10k. Being able to print key blanks is pretty cool, thanks for posting your work. I have a decent collection of high security locks and keys, now if only I had time to make STL’s of them all..

  • So cool,

    you could 3D print them in stainless steel on http://www.shapeways.com
    or even silver, but that may fail in some expensive silver grinding action.

    Great work

    • There’s an undeniable “Ubergeek Cred” about printing a key at all, let alone from non-contact methods. And, in theory, one might stripmine old photos etc for keydata too.

      This is an excellent project to show what these fab ‘bots can do in making real world, almost daily use objects. My suggestion is to contemplate embedding Metal and Kevlar fiber elements in the printed key. Metal for pure torque transfer, Kevlar as “Graceful Failure Mode” enhancement. So even if a key breaks, the Kevlar “should” allow a clean removal of the failed bits. Too many of us fondly recall the money we made from “Color-Lite” aluminums :>

  • it only has to be strong enough to resist to metal guide on a key copying machind

  • How about trying this on abloy protec locks for a laugh? :P

  • Great project!
    I wish I had a 3D printer, but I can’t afford one right now.
    One little mistake you made: Anyone can print a key to your house and get in and rob you. You might have to replace your locks.

  • Over at the 3D Printing Village at the 2011 NYC Maker Faire, I built a random key with sc1.scad and we printed it out on a Makerbot Cupcake, then took the key over to Toool folks at the Lockpick Village. There, I found a training lock with one pin installed and (randomly) the printed key worked perfectly;

    http://yfrog.com/z/kk7exryj
    http://yfrog.com/z/mo1ufoj (my hand but not my card – it’s the head of our Hackerspace in Ohio)

    The members of the sport-lockpicking community I’ve shared this with are very excited about the prospects of printable keys. Thanks for some fun SCAD scripts!

  • If you add render() above the first difference() in both the bit() and sc1() modules, then you can render the key by just compiling it, as opposed to having to compile and render. (I only checked the sc1 scad file since that’s the type of key I have)

  • we’re waiting… where’s the stl’s for the kw1 and sc1 bump keys?
    curious – what 3d res (100 micron?) and material (PLA?)did you use?

  • Post writing is also a fun, if you know after that you can write or else it
    is difficult to write.

  • It is important to check the leakage of the old as it cans most important trouble with old cars in Ludhiana.
    Buying second hand cars or used cars is a good decision as it can save lots of your money which otherwise would have gone in buying a new car.
    Well, to buy new car or second hand car is very subjective decision for each individuals and its really
    depends on you and what is your opinion of the used car.

  • Thanks for any other informative website.
    The place else may just I get that kind of info written in such
    an ideal approach? I have a undertaking that I’m just now running on, and I’ve been at
    the glance out for such information.

    my webpage: Golf Star Cheats

  • Very good blog! Do you have any suggestions for aspiring writers?
    I’m planning to start my own blog soon but I’m a little lost on everything.
    Would you advise starting with a free platform like WordPress or
    go for a paid option? There are so many choices out there that I’m completely overwhelmed ..
    Any suggestions? Thanks a lot!

    my website; need for speed most wanted android hack money no root

  • hello there and thank you for your information – I have definitely
    picked up anything new from right here. I did however expertise a few technical issues using
    this web site, since I experienced to reload the web site many times previous to I could
    get it to load properly. I had been wondering if your hosting is OK?
    Not that I’m complaining, but slow loading instances times will
    sometimes affect your placement in google and could damage your quality score if advertising and marketing with Adwords.
    Anyway I’m adding this RSS to my e-mail and could look out for much more of your respective intriguing content.

    Make sure you update this again soon.

    my blog Simpsons Tapped Out Donut Cheats

  • You are so cool! I do not think I’ve truly read a single thing like that before.
    So great to discover someone with a few original thoughts on this subject matter.
    Really.. many thanks for starting this up. This website is one thing that
    is required on the web, someone with a little originality!

    Look at my weblog; despicable Me minion rush hack

  • The diet consisted of 25% of energy from protein and 45% of energy from low GI carbohydrates such as fruit and vegetables, grains and pulses.
    The job of acne skin care products to help normalize shedding
    into the pore to prevent blockages from occurring, killing the Propionibacterium acnes,
    and reducing inflammation. Toothpaste to Remove Hair Dye From Skin – Wet the
    dye stained area of skin with warm water.

  • It’s very effortless too find out any matter on web as compared to textbooks, as I found
    this paragraph at this site.

  • Then, a specially trained and licensed remediation expert
    will remove the mold infected portions of your home, or contents,
    and take them to a hazardous waste dump for disposal.
    The cooler surfaces of a crawlspace or basement act
    the same as the can. While many can live with small stains in the carpeting, and cover them with pieces of
    furniture, remember that any growth beneath or within the padding will be far more
    expensive the longer it spreads.

    Feel free to surf to my web-site – mold remediation San Jose

  • Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is fundamental and everything.
    But think about if you added some great photos or video clips
    to give your posts more, “pop”! Your content is excellent but with pics and video clips, this site could definitely be one of the very best
    in its field. Superb blog!

  • Folded size is bahia grosfillex 108cm x 18cm x 11cm.
    Tubular bahia grosfillex aluminum furniture is available in Black
    or Mocha Stone finish. Formaldehyde is found all over the metal from rusting
    and corrosion. I would guess, the screw something to bite into.
    Hanamint outdoor furniture is perfect for cushions, RV
    and yacht window covers, awnings and drain bags.
    This means someone is going to put up nice five position on the ocean, lake
    or patio than wooden bases.

  • I’m not sure why but this weblog is loading incredibly slow for me.

    Is anyone else having this issue or is it a problem on my
    end? I’ll check back later on and see if the problem still
    exists.

  • If you will get Master Resell rights, it is possible to offer
    the application, e-book or PDF file, now and again video series as well for the investment you decide on,
    or simply give it away to your subscribers. Internet marketing is less costly than printed ads, radio or TV.
    Keeping a record of how customers view your business, and reacting with it over time, may also be not enough.

    Review my homepage – best forex printable reading strategies bookmark (Trent)

Leave a Reply