Page 1 of 1

Didatic Feedback Cipher Long 2

Posted: Fri Oct 17, 2008 9:42 pm
by MerickOWA
This challenge done on big endian or little endian machine?

or to be more specific..

(txt -> txt[i + 3]) ^ k

would txt correspond to the least significant byte of k or the most?

Posted: Fri Oct 17, 2008 9:50 pm
by niteria
I would be happy if I knew what "->" means.

Posted: Fri Oct 17, 2008 9:54 pm
by tails
Shhh! :D

The endianness is the most interesting factor of this challenge. The real key is whether you get aware of it, rather than finding the value of x. So why don't you try both?

Posted: Sun Oct 19, 2008 1:48 am
by therethinker
@niteria: hopefully I'm not disclosing too much info by saying this... but I don't think the point of the challenge was to understand the -> symbol, so I should be fine :P

Its best explained with an example... lets say txt = {0x12, 0xab, 0xcd, 0xef}, then txt[0] -> txt[3] would be 0x12abcdef.

Posted: Sun Oct 19, 2008 6:48 pm
by niteria
thanks, i was too lazy to guess it

Posted: Sun Oct 26, 2008 6:41 pm
by m!nus
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 // => mod to 1 byte length
wouldn't be the c in the second iteration be 3 plain bytes and one XORed? seems strange to me

Posted: Mon Oct 27, 2008 5:16 am
by tails
m!nus wrote: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 // => mod to 1 byte length
wouldn't be the c in the second iteration be 3 plain bytes and one XORed? seems strange to me

Maybe you are dividing instead of modding.