Say we have two chunks of data $X$ and $Y$, which may be of different sizes, is there a non-trivial function $hash$, and operation $*$, such that:
$$hash(X+Y) = hash(X) * hash(Y)$$
...where $+$ is concatenation, and $*$ is associative (but not necessarily commutative)?
Clearly $hash$ being the identity function, with $*:=+$, satisfies this. However, what if we put usual constraints on $hash$ -- say, its output is always $n$-bits, where $n$ is small -- and $*$ has to be reasonably economical?
My intuition is saying that no such $(hash,*)$ exists, because:
In the general case, there would be a loss of entropy in hashing and I don't believe this can be deterministic.
Merkle trees are a thing, which implies there's no better option.
(n.b., I realise "linear", in the linear algebra sense, isn't the correct word to use here, but for want of a better term!)