This is due to the fact that the first byte of x & m can only affect the first byte of the cyphered text and only a slight affect on the second byte. If you solve the bytes in order, its not too bad!
Didactic Feedback Cipher Long 3
Didactic Feedback Cipher Long 3
I like this series
My program still pretty much worked for solving this problem as in Didactic Feedback Cipher Long 2. The only difference was now I had to try 4*65536 possibilities for each of the 4 bytes instead of 4*256.
This is due to the fact that the first byte of x & m can only affect the first byte of the cyphered text and only a slight affect on the second byte. If you solve the bytes in order, its not too bad!
[/code]
This is due to the fact that the first byte of x & m can only affect the first byte of the cyphered text and only a slight affect on the second byte. If you solve the bytes in order, its not too bad!
I still think you should do k = (k+c)%2**32. I don't have a good way to solve that automatically, other than brute force, though there are obvious ways to reduce the search space. After that, do k = (k+c+x)%2**32, which is harder still.
Scrambled Eggs is harder than all of these, though, in some ways at least.
Scrambled Eggs is harder than all of these, though, in some ways at least.
@adum: No, the not printable characters are not the first four characters. The bad
characters are in the middle of the decripted text. Therefore, my cracking program
searched for the smallest number of bad characters, which worked.
BTW: I've ignored the first four characters, because it is easier to guess them.
characters are in the middle of the decripted text. Therefore, my cracking program
searched for the smallest number of bad characters, which worked.
BTW: I've ignored the first four characters, because it is easier to guess them.
Err, is there any way to reconstuct them other than just guessing what they are? At least for the non-multiplicating ciphers you could have any four first characters by just using the proper initial k…Mütze wrote:BTW: I've ignored the first four characters, because it is easier to guess them.
Also, any value of m greater than 0xff yields the exact same result for the lowest byte of every long (ie every fourth char), not just approximately, or am I mistaken?
/me wonders how long all of these would habe taken if they were mod 26 and not mod 256 so you couldn't throw out 99.9984741% of all solutions just because of non-ASCII and non-printable chars…
Man, while the principals are the same as the prior cypher, I hadn't fully understood the endianness problems that arose... the tolerance for interference from overflows was large enough that I could approximate the answer. In number 3 the multiplication factor just baloons out the overflow, so you have to account for it precisely.
Took me a couple days of free time to understand and solve those overflow/endian effects, but well worth it. Thanks for the challenge/s adum, learned a bunch!
EDIT: Oh and the intentional typo... great idea. I still had problems to solve with my code at the 4th byte, but could see what looked like "your answer is XXX" the correct spelling was what my mind saw. I was tempted to guess it, but would've got it wrong.
Took me a couple days of free time to understand and solve those overflow/endian effects, but well worth it. Thanks for the challenge/s adum, learned a bunch!
EDIT: Oh and the intentional typo... great idea. I still had problems to solve with my code at the 4th byte, but could see what looked like "your answer is XXX" the correct spelling was what my mind saw. I was tempted to guess it, but would've got it wrong.