21
$\begingroup$

Let's say you are creating secret instructions for a new, very dangerous weapon.

You have decided to encrypt the instructions. But you do not want anyone to guess that these notes are encrypted! So you want to make sure that it does not look like a coded message, but instead as a diary of a madman.

How do you create a secret notes that do not look like a cipher, but look like crazy writings? (Still able to be deciphered, however). What methods and techniques can you use?

$\endgroup$
20
  • 2
    $\begingroup$ I've removed your edit since it invalidated all your existing answers. Feel free to post that as a second more specific question though! $\endgroup$
    – Tim B
    Commented Apr 28, 2016 at 14:24
  • 4
    $\begingroup$ Sounds reminiscent of Full Metal Alchemist (from the wikia) "...though all of what Sheska has written down appears to be no more than a standard cookbook...many alchemists code their high-level alchemical documents so as to keep their information from falling into the wrong hands..." $\endgroup$
    – jtzero
    Commented Apr 28, 2016 at 20:52
  • 3
    $\begingroup$ As an IT-security expert, I find this question somewhat painful. One of the first thing learned about security is that security by obfuscation never works. $\endgroup$
    – mg30rg
    Commented Apr 29, 2016 at 12:13
  • 5
    $\begingroup$ Isn't it enough just to wrap it in an Ozzy album cover? $\endgroup$
    – hobbs
    Commented Apr 29, 2016 at 19:25
  • 5
    $\begingroup$ A COBOL manual meets the need with no changes. $\endgroup$ Commented Apr 30, 2016 at 13:37

18 Answers 18

34
$\begingroup$

Use 2 methods of encryption consecutively: garbage and code book.

For example, we have this data to begin with:

Insert the piston in the cylinder and lock it there by screwing.

Garbage

This means to include useless, rubbish data in between the real information. It would be impossible to tell real information from garbage data unless you know where the real information is present. Here we add 3 garbage words for each information word. Just make sure that the garbage data is added in such a manner that it makes readable sentences. We can make something like this:

Before you insert it, wait! The color of piston that is in or not. The really beautiful cylinder is magical. And the demonic lock is dangerous, it simply sits there and guards by a powerful screwing.

Code Book

This means, replace the most important words (mostly nouns and verbs) in the information by using a list of real and replaced words. The list containing the original and changed words is known as code book and you need to have it in order to decrypt the data. The code book we use here, can be something like this:

insert = seek

piston = demon

cylinder = chupacabra

lock (verb) = call

screw (verb) = chant

Now our data would look something like:

Before you seek it, wait! The color of demon that is in or not. The really beautiful chupacabra is magical. And the demonic call is dangerous, it simply sits there and guards by a powerful chanting.

Remember that you must keep the code book separate from the diary/instruction manual and if you lose this code book, you will lose any hope of decrypting the data.

Other Options

You can also choose to use MSC (which changes each letter of the information using a precise mathematical formula) and transposition cipher (which changes the arrangement of the letters/words in the information) but using these methods would immediately show the reader that they are dealing with encrypted data. That is why I have not included them in the example.

Decrypting

If you look at the final product of garbage and code book, you will think it is indeed the diary of a madman. In order to get the original data back, you must work from the end and gradually move backwards (use code book first and then remove the garbage data).

$\endgroup$
7
  • $\begingroup$ Good answer. I would add that since we are already relying on security by obscurity, we may use MORE of the same to hide encoding rules that are not static. There may be meaning in the font (larger for garbage added after encoding to improve grammar) or objects where one easily assumes another meaning (3 words crossed out twice, the number of curved lines in a scribble). Crucial point: to be taken at face value, the text must look the part. Insanity must suitably resemble sanity. For example, check the obvious message encoded in Jabberwocky... $\endgroup$
    – kaay
    Commented Apr 29, 2016 at 11:45
  • $\begingroup$ Yes. I agree that codebook should be applied first and garbage later. It would improve the "madman diary" effect on the reader. Also, this isn't completely relying on obscurity as the codebook adds a valid and reasonably high amount of strength to the securing process. $\endgroup$ Commented Apr 29, 2016 at 12:16
  • $\begingroup$ Yes. I meant the whole main idea of "pretending to be something else" is security by obscurity, no matter what other means are used. Also that the larger words, etc, can be used in addition to the "two per one" garbage from before, offering greater flexibility and throwing off attempts at analysis. $\endgroup$
    – kaay
    Commented Apr 29, 2016 at 12:49
  • 2
    $\begingroup$ "The really beautiful chupacabra is magical." That's truly what a madman would say :P. $\endgroup$
    – John Odom
    Commented Apr 29, 2016 at 18:51
  • 1
    $\begingroup$ Wouldn't he? ;) Also remember that And the demonic call is dangerous! :p @JohnOdom And yes, kaay, the theme of the approach on hiding data like this is indeed security by obscurity (y) $\endgroup$ Commented Apr 29, 2016 at 19:04
