Sending Encrypted Messages in Morse Code.

Started by gil, August 15, 2012, 10:54:01 AM

Previous topic - Next topic


In this article I will show you how to send an encrypted message that can not be broken. All you need is paper and pencil. With our privacy disappearing faster than the Mountain Gorilla, I thought that such knowledge might one day become more than a coffee shop conversation topic. I am referring to the One-Time-Pad described by Neal Stephenson in his novel, "Cryptonomicon." Highly recommended by the way. So, learn it and have fun with your kids. It's kind of like showing them how to start a fire without matches or lighter. It's fun, and who knows, they might have to use it some day..

By the way, this is one more reason to learn Morse code. You can't encrypt your voice, at least not without exotic hardware and software. After a natural or man-made disaster, our country could be a prime target for invasion. I know, extremely unlikely.. So thought many Europeans in 1939. Sending a coded message with a simple and small CW radio might one day be a life saver.

DO NOT send encrypted messages over the airwaves, it is illegal!

I have always been interested in encryption theory. Surprising, since I never liked puzzles or crosswords. Not to mention my poor math skills. For some reason I have always been driven to learn obscure, odd or outdated skills. Even though I am a programmer by trade, the level of complexity in encryption software is way over my head. I've had a PGP key for about fifteen years, but to my dismay, nobody ever sends encrypted messages but for the occasional server password; and that may have been two or three emails in ten years. Had I not insisted on it, I would have received none. You would think this feature would be built in every email program, but it isn't. You must add a plugin to your mail client, if one is even available. I know Evolution on Ubuntu has it built in, and Pegasus Mail on Windows has a plugin, my Mac does too. But computer encryption is not the subject today.

Let's see how it is done. It is pretty easy:

You need a way to produce random letters. These random letters will be the key used to code and decode the message. Do not rely on yourself or a computer to produce true randomness. Typing random keys on your keyboard doesn't work, it won't be truly random. Good for practice, but not for real messages. I would suggest putting letters from a Scrabble game in a bag and shake it vigorously. Pick one letter (without looking!), write it down. Put it back, repeat. Write down your pad in groups of five letters, like so:


You need as many letters as your intended message. Here is a one-time-pad generator, for practice (set group length and key length to 5).


Now, let's say your message is HELLO. Our first key group is GEXOJ.

HELLO is the message.
GEXOJ is the key, called a one-time-pad because it can be used for only one message.

We are going to count to the position of the letter H, but starting at zero, not one.
0 1 2 3 4 5 6 7........ Etc...

Here is the whole alphabet to help you:


Our first key letter is G, and G = 6.
Add the two: 7+6=13 = N.
We keep going: E=4 + E=4 = 8 which gives I.
L=11 + X=23 = 34 ! Ha, problem! The alphabet has only 26 letters.
No problem, when we hit 26, we go back to A. 27=B, 28=C, etc. So, 34=I.
L=11 + O=14 = 25 = Z.
O=14 + J=9 = 23 = X.

Here is another way to look at it:


Our secret message is NIIZX.

Now, let's decode it:
We do the same thing in reverse...
(If a number is negative then add 26 to make the number positive.)

Minus (key)6423149

The encrypted message is as random as the key is. Therefore, as far as I know, there is no code breaking method available that could possibly crack it. Your message is of course only as safe as the key. If the key is truly random, has not been seen by anyone except you and the recipient and was used only once then destroyed, then your message is safe!



Cryptography is one of the most interesting subject in mathematics and logic.  When it comes to Amateur Radio, where you rightly point out that we cannot use cryptography or cyphers of any kind, I am reminded of one of my favorite TV series, In Plain Sight.  The "Where's Waldo" approach to Amateur Radio communications can be quite useful.  Tactical communications are some of the most difficult to "Waldo-ize" but a little thought and a cool delivery can pull it off.  You don't have to say, "There is a dead guy in a burned out car in front of the sewer plant!" on local repeater but you can direct the right person to that location with something like "You are needed at 2929 West Lake Ave, please expedite." 

When it comes to digital communication, Amateur Radio can Waldo-ize much more thoroughly.  This is my preferred list from least Waldo-ish to the most Waldo-ish.

1) VHF Packet (Not commonly intercepted, but easy to do so)
2) Sound card modes: PSK31, Olivia, Thor, MT63, etc.  (Easy to intercept, but what casual listener has the equipment?)
3) CW (Who'd bother with so much easier pickings on the local FM repeater?)
4) Pactor III  (Expensive and difficult to intercept.)
5) Winlink / Winmor (Very difficult to intercept-- especially peer-to-peer mode.)


Keith, K7KEV


I'll +1 K7KEV, and add D-star / All-star.  Especially D-star, because come on.  NOBODY has that gear.

Security through obscurity, eh??

Jonas Parker

Formulab has a nice  little and free program for generating One-Time Code Pads... Great fun for the kids on a rainy day!  8)


K7KEV  I like "hidden in plain sight"  CW  :)

Nice well thought out post above.  73


QuoteK7KEV  I like "hidden in plain sight"  CW

Yep, Morse code , I'm for it 100%. Taking a CWOps class right now to up my speed.. I think I'm at about 15wpm, starting to head-copy. I like the privacy Morse code affords, be it on the radio, with a flashlight, or poking someone's arm! Few people who are not Hams, ex military, or merchant marine (from a while back) can decode it or know to download Fldigi and let their computer do it. And there is of course the one-time-pad. Actually, since I am waiting for my first arduino board, I am thinking a true random number generator would be a good starting project to learn the programming interface! I could just use wind input... Send the result directly to a printer maybe.. But that's a bit more involved.. Will I ever use a one-time-pad? I doubt it.. Just like many other archaic skills I've picked up in my life. Morse code however I know will always be useful!



