What Is the Cryptographic Primitive Used to Create the “Commitment” in These Schemes?
The most common cryptographic primitive used to create the "commitment" in commit-reveal schemes is a cryptographic hash function , such as SHA-256 or Keccak-256. The commitment is typically a hash of the actual order details (price, amount, asset) concatenated with a secret random number (a "salt" or "nonce").
This hash is computationally infeasible to reverse, hiding the order details, but any change to the original order or the salt will result in a completely different hash, ensuring the user cannot change their mind later.