23. If the two real roots of the equation $8 x^{2}+2 k x+k-1=0$ are $x_{1} 、 x_{2}$, and they satisfy $x_{1}^{2}+x_{2}^{2}=1$, then the value of $k$ is ( ).
(A) -2 or 6
(B) -2
(C) 6
(D) 4
23. B.

Given $x_{1}+x_{2}=-\frac{k}{4}, x_{1} x_{2}=\frac{k-1}{8}$, then
$$
x_{1}^{2}+x_{2}^{2}=\left(-\frac{k}{4}\right)^{2}-2 \times \frac{k-1}{8}=\frac{k^{2}-4 k+4}{16}=1 \text {. }
$$

Solving for $k$ gives $k=-2$ or 6.
$$
\text { Also, } \Delta=\left(-\frac{k}{4}\right)^{2}-4 \times \frac{k-1}{8}=\frac{k^{2}-8 k+8}{16} \geqslant 0 \text {, }
$$

Thus, $k=-2$.