Skip to content

Commit

Permalink
chore: clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
h5law committed Dec 22, 2023
1 parent 72f03cc commit 908fa6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/SMT.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,12 @@ NB: If the hash provided to the `ClosestProof` function is known prior to the
tree being filled and closed there is the possibility of placing a leaf where
the hash will lead. If used **as intended** the hash provided should **not** be
known prior to calling the method and the tree should not be updateable after
the fact.
the fact. If the hash were known prior to closing the tree and not inserting
into it anymore a leaf could be inserted into the tree in such a way that it
would always be produced from the `ClosestProof` method (as it is deterministic).
When used as a pseudo-random challenge this is a vulnerability and if used in
this manner care should be taken when and how the hash used in the proof is
decided upon and when it is provided to the caller of the method.

### Compression

Expand Down

0 comments on commit 908fa6b

Please sign in to comment.