Skip to content

Ayshhh/image-stego

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-stego

Join the chat at https://gitter.im/FOSS-Cell-GECPKD/image-stego


Image steganography refers to hiding information i.e. text, images or audio files in another image or video files. The current project aims to use steganography for an image with text using bit replacing technique with React. This hidden information can be retrieved only through proper decoding technique.
Languages used:

Working Diagram

Technique of Encryption

LSB based Image steganography:

LSB-Steganography is a steganography technique in which we hide messages inside an image by replacing Least significant bit of image with the bits of message to be hidden.As the LSB is only changed, the human eys cannot detect the changes in it.

    Encryption Algorithm

  • Begin
  • Input: Cover_Image, Secret_Message ;
  • Transfer Secret_Message into Text;
  • Convert Text to Binary_Codes;
  • Set BitsPerUnit to Zero;
  • Encode Message to Binary_Codes;
  • Add by 2 unit for bitsPerUnit;
  • Output: Stego_Image;
  • End

    Decryption Algorithm

  • Begin
  • Input: Stego_Image
  • Calculate BitsPerUnit;
  • Decode All_Binary_Codes;
  • Shift by 2 unit for bitsPerUnit;
  • Convert Binary_Codes to Text;
  • Open Text;
  • Output Secret_Message;
  • End

Function used in steganography.js to encode the message

// Encodes message using LSB method function encodeMessage(colors, message) { let messageBits = getBitsFromNumber(message.length); messageBits = messageBits.concat(getMessageBits(message)); let history = []; let pos = 0; while (pos < messageBits.length) { let loc = getNextLocation(history, colors.length); colors[loc] = setBit(colors[loc], 0, messageBits[pos]); while ((loc + 1) % 4 !== 0) { loc++; } colors[loc] = 255; pos++; } };

Function used in steganography.js to decode the message

// Decodes message from the image function decodeMessage(colors) { let history = []; let messageSize = getNumberFromBits(colors, history); if ((messageSize + 1) * 16 > colors.length * 0.75) { return ''; } if (messageSize === 0) { return ''; } let message = []; for (let i = 0; i < messageSize; i++) { let code = getNumberFromBits(colors, history); message.push(String.fromCharCode(code)); } return message.join(''); };

Contributions

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. To get this project, Follow the steps (It's Open and free :P )

    1. Fork the Project

    2. Clone it git clone https://github.com/yourrepo/image-stego.git

    After cloning, Setup the local machine with requirements (Exclude those which you already have)

    • Enter npm i to install the needed node modules (Wait for completion)
    • Enter npm start (Wait for some time and your localhost will wake up)

    3. Create your Feature Branch git checkout -b feature/changedFeature

    4. Commit your Changes git commit -m 'Add some AmazingFeature'

    5. Push to the Branch git push origin feature/changedFeature

    6. Open a Pull Request


Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.9%
  • CSS 6.2%
  • HTML 3.9%