31
$\begingroup$

What you are asking about is called steganography.

https://en.wikipedia.org/wiki/Steganography

There are plenty of examples of how to do it, but the simplest way is to create your basic material. If that's your mad ranting then just rant away.

Once you've done that take your material to encode and go through inserting it into the ranting in a suitable fashion. Whether it's certain points or things highlighted in a certain way, or whatever.

$\endgroup$
4
  • 3
    $\begingroup$ Steganography is not necessarily encoded, it can just be so small as to be invisible. $\endgroup$
    – TechZen
    Commented Apr 28, 2016 at 23:12
  • 1
    $\begingroup$ @TechZen I think you mistake encoding with encryption. Encoding means only a way to store data in pre-defined manner. For example, our comments here are encoded in basic UTF-8. Any system like "make every 8.th word be a part of a manual" is an encoding. $\endgroup$
    – Mołot
    Commented Apr 29, 2016 at 22:24
  • $\begingroup$ Madmen are renowned for writing in multiple colours, crossing out, and underlinings. All excellent tools for simultaneously convincing and encoding. $\endgroup$
    – nigel222
    Commented Apr 30, 2016 at 10:10
  • $\begingroup$ Your answer is essentially the general case of Youstay Igo's answer. Furthermore, researching steganography will provide one with many more ideas, including many ideas that have been used successfully in real life. $\endgroup$
    – Kevin
    Commented May 1, 2016 at 1:51
15
$\begingroup$

This is actually been done many times in history. Most technical information handed down through the ages, such as alchemy, has been transmitted by various forms of allegory which make absolutely no sense to anyone who does not know the symbology used.

However, the best way to hide instructions is to hide it from everyone, even the one's carrying out the instructions, is to encode the instructions into some kind of ritual. For example, many technologies handed down from generation to generation come with a ritual, which makes sense because traditional technologies were created by trial and error and the artisans who manufacture the technology, have no idea how it actually works.

I have read that the complex rituals guide the creation of the steel for Japanese swords. The rituals contain elaborate chants, and there are different chants for different seasons, different temperatures and even different types of ore and charcoal. The chants are religious in nature, various prayers for this or that. But the content of the chants is utterly irrelevant, its the time the chants take matter.

Just a couple of days ago, I saw a video on medieval armor making in which the armorers used powerful chemicals, mercuric chloride IIRC and various acids. Timing is critical for the process and is the differences between status decoration and burning a whole through very expensive steel. It is believed that the armorers used a certain count of Hail Mary's to time the reaction times. (Modern researchers are not sure because in a time with no patents or other intellectual property protection, artisans kept their processes as secret as possible.)

Work songs have long been used to coordinate teams. "What do you do with a Drunken Sailor" regulates the rhythm of raising a sail, "Way, hey and up he rises," refrain repeated three times gets the sail pulled up. The verse "shave his throat with a rusty razor" lets the landsmen to move to another line.

A dance could be used to encode the operation of a device, especially if it used a visual interface like an Xbox Kinect.

In addition to timing, songs and poems are innate mnemonic devices. Individuals can remember them for decades and hand them down to subsequent generations little changed.

Used to be something of a trope in science fiction in which following some fall in civilization, the management of remaining technology becomes sacred and is managed by priest or monks who carry out operations as religious ritual. Kind of the same thing.

A religion group could watch for some sign, like the appearance of a an asteroid in a constellation, which would trigger a religious ritual which would activate a weapon to blow up the asteroid (I think that was a Star Trek episode.)

Alternatively, you could hide the information inside a taboo or the practices of low social castes. Kinda the cultural equivalent of hiding physical objects in latrines or septic tanks.

