Skip to content

Commit 39bc403

Browse files
committed
Review comments
1 parent d2d5021 commit 39bc403

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

draft-davidben-tls-merkle-tree-certs.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,12 @@ The following procedure can be used to verify a subtree consistency proof.
516516

517517
Given a Merkle Tree over `n` elements, a subtree defined by `[start, end)`, a consistency proof `proof`, a subtree hash `node_hash`, and a root hash `root_hash`:
518518

519+
1. Check that `[start, end)` is a valid subtree ({{definition-of-a-subtree}}), and that `end <= n`. If either do not hold, fail proof verification.
519520
1. Set `fn` to `start`, `sn` to `end - 1`, and `tn` to `n - 1`.
520521
1. If `sn` is `tn`, then:
521-
1. Right-shift `fn`, `sn`, and `tn` equally until `fn` is `sn`.
522+
1. Until `fn` is `sn`, right-shift `fn`, `sn`, and `tn` equally.
522523
1. Otherwise:
523-
1. Right-shift `fn`, `sn`, and `tn` equally until `LSB(sn)` is not set or `fn` is `sn`
524+
1. Until `LSB(sn)` is not set or `fn` is `sn`, right-shift `fn`, `sn`, and `tn` equally.
524525
1. If `fn` is `sn`, set `fr` and `sr` to `node_hash`.
525526
1. Otherwise:
526527
1. If `proof` is an empty array, stop and fail verification.

0 commit comments

Comments
 (0)