Skip to content

Commit 6d40c1c

Browse files
committed
More straightforward definition of subtree
1 parent cad80fe commit 6d40c1c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ Given a non-negative integer `n`,
230230

231231
* `POPCOUNT(n)` refers to the number of set bits in `n`'s binary representation.
232232

233+
* `BIT_CEIL(n)` refers to the smallest power of 2 that is greater or equal to `n`.
234+
233235
To *right-shift* a non-negative integer `n` is to shift each bit in its binary representation to one lower position, discarding the least-significant bit. Equivalently, it is the floor of `n` divided by 2. Given non-negative integers `a` and `b`, `a >> b` refers to `a` right-shifted `b` times.
234236

235237
## Terminology and Roles
@@ -405,7 +407,7 @@ Given an ordered list of `n` inputs, `D_n = {d[0], d[1], ..., d[n-1]}`, {{Sectio
405407
A *subtree* of this Merkle Tree is defined by two integers, `start` and `end`, such that:
406408

407409
* `0 <= start < end <= n`
408-
* If `s` is the smallest power of two that is greater than or equal to `end - start`, `start` must be a multiple of `s`
410+
* `start` is a multiple of `BIT_CEIL(end - start)`
409411

410412
Note that, if `start` is zero, the second condition is always true.
411413

0 commit comments

Comments
 (0)