Page 3 of 6
Re: Problem 059
Posted: Fri May 20, 2011 9:38 am
by Susanne
rayfil said:
This problem was published more than 7 years ago (2000+ days) and solved by more than 11,000 members over those years without a single comment about its content, until this week.
Many posts to the thread of
Problem 59 (
View Problem) contain a comment on the religious content of the problem. Therefore, when I posted my comment, I was not aware that my religious opinion might not be whished-for to be known. For the future, I will try to avoid any non-mathematical critique.
Re: Problem 059
Posted: Tue Jul 05, 2011 10:13 am
by thedoctar
Hey, wow I had so much fun solving this problem! In relation to identifying which key was correct, I used two factors to reduce the number of possible keys/text, but I shall not reveal the two factors so I don't reveal how to solve the problem.
However, one of my factors needed a certain word to appear in the text (one of the most common word used in English) and filtered all text produced from a key that didn't have that word but if the original text didn't contain the word, I would've been screwed.
Is there any algorithm that is fast and can tell you whether a piece of text is genuine or a load of gibberish?
Re: Problem 059
Posted: Sat Jul 30, 2011 8:23 am
by matts1
I found the encryption key by looking at the frequency, but was wondering. Is it supposed to have any special characters in the plaintext?
Re: Problem 059
Posted: Sat Jul 30, 2011 8:33 am
by thedoctar
I assumed that there weren't supposed to be special characters.
Re: Problem 059
Posted: Thu Aug 04, 2011 12:01 am
by thundre
matts1 wrote:I found the encryption key by looking at the frequency, but was wondering. Is it supposed to have any special characters in the plaintext?
Letters, numbers, whitespace, punctuation -- all "printable characters". There are no form-feeds or anything like that. It should be pretty easy to output the plaintext if you figured out the key already.
Re: Problem 059
Posted: Wed Aug 24, 2011 6:25 am
by mdean
This problem is giving me fits so far. And I'm not even on the decryption part yet. I'm just trying to read in all the values and print them back out but I can't seem to do it without it crashing or freezing. If it's not improper, is there anyone I can pm with the C++ code I haven't gotten to work?
Update: never mind. Got it working, solved the problem. Man I wish the other thread for this was open. I mean, what I did was similar to what others had done, but it eliminated any doubt I found the solution.

Re: Problem 059
Posted: Fri Aug 26, 2011 12:30 pm
by Fogmeister
Well I'm completely stumped by this one.
I have checked the xor function works using *, k and A and it all works fine.
However, every line of output has unprintable chars in it.
I have tried filtering all sorts of different ways to no avail.
Hmm...
Maybe I need to try a few different XOR combinations.
::EDIT::
Just checked against the XORs from page 2 and it isn't working
The good thing is though that I just need to rewrite that and it should work fine
::EDIT 2::
OK, so I got the XOR working and I've run the code and found the password. However, it only returns the first 24 characters of the line in English. After character 24 in the line it just becomes random nonesense again
Nevermind, got it now

Re: Problem 059
Posted: Tue Nov 15, 2011 3:27 am
by JMW1994
Are we supposed to decrypt like this: 79^59 then take the last number in the list and do this 59^12; 79^59, take the result, and do it again like this (79^59)^12; or 79^59 and then take the next pair and XOR it 12^2. It doesn't really explain as I never did this before. I know how the XOR works as this is a binary concept.
Re: Problem 059
Posted: Tue Nov 15, 2011 4:17 am
by rayfil
Let's assume that the encryption key is "abc". You need to XOR the first character of the text with the first character of the key "a". Then XOR the second character with "b" and the third character with "c". The fourth character would be XORed with "a", the next one with "b", the next one with "c", the next one with "a", etc. etc.
You have to find what are the "abc" characters which will produce a readable decrypted text.
Re: Problem 059
Posted: Mon Jan 23, 2012 8:17 pm
by hampelratte
Hi everyone,
I think, I have solved this problem. I have decoded the text and can read it. The password I found, make sense in the context of the text, too. But it is not accepted. May I PM my solution to someone, so that I know, if it's correct or not?
BR
Henrik
Re: Problem 059
Posted: Mon Jan 23, 2012 8:45 pm
by jaap
hampelratte wrote:The password I found, make sense in the context of the text, too. But it is not accepted.
The question does not ask for the password but for the sum of the ascii values of the decoded text.
Re: Problem 059
Posted: Mon Jan 23, 2012 9:28 pm
by hampelratte
D'oh!
Thanks for telling me, to read the text more properly in the future

Re: Problem 059
Posted: Mon Jan 23, 2012 9:59 pm
by hampelratte
So, now that I know, what I have to do, I summed up the ASCII codes of every single char of the decrypted text. It still does not accept my answer. Don't know, what I'm doing wrong. Do I have to leave out characters? For example "space"?
Re: Problem 059
Posted: Tue Jan 24, 2012 2:08 am
by rayfil
You must add up the ascii value of ALL the characters of the decrypted text.
Re: Problem 059
Posted: Tue Jan 24, 2012 1:43 pm
by hampelratte
OK, that's what I did. I also calculated the value with different methods and got always the same value. Now I'm really confused.
Re: Problem 059
Posted: Tue Jan 24, 2012 2:00 pm
by jaap
hampelratte wrote:OK, that's what I did. I also calculated the value with different methods and got always the same value. Now I'm really confused.
Make sure you are not including for example a newline character at the end in your sum. Count how many character you are summing and compare with how many integers are given in the input file.
Re: Problem 059
Posted: Tue Jan 24, 2012 3:47 pm
by hampelratte
Thanks alot. Due to the cyclic use of the password, I increased my decoding loop by 3 on each run. And that's why I missed the last character. My value has now been accepted.
Re: Problem 059
Posted: Fri Aug 24, 2012 5:35 am
by Loers
what does it meant that the "encryption key consists of three lower case characters" ?
like if the key was aaa , then what is the numeric value of "aaa" ?
Re: Problem 059
Posted: Fri Aug 24, 2012 6:03 am
by TripleM
Did you see the first paragraph? The ASCII value of a is 97, so the key would be 97, 97, 97.
Re: Problem 059
Posted: Fri Aug 24, 2012 6:13 am
by Loers
yea but how do u i use that ??
like , if the key was "abc" which is 97,98,99
and the first few values in the file are 79,59,12,2,79,35
then I shouldcaculate
97 XOR 79
98 XOR 59
99 XOR 12
97 XOR 2
98 XOR 79
...
and so on ??