FoolFox
October 16th, 2002, 08:11
Hello,
First of all, i'm not natively speaking english, so i may use incorrect
terms... I've a little problem about mathematics related to logical
operation....
I'm working on a serial protection, which basically is the following check :
x is the registration serial
the program compute a value y by adding value a to x ( y = x + a )
the program compute a value z by xoring x by a value b ( z = x xor b )
the program check if y xor z result of a value c
So, in order to compute the serial, i would use the three equations i got :
(1) : y = x + a
(2) : z = x xor b
(3) : c = y xor z
as i'm seeking a way to compute x :
from (1) : x = y - a (1')
from (3) : y = c xor z
(2) in (3) : y = c xor x xor b
if i replace the last result in (1') i can extract x :
x = ( c xor x xor b ) - a
x + a = c xor x xor b
x xor ( x + a ) = c xor b
x xor x + x xor a = c xor b <== Is that right ???
if (i recall correctly), x xor x = 0 then :
x xor a = c xor b
can i say, x = a xor b xor c ???
I've tried to make some search on the subject but either i've to dig under
millions of results or others are not helping for me yet...
Regards
FoolFox
First of all, i'm not natively speaking english, so i may use incorrect
terms... I've a little problem about mathematics related to logical
operation....
I'm working on a serial protection, which basically is the following check :
x is the registration serial
the program compute a value y by adding value a to x ( y = x + a )
the program compute a value z by xoring x by a value b ( z = x xor b )
the program check if y xor z result of a value c
So, in order to compute the serial, i would use the three equations i got :
(1) : y = x + a
(2) : z = x xor b
(3) : c = y xor z
as i'm seeking a way to compute x :
from (1) : x = y - a (1')
from (3) : y = c xor z
(2) in (3) : y = c xor x xor b
if i replace the last result in (1') i can extract x :
x = ( c xor x xor b ) - a
x + a = c xor x xor b
x xor ( x + a ) = c xor b
x xor x + x xor a = c xor b <== Is that right ???
if (i recall correctly), x xor x = 0 then :
x xor a = c xor b
can i say, x = a xor b xor c ???
I've tried to make some search on the subject but either i've to dig under
millions of results or others are not helping for me yet...
Regards
FoolFox