Double xor

I don’t understand xor completely, let’s say, so if I have 2 key strings x and y
x: "blah"
y: "voop"
and a plaintext string p
p: "food"
And say I xor p by both x and y, making cryptogram c
c: p ^ x ^ y;
can I get p again by xoring c by x and y again? Or is it going to end up messed up because of it being 2 separate xors instead of 1??
p: c ^ x ^ y;
XOR is a completely reversible operation, and commutative as well. So, yes, you can get your plaintext back by simply applying the XOR patterns again, in any order.

BTW, complexity has to do with how much processing has to be done with respect to the number of inputs.

Your examples are all four characters long, reducing any complexity calculation to O(1).
Awesome! Thanks!
BTW, complexity...

What am I reducing it from? How could it get bigger?
Sorry, I was on my phone when I answered your question, and I misread your initial statement as “I don’t understand xor complexity”.

Complexity is a measure of how much processing increases with number of inputs provided. Your inputs appear to be a fixed length, so the complexity is also fixed == O(1).

Don’t worry about it now. You’ll study it in due time.
Sorry isn't good enough. Talking on a phone while in class is setting a very bad example - and leads to errors :(
Oh! Yes I see now ok. I’ve heard of complexity(actually funnily enough from an earlier post by you), but I don’t know as you saw lol. Thanks!
Of course! You rock, so no worries.

It is just really hard to read this forum on a phone.
Thanks. :)
Topic archived. No new replies allowed.