Determining collision resistance of a function? I am having trouble trying to understand if the function is collision resistant.  As I understand it, preimage resistance means that it is hard for an adversary to find two messages that produce the same digest, and second preimage resistance means it is hard for an adversary to find a message that produces the same digest for a given digest.  And collision resistance just implies both things.  So for the following problem, I don't understand how I would determine if the function exhibits any of the resistances?

The function f(x1,x2,...,xn) = x1 ⊕ x2 ⊕ ... ⊕ xn takes an input of n blocks, each m bits long, and produces an output of length m bits. Is this function: preimage resistant, second preimage resistant, or collision resistant?
As I understand it, preimage resistance means that it is hard for an adversary to find two messages that produce the same digest


Nope: collision resistance means that it is hard for an adversary to find two (distinct) messages that produce the same digest.  Preimage resistance means that, given a hash output, it is hard for an adversary to find a message that hashes to that value.


  second preimage resistance means it is hard for an adversary to find a message that produces the same digest for a given digest.


Close; second preimage resistance means that, given a message, it is hard to find another message that hashes to the same value.


  Is this function: preimage resistant...


Let's consider this; suppose we get a target value $M$; how hard is it to find inputs $x_1, x_2, ..., x_n$ with $f(x_1, x_2, ..., x_n) = x_1 \oplus x_2 \oplus ... \oplus x_n = M$ ?  Hint: suppose we select $x_2, ..., x_n$ to be 0, how difficult would it be to find an $x_1$ with $f(x_1, 0, 0, ..., 0) = M$?