If you’re planning on taking the Security+ exam, you should have a basic understanding of general cryptography concepts such as data encryption. Given a scenario, you should understand the appropriate control to meet security goals.
For example, can you answer this question?
Q. Lisa hid several plaintext documents within an image file. Which security goal is she pursuing?
A. Encryption
B. Integrity
C. Steganography
D. Confidentiality
More, do you know why the correct answer is correct and the incorrect answers are incorrect? The answer and explanation is available at the end of this post.
Steganography
Steganography hides data inside other data, or, as some people have said, it hides data in plain sight. The goal is to hide the data in such a way that no one suspects there is a hidden message. It doesn’t actually encrypt the data, so it can’t be classified as either symmetric or asymmetric. However, it can effectively hide information, so it is included with encryption topics.
Imagine if a terrorist in one country wanted to communicate with terrorist cells in another country. They could use steganography by posting graphics to a web page. For example, the web page may include a Graphics Interchange Format (GIF) or Joint Photographic Experts Group (JPEG) picture of a tree. When they want to send a message, they modify the graphic to include the message and post the modified graphic to the site. This looks like the same tree. However, if their contacts know to look for a message, they can download the graphics file and retrieve the message.
Some common examples of steganography are:
- Hide data by manipulating bits. It’s possible to manipulate some bits within an image or sound file to embed a message. One method of embedding data in large files is modifying the least significant bit in some bytes. By modifying the least significant bit in some of the individual bytes of a JPEG file, it embeds a message, but the changes are so small that they are difficult to detect. However, if people know the file includes a message, they can easily retrieve it.
- Hide data in the white space of a file. Many files have unused space (called white space) at the end of file clusters. Imagine a small 6 KB file stored in two 4 KB clusters. It has an extra 2 KB of unused space and it’s possible to fill this white space with a message. For example, you can embed a message into the white space of a GIF or JPEG file without altering the file size.
Security professionals use steganalysis techniques to detect steganography, and the most common method is with hashing. If a single bit of a file is modified, the hashing algorithm creates a different hash. By regularly taking the hashes of different files and comparing them with previous hashes, it’s easy to detect when a file has been modified.
If you want to see how to embed a text file in an image file, check out the Steganography Lab mentioned in Chapter 1 of the CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide at http://gcgapremium.com/labs/.
Remember this
Steganography hides messages or other data within a file. For example, you can hide messages within the white space of a JPEG or GIF file. Security professionals use hashing to detect changes in files that may indicate the use of steganography.
Quantum Cryptography
Quantum cryptography is based on quantum physics and photons, the smallest measure of light. Some applications use quantum cryptography to transmit an encryption key as a series of photons.
Normally, a photon spins and emits light in all directions, similar to how a light bulb emits light in all directions. In quantum cryptography, photons are modified so that they spin and emit light in a single direction, such as up and down or side to side. It’s then possible to assign a value for the direction.
For example, if the photon emits light up and down, it’s a 1. If it emits light side to side, it’s a 0. It’s then possible to convert a stream of photons into an encryption key. Two parties exchange photon streams identifying and validating the key.
There’s much more involved in this photon conversation, but I’m going to skip the quantum physics. However, there is one more important element. When a photon is read or measured, it changes direction. If a third party reads any of the photons in the stream, it will be obvious to the two parties trying to exchange the key. When the two parties realize someone is eavesdropping, they won’t exchange secure data until the third party is removed.
Q. Lisa hid several plaintext documents within an image file. Which security goal is she pursuing?
A. Encryption
B. Integrity
C. Steganography
D. Confidentiality
Answer is D. Hiding files in another file is one way to achieve the security goal of confidentiality. In this scenario, Lisa is using steganography as the method by hiding files within a file.
Encryption is the best way to achieve confidentiality, but simply hiding files within a file doesn’t encrypt the data.
Hashing methods and digital signatures provide integrity.