I'm presented with these 2 following commitment schemes $Commit(x;r) = (c,k) $.
This is presented as bad (not hiding)
$Commit(x;r) = (H(x), x)$
So, not hiding means that attacker can deduce $x$ from $H(x)$ in that case. I don't see how this is possible except for an exhaustive search of $H$ ? If this is why the scheme is bad, then can't we do the same for any kind of commitment ? Or is it because $k = x$ ? Since $k$ should arrive to receiver only after he sends his value, I don't see how this is a problem.
This is presented as ok
$Commit(x;r) = (H(r||x), (x, r))$ where $||$ denotes the concatenation of strings.
It seems to me that by the same logic we can find $x||r$ and deduce something about x.
So, what exactly is the difference between these 2 schemes and why is one not hiding while the other one is ok ?