You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-davidben-tls-merkle-tree-certs.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -727,7 +727,7 @@ Given a Merkle Tree over `n` elements, a subtree defined by `[start, end)`, a co
727
727
1. If `sn` is `tn`, then:
728
728
1. Until `fn` is `sn`, right-shift `fn`, `sn`, and `tn` equally.
729
729
1. Otherwise:
730
-
1. Until `LSB(sn)` is not set or `fn` is `sn`, right-shift `fn`, `sn`, and `tn` equally.
730
+
1. Until `fn` is `sn` or `LSB(sn)` is not set, right-shift `fn`, `sn`, and `tn` equally.
731
731
1. If `fn` is `sn`, set `fr` and `sr` to `node_hash`.
732
732
1. Otherwise:
733
733
1. If `proof` is an empty array, stop and fail verification.
@@ -1818,15 +1818,17 @@ Step 2 initializes `fn` (first number), `sn` (second number), and `tn` (third nu
1818
1818
1819
1819
Steps 3 and 4 then skip to the starting node, described in {{consistency-proof-structure}}. The starting node may be:
1820
1820
1821
-
* The entire subtree `[start, end)` if `[start, end)` is directly contained in the tree. This will occur if `end` is `n`, or if `[start, end)` is full.
1821
+
* The entire subtree `[start, end)` if `[start, end)` is directly contained in the tree. This will occur if `end` is `n` (step 3), or if `[start, end)` is full (exiting step 4 because `fn` is `sn`).
1822
1822
1823
-
* Otherwise, the highest full subtree along the right edge of `[start, end)`.
1823
+
* Otherwise, the highest full subtree along the right edge of `[start, end)`. This corresponds to the process exiting step 4 because `LSB(sn)` is not set.
1824
1824
1825
-
In the first case, `fn` will equal `sn` after truncation. Step 5 will then initialize the hashes to `node_hash`. The consistency proof does not need to include a separate copy of `node_hash`.
1825
+
Steps 5 and 6 initialize the hashes `fr` and `sr`:
1826
1826
1827
-
In the second case, `fn` is less than `sn`. Step 6 will then initialize the hashes to the first value in the consistency proof.
1827
+
* In the first case above, `fn` will equal `sn` after truncation. Step 5 will then initialize the hashes to `node_hash` because consistency proof does not need to include the starting node.
1828
1828
1829
-
From there, step 7 incorporates the consistency proof into `fr` and `sr`:
1829
+
* In the second case above, `fn` is less than `sn`. Step 6 will then initialize the hashes to the first value in the consistency proof.
1830
+
1831
+
Step 7 incorporates the remainder of the consistency proof into `fr` and `sr`:
1830
1832
1831
1833
* All hashes are incorporated into `sr`, with hashing on the left or right determined the same as in inclusion proof evaluation.
0 commit comments