I'm writing a smart contract where participants are asked to submit a value (1 to 1000000) in the submission period, and then reveal what that value is in the revealing period.
In order to hide it from other participants, I'm thinking of using the built-in SHA3 hash function.
Originally I thought of simply asking the player to provide a SHA3 hash of the value, but then realized anyone could figure out the original value, since it's easy to compute SHA3 hashes of all numbers from 1 to 1000000 and just find the matches.
The alternative is to concatenate the number with an arbitrary local value, send the hash of that, and in the reveal phase ask the participant to provide both values.
Is this method workable? Is this a standard way of hiding moves in Ethereum? Are there better alternatives?