Skip to content

Commit

Permalink
chore: address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
h5law committed Dec 22, 2023
1 parent 908fa6b commit cdde3cb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/SMT.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,13 @@ 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. 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.
the fact. If the hash were known by the caller of the method, after the last
update but prior to closing the trie 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 around 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 cdde3cb

Please sign in to comment.