Giter Site home page Giter Site logo

twostepencryption's Introduction

Two Step Encryption

Introduction

Applying Steganography followed by Visual Cryptography. Implementation based on the research paper titled "Combine use of Steganography and Visual Cryptography for Secured Data hiding in Computer Forensics"

Steganography is the method of hiding secret data inside any form of digital media. The main idea behind steganography is to hide the existence of a data in any medium like audio, video, image etc.

Visual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decrypted information appears as a visual image.

Architecture

image

Project

Structure
.
├── images
├── main.py
├── README.md
├── Reference_paper.pdf
├── requirements.txt
└── src
    ├── lsb_stegno.py
    └── n_share.py
File description
File Description
lsb_stegno.py Methods to Encode and Decode data using LSB Steganography
n_share.py Methods to Split and Compress LSB Encoded images

Algorithms

Steganography
Encoding data in image
# Putting modified pixels in the new image
newimg.putpixel((x, y), pixel)
if (x == w - 1):
    x = 0
    y += 1
else:
    x += 1
Decoding data from image
# string of binary data
binstr = ''

for i in pixels[:8]:
    if (i % 2 == 0):
        binstr += '0'
    else:
        binstr += '1'

data += chr(int(binstr, 2))
if (pixels[-1] % 2 != 0):
    return data
Visual Cryptography
Generating shares
# Split image based on random factor
n = int(np.random.randint(data[i, j, k] + 1))
img1[i, j, k] = n
img2[i, j, k] = data[i, j, k] - n
Compressing shares
img[i, j, k] = img1[i, j, k] + img2[i, j, k]
Usage
Setup

Install dependencies

pip install -r requirements.txt

Run using python

streamlit run main.py

twostepencryption's People

Contributors

nishnash54 avatar dependabot[bot] avatar

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.