Sign in to follow this  
I Like Pi

Text Steganography BETA

Recommended Posts

This works like BoltBait's plugin, but encodes plain text instead of another image. Since images take more space to store than plain text, this is more efficient than hiding an image containing text. Plus, the text is kept as text.

Known issue: decoding can be slow if no data is encoded or the settings don't match

Compiled DLL

Download

Source Code and Demo Image

Released under the MIT License. In short, do whatever you want except for removing the license.

(NOTE: You must save the image, then open it. Right click -> Copy will ruin the alpha channel.)

TextSteganography_source.png

Share this post


Link to post
Share on other sites

yay! now i can send secret messages to people in my picuters and people wont know.. or will they

*mo hahahahaha* *cough cough*

im a test it out

Share this post


Link to post
Share on other sites

Bugs, bugs, bugs... If you set the Bits/channel option to anything but 2, the decoder will freeze PdN before you have a chance to change the option in that dialog.

Share this post


Link to post
Share on other sites

That's the issue I mentioned in the first post. It's not frozen indefinitely, but it is taking a very long time. When encoding text, it appends U+0000 to signal the end of the text, but when the settings don't match, the decoder has to look at every pixel. Even so, I don't see why it's so slow, since the code only does some bitwise operations and appends to a StringBuilder.

Share this post


Link to post
Share on other sites
It's not frozen indefinitely, but it is taking a very long time.

I'd consider 8+ hours pretty close to indefinitely...

I started it before school.

and when I came back, it was still frozen.

At that point I killed it, 'cause I kinda needed to use Paint.NET...

Share this post


Link to post
Share on other sites

Turns out most of the time is spent setting the text of the TextBox and almost no time is spent undoing the steganography. :shock: A Google search confirms that TextBox doesn't like long strings. I've changed it to use a RichTextBox so its a little faster. It sometimes chokes on bad Unicode data though.

EDIT: typos

Share this post


Link to post
Share on other sites
That's the issue I mentioned in the first post. It's not frozen indefinitely, but it is taking a very long time. When encoding text, it appends U+0000 to signal the end of the text, but when the settings don't match, the decoder has to look at every pixel. Even so, I don't see why it's so slow, since the code only does some bitwise operations and appends to a StringBuilder.

What!? :?: :?: :?: :?: :?:

Share this post


Link to post
Share on other sites

Can you use some

System.Security.Cryptography (or whatever it is)

so we can encode it with a password? So pretty much;


  • [*:2debk22q]You insert the text & settings
    [*:2debk22q]The plugin encodes it (into gobbledy-gook)
    [*:2debk22q]The result is inserted verbatim
    [*:2debk22q]The encode function is invoked, so the encryption is reversed as it comes out,
    [*:2debk22q]The user gets the plain text (if they put in the right settings, otherwise they get Chinese. :wink: )

I used it once, but I forgot the namespace. You should be able to find it again.

Share this post


Link to post
Share on other sites

Great way to give the source code too! I'm going to modify it to add encryption. Soon, we'll have to collab together so we can make one that can hide files! (Put the pdn inside the png!)

EDIT: Once I finally get my head around the c#...

Share this post


Link to post
Share on other sites

Well, I have made a program that changes files into text and vice-versa, so I'll get the two pieces of code (file <-> byte(), input <-> encrypted) soonish. I'll translate them to c# first though...

Share this post


Link to post
Share on other sites

While I haven't taken a look at this particular plugin, from looking at the original plugin when it was first released it would seem to me that it should be very simple to more effectively hide (from a visual perspective) whatever you're trying to hide.

Boltbait's plugin suffered from users being able to occasionally see the "hidden" image without decoding it. This was because it was something of a simple overlay.

I'm assuming that you're doing this by replacing the n least significant bits of a channel (I'd avoid the alpha channel entirely if I were you) with your data.

One simple way to obfuscate any apparent patterns in your input (be it an image, where it may be extremely visible, or text where a repeating pattern might become apparent) is to just do a bitwise XOR on your input (the "^" operator in C#, I believe) with some random data.

So, pick a seed (hardcode it, we're looking for visual masking, not security), seed the random number generator with it, start generating random numbers, and xor your input with it. This will turn your output into an apparently completely random series of bits, destroying any patterns that might be present. It would appear as a very light noise in the image rather than a possibly identifiable pattern. I've been tempted for a while to modify Boltbait's original plugin to do this, but never got around to it.

Another idea was to apply some simple compression (gzip, perhaps) to allow the input to be potentially larger than the available space, but this introduces additional UI complications.

Share this post


Link to post
Share on other sites

Thanks for your input, but personally I think it's already pretty hard to notice the text. First, the default of two bits per channel (a maximum difference of 3, which is from 00 to 11 or vice versa) is barely noticeable to human vision. Second, since this is text stored as numbers, there won't be much of a visual pattern. For an example, look at my source code/demo image. It looks like it's pure white. Compression sounds interesting, but a 100*100 image can already hold 2500 Unicode characters at 1 bit per channel.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this