04 October 2007

The Code of Siram

When my sister and I were children, we made a secret code that was totally uncrackable to people who didn't know what it was - but at the same time was ridiculously easy to read without a cipher key for people who did. First, we started with the letters of the English alphabet:



Notice that some of the letters are crossed out. In my infinite youthful wisdom, I had decided that those are redundant and therefore aren't needed. C can be represented with either K or S, Q is just KW, X is just KS, and as for Z, well, it sounds close enough to S and nobody ever uses it anyway. (Grownupy retrospective wisdom has had more to say about that since then....)

Then, we looked at each letter and asked ourselves, "What does it look like?" For example, A sort of looks like a tepee, E looks like a comb, F like a flag, G like someone sitting at a desk, H is a ladder, etc. We drew those out and tweaked them for a while, until we had:



which became the code base. Because it resembles the actual alphabet, it's remarkably easy to read - which does not make for a very good super secret code. Therefore, we decided that there should be multiple ways to write each letter.



Above is the code in full. When writing in it, we just chose the letter variations at random. It works out well because E is the most common letter of the alphabet and coincidentally also has the most variations. We did discover that Z actually is a necessary letter, and so is C because it's part of CH. In practice, we just substituted SH for every CH and got by well enough for our own purposes.

Our purposes, of course, was to annoy a mutual friend by passing notes to each other in standard teenage "ha ha! you can't read this!" fashion. In reality most of the notes just talked about ordinary things like where we should go for lunch (aka "lunsh"). The friend spent years trying to decipher it and never succeeded.

Later on I went back and added some more symbols for SH, CH, and TH.



The latter two are stolen from the Mandarin Chinese teaching alphabet. (Ever wonder how Chinese schoolchildren learn to read and write all those thousands of characters? Well, there's a cheat code...) By the time I put those in, though, we'd all grown up and moved on to other entertaining pursuits with our lives, and they were never used.

In summary, the code works on two basic secrets:

8 comments:

Megadeus said...

Blogger doesn't allow for images in comments, so...

MWT said...

No fair. :p I provided a key to mine.

Anonymous said...

We had a secret language that simply was made by switching the letters with each other.
Thing is I can still remember how.

My name was Jahhim.
V = J
A = I ( so I = A)
H = K (h was pronounced sh)
M = N
C and K were the same when pronounced K and so on.

It was rather easy to speak when you had learnt how to switch the letter in your head as you spoke.

/ Gitäphib :P
Gee I still remember it.

Megadeus said...

Okay, I wasn't sure if you watched any of the TV shows I do.

I'll give you a hint:

"Matt Groening"

Jim Wright said...

The technical term for you code is a "sliding substitution cipher", because more than one symbol can represent the same letter. Rebelcat's secret language is a "simple substitution cipher," because the substitutions remain fixed. Automatic, complex, sliding ciphers were exactly what machines like the German Enigma did.

Ciphers are where each letter is directly represented by another letter or symbol. Codes, on the other hand, are where a symbol or word represents an action, i.e. "Red Peacock Chair" = Assemble the Fleet at pre-defined point AA." Codes were designed for use on non-secure communications channels and were common up until around the 1940's in the military. Codes are still used somewhat in international business communications via non-secure channels such as Western Union international telegraphic signals, the occasional diplomatic code, and some limited military tactical applications.

Ciphers, especially automatic encryption systems, are much more common nowadays, and can be much more difficult to break.

I used to be a Navy Cryptologist, can you tell?

MWT said...

Ya don't say! I would never have guessed. :)

So how difficult would you say mine would be to break in grownupy terms? Should my inner child's heart be breaking now?

Jim Wright said...

Well, sorry to say, modern crypto analysis tools probably wouldn't take more than a couple of minutes to break your cipher - depending on the length of the message.

There are ways to make decrypt more difficult though. For example, keep each message very short - one sentence, no more. Include a substitution symbol for spaces, so that word breaks are not easily identifiable. After encryption, arrange the resulting letter/symbol stream into standardized groups of 4 or 5, arranged in a table. Generate a new cypher for each message - called a "one pad cypher." Never use the same cypher twice, never encrypt the same exact message using two different cyphers if you have to resend, or send to multiple parties. For extra security use "double encryption," i.e. encrypt your original message using cypher 1, then encrypt that using cypher 2.

Still, if you're doing it by hand or using standard techniques available to the average civilian, professional military cryptologists wouldn't have much trouble figuring it out - it's just a matter of time.

MWT said...

Hmm. My inner child has run off to sob in a corner somewhere. :|

I guess if I ever need to use a code or cipher for something again, I'll hope not to cross paths with professional military cryptologists.