If you want a purely mechanical method, a hologram would work. When you break a holographic plate each fragment retains the the entire original hologram but at a progressively lower resolution and more shards of the hologram are created. You could scatter them around until some trigger event causes people to bring their shards together until enough of them were mated to produce a high enough resolution to reveal the instructions. (Gibson's "Fragments Of A Holographic Rose" is one of my favorite stories.) You can do something close by stacking polarized colored lenses, each with small defects which, when lined up in the proper sequence in the right light, projects a pattern that can contain arbitrary information.

All of these behaviors would seem nonsensical to both outsiders and those carrying of the operations. It would be program running on wetware that no one even knew existed.

(Actually, figuring out just how cultures encode all kinds of information in what superstitions and rituals has become something of a hobby of mine. I'm not sure we've stopped doing it even though we can write down detailed instructions theses days.)

$\endgroup$
1
  • 1
    $\begingroup$ The device you're trying to remember is the Kinect. Also, for great examples in fiction of technology and preventing the end of the world being passed down through religious rituals, look at The Fifth Element and The Last Witch Hunter. $\endgroup$
    – user14624
    Commented Apr 29, 2016 at 7:45
6
$\begingroup$

It depends upon how long the total instructions need to be, but a book cipher has always been my favorite way to encrypt messages.

Pick a book, any book and get copy. Open to a random page. Find the first word in your message on that page and count the number of words into the page that is.

May 23 'I t was sunny out today.'

Find the 23rd word on that page of the book.

May 23 9:00 AM 'I t was sunny out today.'

23rd line, 9th word.

Or maybe its all in the time

May 23 9:15 AM

9th line, 15th word.

At this level of encryption the decoder needs to know the exact book, exact edition, and exact page you are using.

Greater levels of Complexity

Each journal entry (code word) is in reference to the last one. So one mistake will ruin the rest of the message.

AM vs PM Am counts forwards, PM counts backwards

Days of the week. Each day of the week adds a number to either the line or word count (or both).

Example Monday

+1 to line Tuesday +2 to line

Monday Jan 4th (1st Monday of the year) +1 to word count Monday Jan 11th (2nd Monday of the year) +2 to word count

Number of capital letters within the journal entry is the base system your numbers are written in.

You can continue to hide more and more rules within each journal entry as well.

Use quotation marks in a journal entry, skip this one. Mention your mothers name, read the number in revers order. Mention your dogs name, skip this and the next three journal entries.

Edit

With this code, you can write whatever you want. To make your writing look like a mad mans is more of a literary question though. (Not world building) Avoid Pronouns? Write bad poetry about unrelated items. Watch a horror movie, and then take notes from the victims perspective describing whats going on. Copy recepies from cookbooks but replace all the ingredients with body parts or excretions.

$\endgroup$
0
6
$\begingroup$

I initially misread madman as madame, and thus arrived at a completely different idea :)

Why does it need to be a madman or crazy writing? Just take an old lady an fill the diary with lots of banal stories about her cats, gossip about her neighbours/friends/shopkeeper, repetitions about things she already told (maybe slightly different), detailed explanations of her (routine) live… and you can easily get the amount of noise needed to insert the appropriate steganograph message. Who would have thought that each time she mentioned she was encoding one bit of information of the nuclear launching code?

$\endgroup$
4
  • 1
    $\begingroup$ Your last sentence doesn't make sense. $\endgroup$
    – Pharap
    Commented Apr 29, 2016 at 6:31
  • $\begingroup$ @Pharap He accidentally a word. Only she knew, that each time she mentioned <bowls of petunias> she was encoding a bit of information. $\endgroup$
    – loa_in_
    Commented Apr 29, 2016 at 15:12
  • $\begingroup$ @loa_in_ I think that comment would have served better as an edit to the answer (hint hint). $\endgroup$
    – Pharap
    Commented Apr 29, 2016 at 16:18
  • $\begingroup$ And the weapon is hidden in the warehouse, yes? $\endgroup$
    – JDługosz
    Commented May 1, 2016 at 5:20
3
$\begingroup$

Even a mad man writing has some meaning on it, otherwise it would just be considered garbage... in general, the sentences are somehow logical, it's the whole text that doesn't make sense, because one isn't able to follow the reason on it.

