Back to Browse

Commit Reveal Voting Contract With Solidity Keccak-256 hash

1.2K views
Apr 10, 2022
8:50

Commit-reveal schemes are necessary in applications such as gambling, voting, and auctions. This video demonstrates how to implement a simple commit-reveal scheme using Solidity and Keccak-256. In the commit phase, users commit a hash of their vote. In the reveal phase, users provide the original vote and the salt. If the hashes match, then the smart contract counts the vote. Code: https://github.com/robertipk/Solidity-Contracts/blob/master/commit_reveal/CommitReveal.sol https://en.wikipedia.org/wiki/Commitment_scheme https://en.wikipedia.org/wiki/Salt_(cryptography)

Download

0 formats

No download links available.

Commit Reveal Voting Contract With Solidity Keccak-256 hash | NatokHD