Didactic Feedback Cipher Long 2
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?
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?
Lucky guy!Mütze wrote:I found my mistake.
It wasn't related to an endianness problem, but nevertheless your post helped me.
Thanks.
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.
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.
if you treated k as an array of 4 bytes from least to most significant, the question becomes... does txt get xored with k 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
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.
Code: Select all
c = (txt[i] -> txt[i + 3]) ^ k
Code: Select all
k = (c + x) % 0x100000000
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.
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 -> txt[i + 3]) ^ k
print c
k = (c + x) % 0x100000000
Now my question:
How does this challenge work?
a) (Line: c = (txt -> 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 -> 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
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 -> txt[i + 3]) ^ k
print c
k = (c + x) % 0x100000000
Now my question:
How does this challenge work?
a) (Line: c = (txt -> 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 -> 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
-
- Posts: 8
- Joined: Wed Dec 08, 2010 7:39 pm
-
- Posts: 2
- Joined: Sun Oct 26, 2008 6:00 pm