a_bertrand Posted November 25, 2010 Share Posted November 25, 2010 Ok, I had a bit of "free time" and decided I wanted to show something to my apprentice: http://garg.web.nowhere-else.org/web/tutorials/Crypto.zip This little code allows you to encrypt texts with a key and decrypt them. Yet the algorithm is as stupid as possible (replace a letter with another). What's fun if that if your text is in English and big enough (due to statistic counts at start) the soft is able to find back a key and therefore crack the code. To do so, here are the steps: - Count each characters and make a statistic of which is more used - Compare the found statistic with the one known for the language as each language use differently the characters. - Use the two most used characters and replace them with the 2 most used characters on the known language. - From there on, try to match words which have unknown characters inside but which gives unique solutions like: "t?e" can be only "the" as "tee" would be 2x the "E" and there is no other words (in this dictionary) which are like that. Therefore learn slowly new characters and progress until all words are completed. If you want you may try to code the same algorithm in other languages (PHP, JS, Java, Python) and we can then vote for the best implementation ;) Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted November 26, 2010 Share Posted November 26, 2010 I highly doubt your gunna get much competition xD.. I so have to get my head around this stuff..There are endless possibilities with this stuff Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted November 26, 2010 Author Share Posted November 26, 2010 Never said you must compete with me. It was more to see if any of you was able to code it in another language (as I know there is no reasons why it could not be done). And indeed there is endless possibilities with such small toy ;) You could improve it a lot and try to hack yet more complex algorithms. Quote Link to comment Share on other sites More sharing options...
shedh Posted December 17, 2010 Share Posted December 17, 2010 Nice concept alain, the possibilities are endless you could add non alphabetic characters and capital characters making the final output pretty hard to revert and end up with with an interesting string, am going to see what I can come up with. Makewebgames should have a little non prized compo, which I havnt seen much of in the last few months Hi by the way, havnt spoken to you in a long time Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.