Skip to content

This code is for a steganography-based image encryption system that utilizes the DES (Data Encryption Standard) algorithm.

Notifications You must be signed in to change notification settings

siva-senthil/Stegnography-with-des-for-image-encryption

Repository files navigation

Install the required packages.

This code is for a steganography-based image encryption system that utilizes the DES (Data Encryption Standard) algorithm.

Purpose:

The system is designed for image steganography, where one image (a smaller image) is hidden within another (a larger image). The smaller image is encrypted using DES before merging with the larger image, making the hidden content more secure. After embedding the encrypted image into the larger image, the code allows for retrieving and decrypting it back to the original form.

Functionality:

The user is prompted to either merge (embed) or unmerge (extract) the smaller image:

Merging: The smaller image (img2) is encrypted using DES, and then merged into the larger image (img1) by combining pixel values. The result is saved as an output image (with the embedded encrypted content).

Unmerging: The output image with the embedded content is processed to extract the hidden, encrypted image. The extracted image is then decrypted using DES to recover the original image.

Code Details:

Encryption and Decryption: Uses the DES encryption algorithm from the pycryptodome library.

Steganography:

Uses binary manipulation of pixel data to merge and unmerge images. The code splits each color channel (RGB) of a pixel into two parts, allowing half of the bits to come from the larger image and the other half from the smaller, hidden image.

Plotting with Matplotlib: The code measures the time taken for encoding and decoding operations and plots the results for performance analysis. It tracks the time taken to process each image, which helps in analyzing encoding/decoding efficiency.

Libraries used:

click: For command-line interaction. Pillow: For handling and manipulating image files. matplotlib: For plotting performance metrics. pycryptodome: For DES encryption and decryption.

About

This code is for a steganography-based image encryption system that utilizes the DES (Data Encryption Standard) algorithm.

Topics

Resources

Stars

Watchers

Forks

Languages