CIT-2640  ›  Module 2  ›  Cryptography Concepts Lab
Live Score: 0 / 35
CIT-2640 :: Network Security

> Module 2 Lab: Cryptography Concepts

Steganography with steghide & md5sum, plus classical cryptography with the Vigenère cipher
Points: 35
Objectives: 3
Mode: Offline / Self-Paced
Environment: Kali / Linux Terminal Required

i Lab Overview

In this lab you will work with two very different branches of cryptography and information hiding:

Steganography conceals the existence of a message by embedding it inside another file, such as an image. Unlike encryption, which scrambles data so it cannot be read, steganography hides data so an observer does not even know it is there. You will use steghide, a command-line steganography tool, to embed and extract a hidden text message inside a JPEG image, and use md5sum to prove that hiding data inside the file changes its cryptographic hash — even though the image may look identical to the human eye.

Classical substitution cryptography scrambles the message itself. You will hand-encrypt your own first name using the Vigenère cipher, a polyalphabetic substitution cipher, using the tabula recta (Vigenère square) and the secret key SCCCYBER.

You need access to a Linux terminal with steghide installed (sudo apt install steghide) and a JPEG image to complete Objectives 1 & 2. Perform those steps in your VM/terminal, then record your commands and results below.

1 Hide a Message with steghide & Compare Hashes

Background

steghide embeds data inside the least-significant bits of an image or audio file's pixel/sample data. The change is imperceptible visually, but it alters the underlying bytes of the file — which means the file's cryptographic hash (a fixed-length fingerprint) will change even though nothing looks different.

Steps to Perform in Your Terminal

md5sum carrier.jpg

Record this as your "before" hash, then embed a short secret message into the image:

steghide embed -cf carrier.jpg -ef secret.txt

You will be prompted for a passphrase — remember it, you'll need it for Objective 2. Now hash the file again:

md5sum carrier.jpg

Record this as your "after" hash.

Objective 1 Score: 0 / 10

2 Extract the Hidden Message

Steps to Perform in Your Terminal

Using the same carrier image and the passphrase you set in Objective 1, extract the hidden data:

steghide extract -sf carrier.jpg

This writes the recovered file (e.g. secret.txt) to your working directory. Open it and confirm it matches what you embedded.

Objective 2 Score: 0 / 10

3 Vigenère Cipher — Encrypt Your First Name

Background: What Is a Vigenère Cipher?

The Vigenère cipher is a polyalphabetic substitution cipher — unlike a Caesar cipher, which shifts every letter of a message by the same fixed amount, the Vigenère cipher shifts each letter by an amount determined by a repeating keyword. This means the same plaintext letter can encrypt to different ciphertext letters depending on its position, which makes the cipher far more resistant to simple frequency analysis than a single-alphabet substitution cipher.

The tool used to perform the encryption by hand is the tabula recta (Vigenère square) below: a 26×26 grid of the alphabet, each row shifted one letter further than the last. To encrypt a letter, find the column for the plaintext letter and the row for the corresponding key letter — the letter at their intersection is the ciphertext letter.

Mathematically, if P is a plaintext letter's position (A=0...Z=25) and K is the corresponding key letter's position, the ciphertext letter position C is:

C = (P + K) mod 26

The key is repeated to match the length of the plaintext. For example, encrypting "DOG" with the key "CAT": D+C, O+A, G+T → letter-by-letter modular addition on the tabula recta.

Your secret key for this lab is SCCCYBER. You will encrypt your own first name (letters only, no spaces) using this key.

Tabula Recta

Objective 3 Score: 0 / 15

✓ Lab Completed

Once you've checked all three objectives above, click below to finalize your lab and generate your completion record.

LAB COMPLETE