Steganography is the practice of concealing secret messages within ordinary files such as images, text, or audio, hiding information in plain sight rather than encrypting it into unreadable cipher text. Unlike cryptography, which transforms data into a coded format, steganography embeds data invisibly so that the existence of the message itself goes undetected.
Steganography
When we encrypt data, we conceal data inside some sort of coded message. Steganography is something very similar, but it's kind of hiding it in plain sight.
So let's compare cryptography to steganography. With cryptography we're taking a message — in this case we're going to use the plaintext "secret" — and we're going to create a ciphertext out of it. It's the ciphertext because we encrypted it, and now this is the coded message, so we call it the ciphertext. This is the encrypted data, and with a good encryption, the only way that we could decrypt it is if we knew what the key was, and then we could decrypt that message.
With steganography, what we do is we embed this message, "secret", into maybe something else. In this case it's a paragraph right here. So we have a paragraph, and there is the word "secret" that's been embedded in there. If you want to take a look, you can analyze that and see if you can figure out what the code is of how I embedded "secret" into this message right here.
Here's the answer: it's the first letter of every second word. So we take a look — here's the second word, and the first letter is S. Then we go two more words right here, so then it's E, and then two more and then C, and then two more and then it's R, and then two more and it's E, and then two more and it's T. So that's the embedded secret that's inside of this paragraph right here.
The thing is that we could put this inside of anything. We could put it inside of a picture, we could put it inside of a text file, we can put it inside a video, we could put it inside of an audio file.
Let's take a look at how pictures work and how we could embed a secret message into a picture. Pictures, from a computer standpoint, are just ones and zeros. So here we have a picture of Mario, and Mario is made up of these individual pixels. Each one of those pixels has a certain amount of red, a certain amount of green, and a certain amount of blue. We measure how much red, how much green and how much blue by having some sort of numerical value that's expressed in binary numbers, and in this case we have eight bits for how much red, eight bits for how much green, and eight bits for how much blue. So we can see that right here: how much red, how much green, how much blue.
What can happen here is we can change one of these bits to embed information into it. We could alter one of the bits. So if we altered one of these bits — let's say we wanted to alter the bit all the way to the left of red, to change this from a zero to a one — that would actually have a drastic change in this color right here. So we wouldn't want to do that, because the picture would turn out really funny and somebody would catch on that we've embedded or changed that picture.
But what we could do is use the last bit in each one of these. So use the last bit here, and by changing the last bit, so if this one became a zero, it would have virtually no impact visually. We couldn't see what the difference is visually from this color perspective right here, and so because of that we could change this bit without anybody knowing.
So from a computer standpoint, here's a picture with just a bunch of ones and zeros. But what we've done is we've taken this — this is how much red there is, how much green there is, and how much blue there is for that first pixel — and what we've done is we've changed the last bit to embed our secret code. If you take these bits out, now we would get a one one Z. So we just chain all of these bits together in a sequence, and now there's our ones and zeros with our embedded secret message in it, and it can be incorporated into this picture with no one ever knowing that it's incorporated into that picture.
Now let's take a look at cryptography versus steganography and some of the pros and cons to it. When it comes to steganography, this is a picture, and it could be just a picture of anything, and so it would be really hard for somebody to even understand there's a message embedded in it. So that is an advantage to it, that somebody would overlook that picture. Versus if they saw this right here, they could think, oh, it's been encrypted, I'm going to start working on decrypting it.
However, really the strength for the most part relies on the cryptography side of this: if you're using the right algorithm, however you encrypted it, whatever key you use to encrypt it, you really need that same key to decrypt it, and it's really hard to reverse engineer a really good algorithm used to encrypt some sort of message. Versus steganography — if you're using that and that alone, once somebody knows that there's an embedded message in there, then they can start going about trying to decipher what that embedded message is.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →