This was designed to get simple collision resistance with incremental checksumming.Does this add security against chosen input attacks, and if so how much?
Here's good news and bad news.
First the good news: your mapping from $[v_0, v_1, ...]$ toNo, if $C$$R_c$ is an "almost universal hash function"public, thatit is, for any two distinct messages, the probability of them hashing easy to the same value is provably tiny (assuming $R$ is chosen uniformly random)find collisions. In particular, if the degree of the polynomials is $n$, then the probability The idea is at most $n / p$to find a simultaneous collision on both (where$R$ and $p$ is your 256 bit prime) [1]$C$.
One cavaet: itHere is important that distinct inputs map to different polynomials; for example, if you allow varying input lengths, then $[1, 1]$ will obviously collide with $[1, 1, 0]$ with the simple mapping function you have. This can be addressed by using a slightly more complex mapping function, or just insisting that the inputs must be a fixed length.one approach:
Start with a provisional input $v_i$; set the lower three inputs $v_3, v_2, v_1$ to 0, and everything above that arbitrarily (we won't change those values)
Compute the value $R = H( \sum_{i=0}^{|V|} v_i * R_c^i)$
Now, for any arbitrary constant $c$, we can reset $v_2 = c$, $v_1 = -c(R + R_c)$, $v_0 = cRR_c$
NowFor any such value of $c$, the bad news: ifevaluating the attacker can seefunction gives us the same value $C$ of a known input, he can recover $R$ efficiently (actually, generate a small set of values that contains the correctbecause $R$ value$cR_c^2 - c(R + R_c)R_c + cRR_c = 0$, consistent with our initial test evaluation), and from there, he can easily generate collisionsthus gives the same $H$ value (or preimages, should he so desire).
Hence, if youbecause $cR^2 - c(R + R_c)R + cRR_c = 0$ and all higher order terms are using this function in a way where the attacker can observe the outputs, it's not at all secure.same)
[1]: Note: it is important that $p$ be prime; your notationBy choosing two different values of $\mathbb{F}_p$ indicates that it is, however to be clear$c$, it must bethis gives us a collision.