Hey -

I think I saw this in an old movie once.

Pencil , single sheet of paper on a glass table top (no impressions to read) and your one-time-pad.  Write your tableau from memory - it provides no security anyway.  Generate your message, burn the pad used for the message and the portion of your paper with WITH the cleartext plus pad on it and 'wash' it's ashes between your hands under the tap until it leaves as dark water - not chunks.  The unseen fine screen the VB snitch "maid" checks in your plumbing when you're at work will catch chunks of cypher material and convict you, assuming you're under suspicion and everyone is under suspicion.  You didn't forget, and leave your remaining collection of 'pads' out for the 'maid' to see - did you?

Now - all that you have is a cipher message that even YOU are not now able to decipher.  "Rubber-Hose Cryptanalysis" will not work in this case because it is impossible to remember 50 groups of random letters/numbers, there is no known mathematical attack either. Because this message is time sensitive, you cannot use one of the dead drops, so it must go by radio. That is why the only remaining key is at your Mother station, safely across the border.

Go to today's transmission location, load your message twice into the burster, destroy the paper message original, then transmit it as an incredibly SHORT "burst" by protocol. PS. If you're working for the East during this long gone era, you'll need 35mm film, old style cellulose is best - Komrade!

Let your team take care of hiding the hardware for it's next use - you won't be back.  Follow your protocol for hiding the set in a way & place not easily connected with you. You'll have other sets that you rotate through also. One is none & Two is ONE, they told you. Each transmission is, seemingly random and is indeed from from a different site. Exit the area looking like everyone else on the street, this is much more difficult if you work for cheap-skates who sent you in alone and you've been digging a hide for the radio - wearing normal clothes.

Later that night and during the week, listen for your call-up on the blind transmission broadcast you receive with the common, 'People's Radio' allowed in your target country - no special equipment to make you look suspicious.  Use headphones, so the audio is not heard... You don't want to disturb the neighbors; good manners, and all, but you still want confirmation that Mother received and understood your message and what to do next. Eh, wot?

That was old school.  I am certain that there's no use for it today, what, with microprocessors in everything, all interconnected across the globe making everything so much easier - right?  No use at all. Then again, there can be no back door subroutine to contaminate everything that came in contact with your pencil. . .

de RadioRay ..._ ._

"When we cannot do the good we would, we must be ready to do the good we can."  ~ Matthew Henry


You are slightly twisted, Ray, but I luv ya.


Thanks ArchAngel - Too many years with my headphones screwed on too tight.

Thanks for being part of the walk down the sanitized part of memory lane. That other part we can talk about when we meet on the other side.

>de RadioRay ..._ ._
"When we cannot do the good we would, we must be ready to do the good we can."  ~ Matthew Henry


Slightly simpler would be to use a number-based key instead of a letter-based key.  In the example, instead of taking GEXOJ and converting it to numbers each time you want to encode/decode, just use 6-4-23-14-9 as the key.

Also, you could just repeat the key for longer messages.  So the key for "hello world" would be 6-4-23-14-9-6-4-23-14-9.  Sure, if it is used enough, that increases the possibility of decryption, but it certainly won't be easy.

Other things you could do would be to have words in the open that give an indication of the key used.  For example, "day of infamy" could be put out in the open and whoever is receiving would have to know that is Pearl Harbor Day (Dec 7, 1941) and how to format the date (i.e. 12-7-19-41, 19-41-12-7, or 1-2-7-1-9-4-1, etc.) to be used for decryption.  That makes decryption easier for someone to figure out, but still not easy and if you use a non-"normal" date/whatever (i.e. day your dog died), it makes it even tougher.  But part of the point of this is to be able to change keys easily on the fly as long as the basic rules are set up in advance.

Isn't encryption fun!


I don't think that Ray is so "out there" - or maybe that says something about me instead. :o

Couple thoughts:
Gil: when you get ready to do your randomizing, just remember your chip isn't random enough, and one of the best seeds around to toss in the cooking pot is atmospheric noise.

The OTP software from fourmilelab is a very good one; in fact it is more work setting up how one wants their individual sets cranked out on paper (so many rows, by so many sets on an 8.5x11 sheet most can use).  But good stuff.  There is one other use often forgotten for OTPs. You can draft a good old-fashioned LETTER to someone and it is no less secure than the same transmission over the air. It can even be delivered by a 3rd party with confidence since they are literally only the transmission medium and have complete deniability.*

5-letter groups?  Me?  Naw, it must be just some practice text I downloaded off the internet from TM 11-459.

* we had a very good "mail slipping" (out of the envelope for copy) operation against the Abwehr operating out of Bermuda during WW-II.  No reason to think that talent doesn't exist still either.


Quote from: RadioRay on September 10, 2013, 03:30:53 AM
Thanks ArchAngel - Too many years with my headphones screwed on too tight.

Uh, Ray...

Did the medics onboard the alien spacecraft really get you to believing that those were headphones?




QuoteGil: when you get ready to do your randomizing, just remember your chip isn't random enough, and one of the best seeds around to toss in the cooking pot is atmospheric noise.

The randomizing would not be done by software. I'd use wind gusts as in input..



There is an interesting crypto web page at
He has a lot of information on older systems there.  He also has a software numeric one time pad key generator called "Numbers".  He goes into some detail on how it works and steps he took trying to maximize randomness.  The nice thing about this one is it is stand-alone, so can be run off-line and the results never see the Internet.  It is Windows, but he says it runs under WINE.
I have played with the Numbers generator and it is pretty nice.


Edited to correct Numbers link - apparently today is going to be a copy/paste challenged day.


Another nice thing about morse is all the abreviations we use adds another layer of confusion for the cryptographers.