Let's say Alice and Bob are playing a game where Bob is trying to guess a number Alice has chosen.
Alice chooses a key $K$ and a number $N$ at random and performs $C=Commit(K, N)$ where $Commit(K, N)=h(h(K) \| h(N))$.
$h()$ is a collision-resistant hash function and $K$ and $N$ can be of any length.
Bob guesses $N'$ and sends it to Alice who responds with $K$ and $N$.
Bob can now do $C'=Decommit(K, N)$ which in our case is the same as Commit and verify that $C=C'$.
As I understand it the scheme above is perfectly hiding and computationaly binding. Is there a way to make the scheme both perfectly binding and perfectly hiding, or is there another scheme that has these properties?
I'm new to cryptography so I apologize in advance if I don't get some of the concepts right.