Return to Unfiction unforum
 a.r.g.b.b 
FAQ FAQ   Search Search 
 
Welcome!
New users, PLEASE read these forum guidelines. New posters, SEARCH before posting and read these rules before posting your killer new campaign. New players may also wish to peruse the ARG Player Tutorial.

All users must abide by the Terms of Service.
Website Restoration Project
This archiving project is a collaboration between Unfiction and Sean Stacey (SpaceBass), Brian Enigma (BrianEnigma), and Laura E. Hall (lehall) with
the Center for Immersive Arts.
Announcements
This is a static snapshot of the
Unfiction forums, as of
July 23, 2017.
This site is intended as an archive to chronicle the history of Alternate Reality Games.
 
The time now is Wed Nov 13, 2024 1:38 am
All times are UTC - 4 (DST in action)
View posts in this forum since last visit
View unanswered posts in this forum
Calendar
 Forum index » Meta » Puppetmaster Help
Image obfuscation (encryption method)
Moderators: imbri
View previous topicView next topic
Page 1 of 1 [4 Posts]  
Author Message
memo
Greenhorn

Joined: 31 Jul 2011
Posts: 4

Image obfuscation (encryption method)

So here's some fun stuff for you puppetmasters.

Take your standard image, let's say 100 x 100 pixels. Convert it to grayscale, you've now got 100 x 100 in 8-bit unsigned integers. Designate this as a "carrier" image.

You now create your "message" image in binary, black-and-white (1-bit) as a 100 x 100 pixel secret message. Replace the last, (or second-to-last, or third-to-last) bit of the carrier image with the bits from the message image. Make sure you do this on the last (smallest) bits of the carrier image, or the secret message will show through.

For example, my first "carrier" pixel is pure white, [1 1 1 1 1 1 1 1].
The first pixel of my message is black, [0].
The new pixel is [1 1 1 1 1 1 1 0].

The reason this works is because the higher-order bits of the carrier image act as noise and obfuscate the message beneath it.

Caveats:
* Make sure your carrier image is fairly noisy to begin with. No block patterns, no large patches of one color... it'll make the underlying image easier to spot.
* Make sure you remember which bit you saved the message in. Duh.

You can, of course, take this a step further and use a random cipher between 5 and 8 to replace bits of the carrier image with the message. Here's a 3 x 3 example:

Carrier image, gray:

1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0______1 0 0 0 0 0 0 0

My message image is pure white:

1______1______1
1______1______1
1______1______1

My cipher image is random integers between 5 and 8:

5______8______7
7______6______6
8______5______8

Resulting encrypted image is:

1 0 0 0 1 0 0 0______1 0 0 0 0 0 0 1______1 0 0 0 0 0 1 0
1 0 0 0 0 0 1 0______1 0 0 0 0 1 0 0______1 0 0 0 0 1 0 0
1 0 0 0 0 0 0 1______1 0 0 0 1 0 0 0______1 0 0 0 0 0 0 1

Make sure you save your cipher! If you look at this as a grayscale image, nothing seems amiss. However, if you know the cipher key, you can extract the encoded image. Nifty!

If your image is of size N x N pixels, there are (N x N) ^ D possible permutation matrices for the encoding cipher. Not to mention, the cracking algorithm would need to decide whether or not a coherent image was extracted...

So let's say you've got a 100 x 100 px message that you've scattered randomly into the last 4 bits of a carrier image. If the rotation process, decision process, and message extraction process manage to finish up inside 1 ms (0.001s), it could still take 1.1574e+008 days to recover the original message. That's a little over 300,000 years for you kids playing the home version.

Of course, I'm sure you could make an intelligent shape-isolating algorithm that might shave a few thousand years off the final calculation time... Twisted Evil

Thoughts?

PostPosted: Sun Aug 07, 2011 10:53 pm
 View user's profile
 Back to top 
thebruce
Dances With Wikis


Joined: 16 Aug 2004
Posts: 6899
Location: Kitchener, Ontario

I like the latter extended version... altering the LSB (least significant bit) of each pixel in an image is a common (& simple) steganography process... but having the key image provide the bits in each pixel in which each message bit is encoded is nice application of a vigenere-style encryption to an image...

The next trick for a puzzle would be figuring out where that key image (grey scale noise, effectively) could be hidden/encoded for retrieval.

If obfuscation of the entire puzzle imagery isn't an issue, you could provide one image with an alpha channel. Take the original image, apply the random 0-7 bit steganography, then hide key noisy image as the alpha channel. The resulting image would be somewhat visibly noisy, and randomly transparent Smile But all the puzzler has to go on is a lot of bitty noise (at least until the reason for the noisy alpha channel is determined)... (or until they find this thread Razz )

Steganography is a very neat and flexible thing!
_________________
@4DFiction/@Wikibruce/Contact
ARGFest 2013 - Seattle! ARGFest.com


PostPosted: Mon Aug 08, 2011 9:58 am
 View user's profile Visit poster's website AIM Address
 Back to top 
memo
Greenhorn

Joined: 31 Jul 2011
Posts: 4

@thebruce;

Yes, the "carrier" image does best with a lot of high-frequency semi-coherent noise. I like pictures of trees, myself... but really, anything that avoids large blocky patterns is a good start.

As far as randomization is concerned, you could even go so far as to encode binary changes into the RGB channels of an image. Since the pixel intensities aren't necessarily shifted as much as the color balance, it makes detection that much harder.

So if my PNG file is 100 x 100 x 3 @ 8bit resolution, and I choose... say... the 3 least-significant bits to encode my message? Then we get (100 * 100 * 3) ^ 3 permutations. If a text recognition algorithm can complete within 1ms, you'd still be looking at around 1000 years as an upper-bound for search times.

Since the cipher image would also live in 8-bit integers, you could theoretically use text as a means to encode the cipher. Y'know. When you're not making tinfoil hats, because at that point, you'd need 'em. Laughing

PostPosted: Mon Aug 08, 2011 5:21 pm
 View user's profile
 Back to top 
thebruce
Dances With Wikis


Joined: 16 Aug 2004
Posts: 6899
Location: Kitchener, Ontario

Aye, I've made a 4 channel puzzle before =) with 8bit RGBA, technically you have 8 bits per channel per pixel for the dimensions of the image. That's 32 bit planes of data. That's potentially an enormous area to encrypt data (which as an image would ultimately just appear to be noise). Smile
_________________
@4DFiction/@Wikibruce/Contact
ARGFest 2013 - Seattle! ARGFest.com


PostPosted: Mon Aug 08, 2011 6:26 pm
 View user's profile Visit poster's website AIM Address
 Back to top 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
View previous topicView next topic
 Forum index » Meta » Puppetmaster Help
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
You cannot post calendar events in this forum



Powered by phpBB © 2001, 2005 phpBB Group