its an extremely long cryptography equation for encoding messages, i've been working on it for the last two hours, and everytime i come to a conclusion close to this:

(C⊞K)⊕(V⊞K) = 0
i know both C and V, now i need to know K, what can i do? i don't really know how to interact with the XOR and the addition mod togather

2. Well, you can take it this way:

If $\displaystyle (C\otimes K)\oplus(V\otimes K)=0,$ then it must be that both $\displaystyle C\otimes K=0$ and $\displaystyle V\otimes K=0.$

Also, note that the XOR function is its own inverse. That is,

$\displaystyle a\otimes a=0.$ Moreover, if $\displaystyle a\otimes b=c,$ then you can left-multiply by $\displaystyle a$ as follows:

$\displaystyle a\otimes(a\otimes b)=a\otimes c$

$\displaystyle (a\otimes a)\otimes b=a\otimes c$ (associativity of XOR)

$\displaystyle 0\otimes b=a\otimes c$

$\displaystyle b=a\otimes c$.

Hence, you must have

$\displaystyle V\otimes(V\otimes K)=V\otimes 0=V$

$\displaystyle K=V.$

3. Note: first post was entirely incorrect. Sorry about that.

4. i know that XOR is its own inverse, however, in there there are 2 operators ... and one of the is an addition mod

okay, if this is too far fetched, is it possible to solve this :
(C+K)⊕(V+K) = 0
⊕ : XOR

5. no problem mate, i appreciate you trying to help, i'll take whatever i can get

6. Did you check my edited post # 2?

i didnt really think enough about the 0, and i see where your going at, i should have mentioned earlier that this is the equation:
P = (C⊟K )⊕(V⊟K )

⊟ : Modular Subtraction
⊕ : XOR
the right hand side was quite long but i can simplify it to a 64 bit block P, now i need to tell K (which is the key)

8. Define modular subtraction. If it's subtraction modulo 2 (as in normal boolean logic), then it is the same as addition modulo 2. Is that correct?

9. subtraction modulo 2^64

also all of the variables here are blocks of 64 bit data

10. And the XOR is bitwise XOR?

11. yes, bitwise xor . i apologize for not being more specific

12. Well, let's assume a distributive property:

$\displaystyle (C-K)\oplus(V-K)=(C\oplus V)-(C\oplus K)-(K\oplus V)+(K\oplus K)=(C\oplus V)-(C\oplus K)-(K\oplus V).$

Here you can see that I've got an inverse for the modular subtraction, which is modular addition.

Then $\displaystyle P-(C\oplus V)=-K\oplus(C+V),$ or

$\displaystyle (C\oplus V)-P=K\oplus(C+V),$ and hence

$\displaystyle (C+V)\oplus((C\oplus V)-P)=K.$

This is probably too simple-minded, but maybe it'll give you an idea. What do you think?

13. i am not really certain the the distributive property works here, and that is precisely the problem, i have nothing to work on here ... how about this:
given these two equations, do you think there is a different approach to solve for X,Y:
X=(V⊟Y)⊕P
X=(D⊟Y)⊕P

again, all data here are 64 bit data, ⊕ is bitwise XOR, and ⊟ is subtraction mod 2^64

14. Hmm. A preliminary computation yields that we don't have the distributive property. At least, not exactly. Take $\displaystyle A = 1010_{2}$, $\displaystyle B = 0011_{2}$, $\displaystyle C = 0001_{2}$. Then

$\displaystyle A\otimes(B-C)=A\otimes(0010_{2})=1000_{2},$ whereas

$\displaystyle (A\otimes B)-(A\otimes C)=1001_{2}-1011_{2}=-2_{10}=14_{10}=1110_{2}\not=1000_{2}.$

I think I'm out of my league now. Let me ask some of our gurus for help. Perhaps undefined or emakarov could help out.

15. Originally Posted by hamzeeco

i didnt really think enough about the 0, and i see where your going at, i should have mentioned earlier that this is the equation:
P = (C⊟K )⊕(V⊟K )

⊟ : Modular Subtraction
⊕ : XOR
the right hand side was quite long but i can simplify it to a 64 bit block P, now i need to tell K (which is the key)
Interesting discussion on this thread, and I certainly don't claim to be an expert on any of this, but I see a problem that I'll explain by example.

Consider 6-bit data, where our operations are mod 2^6.

Let C = 101010
Let V = 011110

Now consider K1 = 001000 and K2 = 000010

So

A1 = C - K1 = 100010
B1 = V - K1 = 010110

P1 = A1 XOR B1 = 110100

A2 = C - K2 = 101000
B2 = V - K2 = 011100

P2 = A2 XOR B2 = 110100

So as you can see two different values of K yielded the same P. From this I am led to believe that we cannot determine K in general without guesswork.

Originally Posted by Ackbeet
Let me ask some of our gurus for help. Perhaps undefined or emakarov could help out.
Didn't see this until after I made my post. Very flattered but I think guru is too strong of a word in my case!

Page 1 of 2 12 Last