File Exchange

image thumbnail

Steganography using LSB substitution

version 1.0.0.0 (1.51 KB) by Ashish Soni
The term steganography means “cover writing”

15 Downloads

Updated 16 Apr 2013

View License

This is a simplest steganographic technique that embeds the bits of secret message directly into the least significant bit (LSB) plane of the cover image. In a gray-level image, every pixel consists of 8 bits. The basic concept of LSB substitution is to embed the confidential data at the rightmost bits (bits with the smallest weighting) so that the embedding procedure does not affect the original pixel value greatly.

Comments and Ratings (12)

sumit kumar

how to enter cover image?

sir how can i use this code to hide secret text. kindly help me

what shlould i substitute in no of LSB bits to be substituted (n) ,What is the value of (n) because when i run it ,appear this error :

Enter the no of LSB bits to be subsituted- 1
Error using bitor
Inputs must have the same size.

Error in Steg (line 15)
S = uint8(bitor(bitand(x,bitcmp(2^n-1,8)),bitshift(y,n-8))); %Stego

yash

Hi, I'm new to matlab, if its not too much to ask, how to use your program? For example how to provide the cover image? I can't seem to use it. Thanks

Hello, I am new to this and I have my final year project on Steganography.
Can anyone guide me regarding this algorithm?

Ashish Soni

Mr Karthik, No of LSB bit you have to subsitute is 1 to 4. u can check the effects by varying this no.

can u add an image of your output process
'Enter the no of LSB bits to be substituted'
what no. should be entered

Akash Modi

ghassan78

thank you (Ashish Soni ) for this code , i test it but , i ask about no of LSB bits to be substituted (n) ,What is the value of (n) because when i run it ,appear this error :

Enter the no of LSB bits to be subsituted- 1
Error using bitor
Inputs must have the same size.

Error in Steg (line 15)
S = uint8(bitor(bitand(x,bitcmp(2^n-1,8)),bitshift(y,n-8))); %Stego

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux