Author |
Message |
Mütze
Joined: 26 Oct 2008 Posts: 23
|
|
Didactic Feedback Cipher Long 2 |
|
I'm quite sure, that i solved this challenge. But my password is not accepted.
BTW: There are some errors in the decrypted text, one of the typos is in the
password. Therefore I've tried several possibilities, but without success.
Any hint?
|
|
Sun Nov 02, 2008 5:41 pm |
|
 |
gfoot
Joined: 05 Sep 2007 Posts: 269 Location: Brighton, UK |
|
|
|
Make sure you've got the endianness right. With wrong endianness, you can get something which is very close to a solution, but has a few wrong letters. So try flipping your key before and after adding 'x' and moduloing.
|
|
Sun Nov 02, 2008 6:07 pm |
|
 |
Mütze
Joined: 26 Oct 2008 Posts: 23
|
|
|
|
I found my mistake.
It wasn't related to an endianness problem, but nevertheless your post helped me.
Thanks.
|
|
Sun Nov 02, 2008 8:28 pm |
|
 |
multiplan
Joined: 07 Nov 2008 Posts: 2
|
|
|
|
 |
 |
I found my mistake.
It wasn't related to an endianness problem, but nevertheless your post helped me.
Thanks. |
Lucky guy!
it seems, I've solve the callenge as the same way as you and have same problems as you:
a few "wrong" letters. And, by the way, I can read the sentence, but I have no idea, where the password should be in this sentence. In the callenges before, it was clearly indicated.
The hints form gfoot doesn't talk to me at all. Can you describe your mistake, please. So maybe it helps me to find my mistake.
|
|
Sat Nov 08, 2008 5:15 pm |
|
 |
MerickOWA
Joined: 07 Apr 2008 Posts: 182 Location: HkRkoz al KuwaiT 2019 HaCkEr 101 |
|
|
|
Since X and K are 4 bytes long, you have to take 4 bytes from the string and match it up with the 4 bytes of K.
 |
 |
c = (txt[i] -> txt[i + 3]) ^ k |
if you treated k as an array of 4 bytes from least to most significant, the question becomes... does txt[i] get xored with k[i] or k[i+3]? ... This is what is meant by endianness. If you get this wrong, you can get values for K and X which seem right, but as the algorithm decrypts the text, the mathematical addition which happens in the statement
 |
 |
k = (c + x) % 0x100000000 |
will not properly carry the overflow bit to the right bytes and will cause your k to be off by 1 on certain bytes which will start of affect your answer.
If your answer looks very close to right but with some corrupted text, try reversing how you match up the 4 bytes of text to the 4 bytes of k... (you'll also have to reverse the bytes of k and x) and see if that fixes your answer.
|
|
Sun Nov 09, 2008 2:04 am |
|
 |
abc
Joined: 02 Nov 2008 Posts: 12
|
|
|
|
Hi all!
First let me explain, that I'm no Englishman -> so, sorry for my bad english language.
Here is the challenge again:
k = {unknown 4-byte value}
x = {unknown 4-byte value}
for (i = 0; i < len(txt); i += 4)
c = (txt[i] -> txt[i + 3]) ^ k
print c
k = (c + x) % 0x100000000
Now my question:
How does this challenge work?
a) (Line: c = (txt[i] -> txt[i + 3]) ^ k)
First byte of Plaintext xor First byte of the 4byte long k
Second byte of Plaintext xor Second byte of the 4byte long k
Third byte of Plaintext xor Third byte of the 4byte long k
Fourth byte of Plaintext xor Fourth byte of the 4byte long k
then:
print as char first result, second result, third result, fourth result (Line: print c)
then: (Line: k = (c + x) % 0x100000000)
first byte of k = (first result + first byte of x) % 256
second byte of k = (second result + second byte of x) % 256
third byte of k = (third result + third byte of x) % 256
fourth byte of k = (fourth result + fourth byte of x) % 256
next bytes...
b) Alternative: (Line: c = (txt[i] -> txt[i + 3]) ^ k)
Byte 1 + Byte 2 + Byte 3 + Byte 4 of Plaintext results in one 4Byte Value.
This 4Byte Value xor 4Byte k
then:
print as char the result (Line: print c)
(But this will only print one char and it will not look meaningful...)
then: (Line: k = (c + x) % 0x100000000)
k=(result + 4Byte x) % 0x100000000
next bytes...
-------------------------------------------------------------------------------------------------------------------
I think that a) is the right method; but then it works with individual 4 Bytes - not with one 4Byte-Value. Modulo with 0x100000000 will not be meaningful with only one Byte.
I still have the "solution" with some wrong letters too, but I don't know how to go on.
Plz give me some explanation, how it works.
Thx in advance
abc
|
|
Wed Nov 19, 2008 6:50 pm |
|
 |
gfoot
Joined: 05 Sep 2007 Posts: 269 Location: Brighton, UK |
|
|
|
It's more like (b). "print c" means print the 4-byte value c as an 8-digit hex number.
The difference between this an (a) is that in the feedback stage, overflows carry from one byte to another. Which way the overflows carry is important, but I don't remember which way around it should be.
|
|
Wed Nov 19, 2008 7:03 pm |
|
 |
Andr3w
Joined: 04 Nov 2008 Posts: 40 Location: Germany |
|
|
|
Another question:
I got a sentence ... but there is no password in it ...
its directly adressed to me ... but no password ...
could anyone please give me a hint ?
|
|
Tue Dec 02, 2008 8:58 pm |
|
 |
Guderian
Joined: 25 Jan 2011 Posts: 18 Location: Greece |
|
|
|
i am still missing a few letters due to overflow. any idea how to deal with the overflow? thanks.
|
|
Fri Jan 28, 2011 4:57 pm |
|
 |
MindFreakz
Joined: 08 Dec 2010 Posts: 8
|
|
|
|
Well; there are two options; either fix the overflow or try to read/guess the solution based on what you know.
I do have to note; if you want to solve the next challenge as well, fixing the overflow here will give you a head start
|
|
Fri Jan 28, 2011 5:50 pm |
|
 |
Guderian
Joined: 25 Jan 2011 Posts: 18 Location: Greece |
|
|
|
i guessed the letter but you are right. I managed to fix the overflow. It was just as MerickOWA said. You have to get the endianess right. However the next challenge is much more tricky. I brute forced this one, but this trick isn't going to work there. 
|
|
Sun Jan 30, 2011 4:18 am |
|
 |
bartim
Joined: 02 Apr 2011 Posts: 1
|
|
|
|
Hi,
I am stuck in this challenge. There are 4 bytes of the plaintext XORed at once, but there are 189 bytes of encrypted text. Where is that last byte from?
Any tips for me?
(Sorry for my bad english, I'm german)
|
|
Sat Apr 23, 2011 2:03 pm |
|
 |
d6E8bBU5aXHm
Joined: 26 Oct 2008 Posts: 2
|
|
|
|
 |
 |
I am stuck in this challenge. There are 4 bytes of the plaintext XORed at once, but there are 189 bytes of encrypted text. Where is that last byte from?
|
This is confusing for me as well... Could someone comment on this, please?
|
|
Sun Jun 05, 2011 11:48 am |
|
 |
laz0r

Joined: 04 Feb 2010 Posts: 290 Location: Within the depths of Unix |
|
|
|
You can ignore the last byte if you like - I think tails miscalculated when he made the challenge 
_________________ There is no spoon. |
|
Sun Jun 05, 2011 5:52 pm |
|
 |
tails
Joined: 10 Jun 2008 Posts: 191 Location: Tokyo |
|
|
|
? I didn't make it.
|
|
Sun Jun 05, 2011 10:13 pm |
|
 |
|