I have defined the following commitment scheme and would like to prove that it is statistically hiding and computationally binding, but I'm not sure if my proof is accurate:
For $h$, a collision resistant hash function, I defined the following scheme:
$C(b, 1^n)$:
$r \leftarrow U_n$ // random uniform string of length $n$
$s \leftarrow U_n$
Output $(h(s), r, \langle r, s \rangle \oplus b)$
Proofs:
Computationally binding:
Let $A$ be a PPT algorithm. Then:
$$ \Pr_{(s,s')\leftarrow A(1^n)}\big[ \langle r, s \rangle \oplus 0 = \langle r, s \rangle \oplus 1 \text{ }\wedge \text{ } h(s)=h(s')\big] \leq \Pr_{(s,s')\leftarrow A(1^n)}\big[ h(s)=h(s')\big] \leq negl(n)$$
where the last transition is since the $h$ is assumed to be a collision resistant hash function.
Statistically hiding (~ denotes statistically indistinguishable from):
$$ C(0) = (h(s), r, \langle r, s \rangle \oplus 0) = (h(s), r, \langle r, s \rangle) \sim (h(s), r, U) \sim (h(s), r, U\oplus 1) \sim (h(s), r, \langle r, s \rangle \oplus 1)=C(1)$$
I am mainly concerned with the computationally binding part since this is not a family of hash functions, so the last transition doesn't feel right.
Is this right? Any comments would be greatly appreciated.