#30 Secrets

Complete a set challenge every day like: App making, Code solving, Image designs, Web Scripts and more. Win crazy points and prizes.
Forum rules
Please only post a reply if its a challenge entry - other posts and comments will be deleted. - Guide and Rules
3 posts Page 1 of 1
Contributors
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

#30 Secrets
CodenStuff
Welcome to challenge #20

Secrets

Today's challenge is all about secret/hidden messages.

Remember the secret codie app I made a while ago that allowed you to save a message that was hidden within an image, then you could send that image to someone and with a password they could read the message.

Image

viewtopic.php?t=9363&p=68450#p68450

Well your challenge for today is to come up with an interesting way of creating and sharing secret messages just like my secret codie app. You can't directly copy my app and you can't simply use an encrypted string - that's too easy lol.

Rules for this challenge:
You can't just encrypt a string, you must come up with your own way of hiding/retrieving the message.
Desktop or Web based are allowed, or a combination of both.


Good luck, and don't tell anyone about this because it's a secret :lol:

Of you go then cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: #30 Secrets
comathi
Here's my entry. It's similar to what you made, but it's a lot more random :)

http://projects.comathi.com/mm/2014/secret.zip

How it works
The program generates 32x32 images, which means 1024 pixels. In reality, though, only 1020 of those pixels can contain encrypted data.

The program starts by generating 4 random colors, which go in the image's 4 corners. The average of those colors is then used as the seed for the rest of the random generation.

An random starting position is chosen. The pixel at that location has a value of (character code, next pixel x, next pixel y), where next pixel x and next pixel y are two random numbers.

The program then goes to the next pixel and does the same thing, until it gets to the last character in the string to encrypt. It then sets the corresponding pixel to (character code, 0, 0).

Once it placed all the data, it fills the remaining pixels with random colors.

The nice thing about this is that not only will the same message produce a different image if you encrypt it twice, but same characters withing a single string won't produce the same color :)

When decrypting the image, the program reads the 4 corners, averages and sets the seed for the random generation. Since it's the same seed as the one used for encrypting, it will generate the same starting position... Then all it has to do is follow the pixel links until it gets to one where the G and B values are 0... Simple! :D

Here's an image for you guys to try it on: Image
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Re: #30 Secrets
Usman55
I was working on a 'fun' app but unfortunately it can't be completed today due to some limitations. Currently, it can convert text into system beeps using the Beep (Frequency, Duration) method and records them in a .mp3. The problem is I can't get the back-conversion to work. So I'm unable to translate the beeps from .mp3 back into text. Converting it should be easy but reading the .mp3 file is proving tough for me.

Anyways, I've compiled a simple String Cryptor which encrypts/decrypts text with a password. And I'm posting it for the sake of participation. Hopefully, the other 'fun' app will be completed soon.

Using the Beep method, I'm also making another cool app which is eventually going to turn into a music app if I get the time to work on it. :D
You do not have the required permissions to view the files attached to this post.
Image
3 posts Page 1 of 1
Return to “Mad March Daily Challenge”