So, to write something that looks like a mad man diary, I'd take a large source of data, like wikipedia or some books, and:

1 - extract sentences from it, at random.

2 - within each sentence, I'd look for verbs, nouns and adjectives, and chance with random verbs, nouns and adjectives.

And then, to include your instructions, I'd choose some rule (like the 4th word of every other sentence) and replace by yours manual.

Edited: as requested...

The manual: press the trigger to explode

1st step: some phrases from wikipedia:

Of all the sons, Joseph was preferred by his father, and this is represented by a "long coat of many colors" source

She quietly slid the bolt to lock the door behing him source

2nd: change some verbs and nouns:

Of all the dogs, Joseph was colored by his father, and this is painted by a "long coat of many colors"

She quietly ate the goat to lock the door behind him

3dr: insert the words following some rule. In my case, after every word that ends with "b, e, h, m, p, r, t, w"

Of all the press dogs, Joseph the was colored by his father trigger, and this is painted by a "long coat of to many colors". She explode quietly ate the goat to lock the door behind him.

$\endgroup$
1
  • $\begingroup$ It would be a lot more helpful for all readers if you include a complete example of this process with your answer :) $\endgroup$ Commented Apr 28, 2016 at 20:30
2
$\begingroup$

Language impersonation

Write your weapon's instructions in a different alphabet or set of characters like if it were written in another language, but matching the phonetics of what are you actually writing in your own language:

ゆ のう わだい みん

Check Hiragana if you know what I mean.

Rename/replace

Rename and replace nouns, actions and adjectives for something else, maybe something dark, epic and prophetic, write a novel with it. And remember: when the tides lower, the gods will scream.

When you push the blue button, the bomb will explode

$\endgroup$
2
$\begingroup$

Here are my ways that I would do it:

  1. Write a lot about nonsense/rambling of a madman but in between leave key words that still blend in with said nonsense/ramblings and use those words to be rearranged with a code sequence that only you know (eg. 3-5-6-4 (3rd letter of the first word, forth letter of the fifth word, etc)). Seeing you are the only one with the 4 digit code sequence it will be hard to find the words and also decrypt the actual message.

  2. Again use a code sequence, every first word of every third, fifth, sixth, forth sentence (assuming the sequence is 3-5-6-4), repeat sequence.

  3. 2 code sequences. Example: Word sequence: 2-4-5-6-3, sentence sequence: 3-5-6-4. 2nd word in the 3rd sentence. NOTE: if you want to get really into this get a 3rd sequence code for the letter in that word and again mask the words up so that they blend in with those of a rambling mad man.

$\endgroup$
1
$\begingroup$

There are a lot of ways to do this, you need to think about code, since that is basically what you are asking for. and there are many types of code, but if you were trying to make it look like a madman wrote it you would be best going with the old Lemony Snicket style of either

  1. misspelling words and making the letter that corrects it leads to a secret message (obviously you should scramble nonsense into it as well to make the message)

  2. you could also capitalize random letters a more easily detectable way to deliver a message but it still works for example "sHe Easily IS Borrowing hEr Horse IN a manner of Death and YOUr"

$\endgroup$
1
$\begingroup$

First letter of each word/sentence makes up the message. Or first/second word of each sentence. That way, you can encode any message, and at the same time you're free to write whatever crazy stuff you want your madman to spout. :)

$\endgroup$
1
$\begingroup$

Why not have several diaries/journals/books - you're mad after all... Then you can write one word/sentence of your instruction in each journal, before going back to the first journal after N words/sentences. Later, have each book in a different location - or give or maybe testament each to different people.

To arm the device, unlock the panel and enter the month followed by star.

First book:

To unlock enter by (...)

Second book:

Arm the the star. (...)

Third book:

The panel month (...)

Forth book:

Device, and followed (...)

$\endgroup$
1
$\begingroup$

Let me ask you this: if a friend of yours showed you an instruction book for a new very dangerous weapon, would you believe them, or would you think they were just making stuff up for fun? What if they weren't a friend? Might you assume they are a madman?

Supposing that you really are making a new very dangerous weapon. Wouldn't that make you a madman? Then wouldn't the instruction book be the diary of a madman?

