the key to the code to the key
December 16, 2011 3:10 PM   Subscribe

How can I code a letter into the bit(s) of a skeleton key.

I want to code different letters into the bits of skeleton keys, so that the key not only opens a door, but also transmits information in itself (secretly). I don't need to transmit much information just a single letter (per key).

I'm having a hard time coming up with a good way of doing this. The first thing that comes to mind is to use morse code. So you would just alter the lengths of the bits. For example D and R (morse code _.. and ._. ) would look something like this.

My only problem with this is that I'm not completely in love with the way it looks (especially for some letters), and I feel like morse code is probably the obvious solution.

So can you think of an alternative way to code information into a key (not the head of the key)?

My ideal solution would:
- look uncomplicated
- would be based on an already established code. In other words, it would be simple enough to just come up with my OWN code for this situation, but I don't want to do that.
- wouldn't require any tools other than your eyes and knowledge of the code to decode (not rulers or anything like that).

Any ideas?

And this isn't theoretical, it's something I'm actually going to make so anything TOO intricate will probably be discarded.

Also if you have an elegant way of coding more than just a single letter into the key bits, I'd be happy to hear that too.

Thanks.

(Anonymous because it's part of something secret for someone special. Shhhhhh.)
posted by anonymous to Grab Bag (14 answers total) 3 users marked this as a favorite
 
It's a little unclear to me what you're after, which probably isn't the fault of your description, but you could try one of the bar-code standards, perhaps-- you could fit a letter or two in place of a tumbler or two. Or cut it into the non-toothy top of the key.
posted by Sunburnt at 3:22 PM on December 16, 2011


5-bit key, eg 00111 is 7 or G and 11010 is 26 or Z. Each 0 is 01 and each 1 is 10 so every key will have ten "digits" and a good mix of long and short ones. So, G would be 0101101010 and Z would be 1010011001.
posted by michaelh at 3:23 PM on December 16, 2011


How about morse code? The blade of the key could have on-off patterns ''''|||||' would be HOME, for example.
posted by 2bucksplus at 3:28 PM on December 16, 2011


I think I need more information about a skeleton key:
(1) Is there a set number of teeth? Your image shows three.
(2) Can the teeth be any length, or are there only "long teeth" and "short teeth"?

If you can have any number of teeth, and only allow two settings, then a binary encoding of letters is pretty well established (it would be the first I think of after morse encoding) - this is what michaelh describes.

If you can have more than two tooth lengths, you can cut down on the number of teeth by using a trinary encoding. I think you would only need three teeth, where "A" was represented by 2 short and 1 medium, and Z was represented by 3 long teeth.
posted by muddgirl at 3:35 PM on December 16, 2011 [1 favorite]


Ternary is another encoding I see a lot in puzzles. Three values 0-2 yield the numbers 0-26. Which have a clear mapping onto letters. That would allow each key to have only three teeth, of only three lengths.

Most regular house keys have 5 tumblers each of which can be 5 heights. If you just used two different heights that would also translate into binary just fine (0-31, only 1-26 are used).

Morse code is "fine" but it's better for some letters than for others. I'd use the tooth width instead of the length for morse, so it looks more like morse code.
posted by aubilenon at 3:45 PM on December 16, 2011


You could do this with a conventional key (like a Schlage or Kwikset or whatever). Pin-tumbler locks will have something like 5-10 pins. Each pin will usually (I think) have 10 possible heights. Now, 8 possible heights would exactly encode 3 bits. So that's kind of inconvenient. But a 6-pin lock would encode 19 bits, plus some change. I think. Someone should check my math

Anyhow, there's a really old character encoding called Rad-50 that lets you get 3 characters into 16 bits. You could come up with your own encoding scheme that's more compact, but you want something that already exists, I think that's one of the most compact.

So that let's you get 3 characters into a totally conventional housekey. You could go to a locksmith (or really, even Home Depot) and say "I want you to make a lock with the pins 0-1-9-8-4-5, and the key to fit" and they could do that. If you want to get into fancy double-sided keys, or locks with more pins, you could get a longer message on the key.
posted by adamrice at 3:46 PM on December 16, 2011


Also, I might steal this idea.
posted by aubilenon at 3:47 PM on December 16, 2011


Just a though: are you intending thsee keys to have a "correct" orientation? You've drawn them all teeth down and to the right, but keys are physical objects and any code that must be read left to right is susceptible to misinterpretion.
posted by daniel striped tiger at 3:50 PM on December 16, 2011


First of all a bit about the math here.

When you're trying to figure out how many letters can be encoded into something, you want to look at the amount of information contained in something. The formula is just -log(p) where p is the probability of something.

With keys, each key is equally 'likely' so to figure out p you just have to divide one by the number of possible keys. If the keys have 3 teeth and, let's say 3 different positions that gives us 33 = 27 possible combinations, enough for all the letters, and you can throw in a space as well, if you want. (in this case the information in each key would be about 4.7 bits of information)

The simplest way would be for you to just draw all 27 keys, and then assign them to letters using a table.

Another way to do it would be to use 'base three' where if you have 0-1-2 you convert that into a number by doing (0*9) + (1*3) + (2)

The reason I say 3 levels is that it sounds like you want the key to be able to be read by someone without putting it in a lock, so you can't have too many levels or people won't be able to tell them apart.

---

If you're worried about the appearance, what you can do is use keys with 4 or 5 teeth, and then pick the 'good looking' keys, and only map those to letters using a table.
posted by delmoi at 5:28 PM on December 16, 2011


(oh I should add, for the amount of information, you want log base 2 if you want the number of 'bits' of information)
posted by delmoi at 5:30 PM on December 16, 2011


Skelton Keys have multiple dimensions, not just up/down.

Which would allow you to easily encode something like Rad50 (previously mentioned) in the two dimensions. Perhaps a 5x5 grid with a cube signifying "z".

Though my preferred method would be to use a 3x3 grid and telephone ordering.
 
     ABC  DEF
GHI  JKL  MNO
PQRS TUV  WZYZ
You could then encode a grid something like this:
|Q Y  ||A B C||D E F|
|G H I||J K L||M N O|
|P R S||T U V||W X Z|
 

So that A might look like this:
          _ _
|     ||_|    |     |
|     |       |     |
|_ _ _|       |_ _ _|
And a Z might look like this:
|     ||     ||     |
|     ||     ||_ _  |
|_ _ _||_ _ _|    |_|
The two unused teeth give you lots more opportunity to encode extra information - you still have two full 3x3 grids to encode data in. For example numbers (full is zero).
|1 2 3|
|4 5 6|
|7 8 9|
The following are 5 9 3 0
                   _
|     ||     ||   |_ |     |
|  O  ||    _||     ||     |
|_ _ _||_ _|  |_ _ _||_ _ _|
Put all together, the Vampire Weekend song M79 may be encoded as:
|     ||     ||  _ _|
|_    ||    _||_|
  |_ _||_ _|   
That's:
|     ||     ||  _ _|
|_    ||    _||M|
 7|_ _||_ _|9  
The one with the single downward facing tooth is the letter, the rest are numbers.
posted by MesoFilter at 6:24 PM on December 16, 2011 [2 favorites]


(Also, a some terminology: "skeleton key" more correctly means a master key. The keys you're talking about — the old-fashioned kind with a round shaft and some specific metal shape to move past the wards of a lock — are called bit keys. A master key for locks that take bit keys has a skeletal appearance, hence the term skeleton key.)
posted by hattifattener at 7:29 PM on December 16, 2011


Building on what Delmoi said - that you're basically encoding 3x3x3 data - in my case a phone keypad, in his each letter of the alphabet sequentially, what you need to encode is basically:

What button on the phone would I have to push how many times to get this letter?

So you're encoding:

Which column.
Which row.
How many presses?

We'd use column first because you count across (1 2 3 across, not 1 4 7 down).

If we expand it out to 5 bits of depth then we can include all the letters (two keys have 4 letters) and numbers.

1 first letter
2 second letter
3 third letter
4 fourth letter (if there is one)
5 the number

I'm making the number last because that's how I remember texting, and a 5th level deep may be awkward for you, and you may not wish to include numbers.

J O H N 1 Zwould encode as:

J: 2 2 1
O: 3 2 3
H: 1 2 2
N: 3 2 2
Z: 3 4 4

and the keys would look like this (sideways since it's easier to make things left aligned & stick out to the right than top & stick out down, just imagine the key is in the left margin with the loop at the bottom & the teeth pointed in):

J
XX
XX
X

O
XXX
XX
XXX

H
X
XX
XX

N
XXX
XX
XX

Z
XXX
XXXX
XXXX
posted by MesoFilter at 10:33 PM on December 16, 2011


Edit: You'd only need the 5th bit in the case of 7 & 9 because those are the only times you'd press 5 times to loop back to the number.

To get * 0 # you'd just use the 4th bit for the 2nd tooth.

XX
XXXX
X

(zero)

Since many phones use 0 as space, it could also signify space, or empty. How cool is that, an empty key.
posted by MesoFilter at 10:38 PM on December 16, 2011


« Older Injured while working out with a personal trainer...   |   Which genes should I get sequenced? Newer »
This thread is closed to new comments.