crytic / crytic/slither

Add a detector for singly-hashed Merkle leaves using OZ's MerkleProof library

Open
#2,675 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

### Describe the desired feature

https://www.rareskills.io/post/merkle-tree-second-preimage-attack

skip to the image with the green underlines. We should have a detector that can identify if the `leaf` variable has had only 1 keccack used to generate it, or none at all.

The case where only 1 keccak has been used should be a very good heuristic. The case where no keccaks have been used would be good but likely to have more false positives.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.