Let $M$ be an odd prime and $\chi$ be a primitive character $\bmod M$. What is the evaluation of the character sum, $$\sum_{b\bmod M}\chi(b)\left(\frac{b^2-1}{M}\right), $$ where $(\frac{.}{M})$ is the quadratic residue symbol.
Observation: When $\chi$ is the quadratic residue symbol, the above character sum equals $\#\{\text{ points on } y^2=x^3-x \text{ over } \mathbb{F}_M \} - M$.