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).
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.