Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Hash Collision in Move Commitments

Summary: Move commitment hash can be broken due to small input space.

Details: The move commitments use keccak256(move, salt) where move is only 1-3. An attacker could pre-compute all possible hashes for each move value and break opponent's commitment.

Impact: Could determine opponent's move before reveal phase, completely breaking game fairness.

Recommendation: Use a more robust commitment scheme:

Updates

Appeal created

m3dython Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of Salt Uniqueness Enforcement

The contract does not enforce salt uniqueness

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.