DEV Community

Adam Roynon
Adam Roynon

Posted on

What is Steganography?

Steganography is the process of hiding a message, file, video, or picture within another message, file, video or picture. The key of steganography is that the medium that is used to hide the secret message, such as the image you use to conceal your message, looks completely normal to the untrained eye. This is the main difference between steganography and standard encryption. Any encrypted message looks as though something is hidden or concealed within the encrypted value whereas a message hidden within a seemingly normal picture is a lot harder to spot.

Digital Techniques

Steganography can obviously be used to hide digital information within other digital items. For example, hiding a message within a digital photo or within a video file. There are different techniques that can be used to hide the secret message or information, each with there own pros, cons, and level of difficulty and complexity.

Least Significant Bit (LSB)

The Least Significant Bit steganography technique is the process of manipulating the bits of a digital file to hide a secret message or another file. This is often done with images but can be applied to any digital file. All files are made up of bytes which are in turn made up of 8 bits (one bit is either a 0 or a 1). The LSB technique involves taking the last bit of each byte and changing it to encode a message or file. You translate your message or file into bits and then use the LSB (the last bit, or two last bits, of each byte) of your disguised file to hide your message's or file's bits. For example, if the first three bits of your hidden message are 010 then you could change the first three LSB's of your disguised file to 010 to hide your message.

The reason why LSB is used within steganography is that when changing one bit, especially the bit with the lowest value (the least significant bit) it does not change the disguised file a lot. If you applied this process to a photo, of hiding a message within an image, the appearance of the image would not change a lot, it may become more grainy but it shouldn't look suspicious. This is because you are not changing the value of each byte by a lot.

11010010 = 210
11010011 = 211

Often times a hidden message within an image will either be repeated across the entire image or hidden within a specific section of the image.

If you don't understand how binary works or want to learn more about the process of converting decimal numbers to binary and vice versa then please check out this post - Bits, Bytes, and Binary

Spectrogram

A spectrogram is a way to visualise sound. Spectrograms are essentially graphs of sounds that have an X and a Y-axis which correspond to time and pitch respectively. You can convert any sound or song into a spectrogram and vice versa. Therefore you could create a spectrogram with a message by just drawing/writing your message across the graph. This graph could then be converted into sound, therefore, resulting in your message being hidden within a sound file. Reversing the process would then result in your message being the outcome/result. you could also do the same thing but use an image instead of a message, so you draw an image in the spectrogram graph and then convert that into audio. You might be thinking that a piece of music created from a written out word wouldn't sound very good and that the point of steganography is to hide the message in plain sight. You would be absolutely correct, which is why the 'secret' part of the music is often surrounded by other music that sounds normal or at least doesn't have secret messages. Therefore you have a long piece of music with only a couple of seconds that contain a secret message or image. There are rumors that famous musicians and bands have used spectrogram techniques to hide images and messages within their own songs.

RGB Channels

All digital images are made up of a collection of pixels, each of which is made up of three colour components (red, green, and blue). Every colour is then created by mixing the intensities of these three colours together. For example, mixing red and blue together creates purple. Each one of the three main primary colours, red, green, and blue, are called colour channels. One way to hide a message or image inside another image is to hide it within one of these colour channels. The secret is then revealed by taking the original image and removing the colour channel sections. This would return a single coloured image (either red, green or blue) for each channel. One or more of these single-channel images will contain your secret information, you can hide a different secret message in each of the three channels. When combining all these channels together the resulting image will make no sense and you won't necessarily be able to see the hidden message(s).

Physical Steganography

Steganography does not have to happen with just digital content though. You can apply different approaches to physical mediums to hide messages and information in other-wise inconspicuous items. Think of one of those books that is actually a safe or money box, it looks like a book when it is in a bookshelf but it actually hides your money.

Invisible Ink

The most obvious way to hide messages that most people have seen or used before is invisible ink. You could write a normal-looking letter using a normal pen and then use an invisible ink pen to hide a message within the letter. A normal person would not be able to see the secret message and it would look like a normal letter, but by revealing the invisible ink you could see the hidden message. Invisible ink is resolved either by using a special solution, heat, lemon juice, etc. Invisible ink is probably the easiest and most well-known method of steganography using a physical medium.

Null Cipher

Another very well known traditional steganography method is called a null cipher. A null cipher is a method used to hide a message within a lot of other non-cipher material or text. You could write a big paragraph of text and then hide your secret message in that text. There are many methods to achieve this, you could make every 5th word of the paragraph be a word of your secrete message or to have unusually capitalised letters, or missing letters, etc. Null ciphers are often used within movies and TV series to hide secret messages as they're simple for the viewer to understand without needing much explanation. There have also been stories of null ciphers being used for prisoners to communicate with people outside prison using letters/messages.

Microdots

During World War I and II there was a steganographic approach used by Germany to send hidden messages called microdots. Microdots is the process of taking the secret message and turning each part into different shapes or different sized shapes. Those shapes are then written very small onto the non-suspicious letter. During the war, this process was used to conceal messages into microdots and then hiding them underneath the postage stamps of sent letters. The actual letter wouldn't contain any important information but the microdot message could contain important information such as enemy movements or military plans and updates. This was not the only method used during the war to conceal messages though.

Steganographia

The first recorded use of steganographic techniques was in 1499 by Johannes Trithemius. He was german polymath, cryptographer and much more. He wrote a book called Steganographia in 1499. This book consists of 3 volumes each of which contains different steganographic methods and many hidden messages. The books were designed to look like they were about magic and about how to use spirits to communicate over long distances, which is the medium Johannes used to conceal his messages. He used various techniques in his books to conceal his messages such as null ciphers, hiding messages within data tables, astrological data, etc. The third book is believed to contain hidden communication with Queen Elizabeth I.

That is all I'm going to write about Steganography. I didn't want to write too much as I may want to take each section I've covered and go into more depth in a different post. However, I hope I've given you enough to understand the basics of Steganography its uses and methods, as well as given you some ideas to look into and learn more about it.

This post was originally publish on https://acroynon.com

Top comments (0)