This post will be created entirely using Microsoft’s CoPilot AI feature. I will discuss the prompts said along with explanations of the text given into further detail, if needed. I started off by first asking “how steganography can be used to hide text in an image by modifying the least significant bit.” The Response? Here below:

 

Introduction

Steganography, the art of concealing information within seemingly innocuous data, has been used throughout history to transmit hidden messages. In our digital age, steganography finds a cozy home within digital images. But how does it work? Let’s peel back the pixels and reveal the magic.

The LSB Dance

  1. Pixel Anatomy: Imagine an image as a canvas of pixels. Each pixel contains color information—usually represented by red, green, and blue (RGB) values. These values range from 0 to 255 (8 bits per channel).
  2. The Sneaky Bit: Enter the least significant bit (LSB). It’s the last bit in each color channel. Why is it special? Because it’s the least noticeable. Altering it slightly won’t drastically change the pixel’s color.
  3. Hiding Text: Suppose we want to hide the letter “H” (ASCII value 72) in an image. We convert 72 to binary: 01001000. Now, we’ll replace the LSB of some pixel values with these bits.
  4. Subtle Changes: If the original red value was 187 (10111011 in binary), we tweak it to 186 (10111010). Voilà! The change is imperceptible to the human eye.
  5. Reconstruction: To extract the hidden message, we read the LSBs of specific pixels. Assemble those bits, convert back to ASCII, and—ta-da!—we have our “H.”

Challenges and Artistry

  • Capacity vs. Stealth: The more pixels we modify, the longer the hidden message. But too many changes raise suspicion. It’s a delicate balance.
  • Visual Impact: Some images tolerate LSB alterations better than others. A noisy photo of a cat? Sure! A pristine landscape? Not so much.
  • Selective Pixels: We choose pixels wisely—maybe the sky or a shadow. Avoid Uncle Bob’s face; he’ll notice.

But now let’s examine this result, as although the information all be may true, it is not explained as thoroughly as I would’ve liked it to be. In the section labeled as “The LSB Dance” it starts off in #2 saying to enter the LSB. It mentions that LSB is the last bit in each color channel, but what does that mean in more context?  So we ask “what is the least significant bit in more detail? It returns:

Understanding the Least Significant Bit (LSB)

  1. Binary Numbers:
    • Computers communicate using binary, which means everything is represented as a sequence of 0s and 1s.
    • Each digit in a binary number is called a bit. A bit can be either 0 or 1.
  2. Place Value:
    • Just like in our decimal system (base 10), where each digit has a place value (ones, tens, hundreds, etc.), binary numbers have place values.
    • The rightmost bit (furthest to the right) has the lowest place value, and it doubles as we move left.
  3. Significance:
    • The LSB is the rightmost bit in a binary number.
    • It holds the least significance because it contributes the least to the overall value of the number.
    • For example:
      • In the binary number 1101, the LSB is 1 (far right).
      • Its place value is 2^0 (which is 1).
  4. Changing the LSB:
    • Altering the LSB of a binary number has the smallest impact on the overall value.
    • If you change the LSB from 0 to 1 (or vice versa), the difference is minimal.
    • This property is crucial for techniques like steganography, where we hide information within other data (such as images)

This information helps us better understand what is exactly the least significance bit, which is a crucial part in the understanding of steganography. It also better helps us understand the explanation for how we translate a binary number, as it mentions its place value is 2^0.(which is 1 for that said example). For a furthermore example, I have that listed below with the prompt of “how to translate a number to binary”, keeping in mind pixels are just a number from 0-255 based on the color. Results below:

  1. Start with the Decimal Number: Let’s say your decimal number is

    .

  2. Divide by 2: Divide the decimal number by 2 and note down the quotient and the remainder.

  3. Repeat the Division: Continue dividing the quotient obtained in step 2 by 2 until the quotient becomes zero. Note down the remainders at each step.

  4. Write the Remainders in Reverse Order: Write down the remainders obtained in step 3 in reverse order. This will give you the binary representation of the decimal number.

  5. Pad (if necessary): If you need a fixed number of bits for your binary representation, you might need to pad the binary representation obtained in step 4 with leading zeros.

Let’s illustrate this process with an example:

Let’s convert the decimal number
=26

to binary.

  • Step 1:
    =26

  • Step 2:
    26÷2=13

    with remainder 0

  • Step 3:
    13÷2=6

    with remainder 1
    6÷2=3

    with remainder 0
    3÷2=1

    with remainder 1
    1÷2=0

    with remainder 1

  • Step 4: Writing the remainders in reverse order:
    11010

So, the binary representation of the decimal number
26

is
11010

.

This process can be automated using programming languages such as Python, which provide functions or libraries to perform this conversion.

 To conclude, the last explanation I think needs furthur discussion is the last step, reconstruction. How do we read the LSB assembly of bits, and convert back to ASCII? We ask CoPilot this question “how do you translate bits back to ASCII?” Final Results below:

Here’s a step-by-step guide on how to convert binary bits to ASCII:

  1. Binary to Decimal Conversion:

    • First, group the binary bits into 8-bit chunks (each chunk represents a byte).
    • Convert each 8-bit chunk to its decimal equivalent. For example:
      • Binary: 01010000 → Decimal: 80
      • Binary: 01101100 → Decimal: 108
      • Binary: 01100001 → Decimal: 97
  2. Lookup in the ASCII Table:

    • Refer to the ASCII table to find the character associated with each decimal value.
    • For instance:
      • Decimal 80 corresponds to the letter “P.”
      • Decimal 108 corresponds to the letter “l.”
      • Decimal 97 corresponds to the letter “a.”
  3. Combine Characters:

    • Combine the characters obtained from each 8-bit chunk to form the complete message.
    • In our example, the binary sequence 01010000 01101100 01100001 translates to the text “Plant trees.”

And Voila, there we have it, how we uncover hidden texts from an image, using the LSB in steganography. Made entirely using context from Microsoft’s CoPilot.