Skip to main content

Why Is the Inclusion of a “Salt” or “Nonce” Critical in the Commitment Process?

The inclusion of a random salt (or nonce) prevents a brute-force attack on the commitment. Without a salt, an attacker could calculate the hashes of all possible simple orders (e.g.

"buy 1 ETH at $2000") and compare them to the on-chain commitment, thus revealing the order. The salt makes the commitment unique and unpredictable, ensuring that the attacker cannot guess the hidden order details by simply pre-calculating common transaction hashes.

What Is the Concept of a ‘Pre-Commitment’ and How Does It Differ from the ‘Commitment’ Step?
Can ZKPs Be Used to Hide the Identity of the Trader as Well as the Trade Details?
Why Is the Inclusion of a ‘Salt’ or Random Secret Number Essential in the Commitment Hash?
What Is a “Key Derivation Function” and Where Is It Used in Crypto Security?