Repository for the awakening crypto problem.
asleep()
and awake()
are encryption / decryption funtions.
The code in Awakening.py
depicts a terminal session interacting with these functions.
Figure out how to decode the encrypted messages decode
, decode2
and decode3
.
Submit pull requests of Requests.py
for any messages you want encoded, and any messages you want decoded (other than the solution), and I will add the results into the file.
Submit pull requests to README.md
for any questions or clarification.
First person to solve this wins a piece of art!
Enjoy!
I added a testdata folder. This includes 4 tests and corresponding log files. test.py
and log.txt
generates 7^5 dictionaries of string length 5 random/progressively. test2.py
and Log2.txt
generates 7^5 dictionaries of string length 5 straight randomly. test3.py
. Log3.txt
just shows an output of running 1 million tests checking input of asleep()
with output of awake()
. test4.py
and Log4.txt
generates 8000 random dictionaries of length 20. Feel free to propose more tests. I will generate more data if you're interested.
**UPDATE: I changed my mind about the hints. If I make it too easy, or give out answers, going through the trouble of designing this problem and getting it to work would just have been a waste of time. I have provided a boatload of raw data in the testdata folder which should be a big help. I will still add to Requests.py
if there are any specific encryption requests. I hope you still enjoyed working on it even if you are unable to figure it out.
Q1. Does the order of numbers in the encryption matter / if you moved the items in the dictionary around, would the encryption be different?
A1. Dictionaries are inherently not ordered in python, the decryption takes this into account. You could take my encrypted message and move around all of the key value pairs and it would still be decrypted the same.
Q2. Do the quotes get encrypted as well / could you encrypt integers?
A2. Strings follow python rules of nested quotes. In the string "That's my string!", the inner quote will be encrypted. Yes integers and special characters can be encrypted. Feel free to submit anything you want encrypted and I will let you know if it fails.
Q3. Is the asleep()
function deterministic? Will it always product an identical dictionary given the same string?
A3. Yes, asleep()
will always produce the same dictionary given an identical string.
Q4. Can two-hand crafted encrypted-dicts provided to awake()
produce identical plain-text?
A4. I generated a custom dictionary different than one generated by asleep()
that will produce an identical string when put into awake()
It is in Requests.py
.
Q5. If you plan on giving out hints, at what point will you start giving out hints?
A5. See update. If you are still having trouble, it would be great if you could share it with other programmers you know might be interested. If a team of people solve it, everyone will get a piece of art. Thank you very much for sticking with this and not giving up.