GithubHelp home page GithubHelp logo

csi3344-steganography's People

Contributors

desaixi avatar dopelikejope avatar josephyu1 avatar micahschiewe avatar nnazo avatar

Watchers

 avatar  avatar

csi3344-steganography's Issues

Spread out message data over multiple IDAT chunks

  • Add a seekNextIdat() function which calls find(DATA), then backs up by 8 bytes to read in idatPos (if this results in a value greater than TIPPING_POINT, call flip(idatPos)), then fast-forward 4 more bytes to put into the correct position.
  • Update get() and put() to decrement idatPos for each byte read
  • Update get() and put() to, before each read, check if idatPos is zero or less; if so, then call seekNextIdat() before getting/putting
  • Add this same logic of tracking idatPos to flushAndClose()

StegImage::put

Write one byte's worth of data into the RGB low-order bits. May want some helper functions. Be careful not to overflow image dimensions.

General strategy:

for each bit 'b' in the character:
    let c2 = peeked next character
    Embed  b in c2
    put c2 into stream (will overwrite original)

StegImage::get

Returns the next hidden character. Must ensure it doesn't overshoot the end of the message.

Re-compute CRC

https://en.wikipedia.org/wiki/Cyclic_redundancy_check

Function CRC32
   Input:
      data:  Bytes     //Array of bytes
   Output:
      crc32: UInt32    //32-bit unsigned crc-32 value

//Initialize crc-32 to starting value
crc32 ← 0xFFFFFFFF

for each byte in data do
   nLookupIndex ← (crc32 xor byte) and 0xFF;
   crc32 ← (crc32 shr 8) xor CRCTable[nLookupIndex] //CRCTable is an array of 256 32-bit constants

//Finalize the CRC-32 value by inverting all the bits
crc32 ← crc32 xor 0xFFFFFFFF
return crc32

Command Line Interface

  • getInput()
  • Validate input mode, get the image file name, and either the message to embed or the destination of the message to extract.
  • readMessage(const StegImage& imageToReadFrom, const string& filename)
  • Read a message embedded in the StegImage. Will use StegImage::get
  • writeMessage(const StegImage& imageToWriteTo, const string& messageToWrite)
  • Put the message one character at a time

Add error messages

Add an errorMessage field to StegImage which is set by the constructor; this is populated by the constructor to match the cause which tripped the inError flag.

StegImage::open

Takes a filename. Opens and must:

  • Validate that it received a PNG
  • Get the dimensions of the file. If they are unreasonable, correct from little endian
  • Move the read/write heads to the pixel section
  • ID bit depth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.