It would seem the simple solution would be to do nothing special at all, but depend on other people to ignore it. Though I suppose if there are enemies who know the madman is working on a new very dangerous weapon, this wouldn't be very effective. So how about this:

Piet

Though it doesn't look like it, this is a set of instructions (submitted by boothby in https://codegolf.stackexchange.com/questions/2922/generate-a-random-program-in-your-favorite-language). In fact, there is even a compiler for this language, called Piet, that you can use to execute them.

Though I don't imagine the instructions for using a new very dangerous weapon could be easily converted to computer instructions, which mostly deal with arithmetic and logical operations, maybe your madman can make his own "instruction language" (we'll call it MADMAN) that looks like abstract art. He can hang it on the wall and proudly display it next to the new very dangerous weapon itself and nobody will think that it might be the instructions--let alone try to interpret them--unless they already know how to read MADMAN.

$\endgroup$
1
  • $\begingroup$ This is a data matrix and is nothing new. With the ubiquitous nature of QR codes, I think your average guy has a good chance of guessing that's a piece of data, and not just bad art. $\endgroup$
    – user458
    Commented Apr 30, 2016 at 0:40
1
$\begingroup$

Citation: https://en.m.wikipedia.org/wiki/Voynich_manuscript and the "see also" references at the end of that article.

As another better-understood example, alchemists commonly documented their work using analogies to astrology, reportedly because the latter was legal while the former was forbidden.

It might also be interesting to play with something based on a Markov chain derived from a natural language. I've coded toys similar to https://en.m.wikipedia.org/wiki/Dissociated_press several times;seems to me that applying som form of steganography on top of this could produce the document you are looking for.

$\endgroup$
0
$\begingroup$

If you know the person who will decipher it, you can replace each word by his following in a dictionnary.

A bit like fox-chan's solution, and a quite-well known one too, but long one, is to take the first letter of each word to make a message. If you write it well, it could mislead the reader.

In each case, if you want a specific person to decipher it, she will have to know the code...

$\endgroup$
0
$\begingroup$

Most of the answers have been using security by obscurity this is how to embed real encryption (if you want that)

There are several ways to encrypt a cypher text (a personal favorite is the solitaire cypher which can be computed by hand) https://www.schneier.com/cryptography/solitaire

Would could make the cypher key the first 3 or 4 worlds in that book then encrypt your plain text. Take the resulting cypher text and for each letter and make it the first letter of word in your madman's book. If you are willing to have some garbled words (and what madman's book is complete without them) you could instead have two or three cypher letters per rant word. By having the 1 and third and last letters all be cypher letters.

This system has the advantage that even if you figure out the book has information in it you can't crack it without breaking the encryption. To make it harder you can add a few secret words to the encryption key that you don't write in the book, so even if they figured out your entire scheme they would have to guess passwords / encryption keys.

The major disadvantage is this expands the size of your data. 1-2 cypher characters per word 3-5 written characters per word is a expansion by a factor of 2 - 5.

$\endgroup$
0
$\begingroup$

Does it need to be a book?

If not, how about a totally different approach: The words really are just garbage consistent with the rantings of a madman. What matters is the structure--your diary really is a Whitespace program that generates the instructions.

$\endgroup$
0
$\begingroup$

If it's written in cursive, this method will do:

  1. Convert the message with the Polybius square. (A=11, B=12, ... F=21, I/J=24, ... Z=25)
  2. Write out an unrelated message. For each digit in the Polybius encoded message, put that many letters in a continuous cursive stroke. After that many letters, lift the pencil before starting the next letter. If you need more letters than there are in the word, end the word on a downstroke to indicate that the count continues into the next word, and on an upstroke to indicate that the count ends on that letter.
$\endgroup$
0
$\begingroup$

You would have to be able to achieve the mind state of a mad man and be able to write these things down before you came back to reality. Which theoretically is possible..

$\endgroup$
2
  • $\begingroup$ ...and yet remain sane enough to purposefully encode the information in a retrievable way? Seems somewhat dubious. $\endgroup$ Commented Nov 4, 2019 at 16:52
  • $\begingroup$ If you can afford yourself the time and resources to do so. Its just written word which this day and age can be translated. The readers would just have to be able to tap into the same mind set at some point to see whats in front of them. $\endgroup$ Commented Nov 4, 2019 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .