I'm implementing Pedersen commitment scheme in order to enhance entropy of a pre-image of a hash. I'm using secp256k1 for my curve parameters.
I am following naming conventions from here: What is a Pedersen commitment?
I am performing a commit $C = (m, r)$ and then another commit $C' = (m, r')$
Then I do the blind equality check $C - C' = (r - r')G.$
I got the blind equality check working, but only for some values of $r$. It looks like it works better when $r$ is a prime or when $r$ and $r'$ don't have common divisors.
What's the proper way to select $r$ values? Right now I am just selecting random values in between