Replacement for XOR in CBC? In CBC mode, the XOR operation is used to combine the previous encrypted block with the current plaintext, to be used as the block to encrypt. Apart from other known disadvantages inherent to the mode itself, usage of XOR creates a collision vulnerability, where if there's a collision in the output, and the plaintext block can be known or guessed, then another plaintext block can be exposed, as noted in this answer: https://crypto.stackexchange.com/a/14325

This is due to the fact that from $E_k(P_i\oplus C_{i-1}) = E_k(P_j\oplus C_{j-1})$, it is immediately obvious that $P_i\oplus C_{i-1} = P_j\oplus C_{j-1}$, and due to the properties of XOR, we have that $P_j = P_i\oplus(C_{i-1}\oplus C_{j-1})$, therefore by XORing the ciphertexts that precede the collision and the guessed/known block, we can obtain the other plaintext block.

Of course, many other operations have that same problem (modular addition or subtraction, for example). Is there any other operation or function that can replace XOR, to make CBC mode not be vulnerable to this flaw?

Edit: To make the question clearer, I'd like to know of a reversible operation/function $\circ$ that takes $P_i$ and $C_{i-1}$ as input, and for which it's computationally infeasible to find $x$ such that $P_i\circ C_{i-1} = x\circ C_{j-1}$ when $P_i$, $C_{i-1}$ and $C_{j-1}$ are known. I guess that some cipher function $F_k(p)$ for which $k$ and $p$ are both the same width where $k = C_{i-1} || secret$ and $p = P_i$ would fit that purpose, but are there other simpler choices?

And while I'm here, is CTR mode safe against this kind of flaw?
Without completely restructuring how CBC mode works, that would not appear to be possible.

Your generalized CBC mode encryption would be defined as:

$$C_i = Enc_k( P_i \circ C_{i-1} )$$

for some operator $\circ$ (which need not be commutative, or even associative).

What this means is that, during decryption, we have:

$$Dec_k(C_i) = P_i \circ C_{i-1}$$

To make decryption, that is, the recovery of $P_i$ feasible, we must have an easy way, given $A, B$, to find the solution $x$ for $A = x \circ B$.

In the problem you're asking to be infeasble, that is, $P_i\circ C_{i-1} = x\circ C_{j-1}$, if we set $A = P_i\circ C_{i-1}$ and $B = C_{j-1}$, we see that must also be an easy problem (otherwise decryption would be difficult)