Clarify language in consistency proof verification algorithm - #139
Merged
Conversation
* Simplify language for right-shift loops at 1.4.3 and 2.6.2.3. `sn` must be non-zero entering each of the loops, so the `sn = 0` exit condition can never occur. * Move 'until' to the start of the loop lines to clarify that the condition should be checked before entering the loop. The previous language (inherited from RFC 9162) is slightly more ambiguous and could be interpreted as right-shifting and _then_ checking the condition. * Make some other minor formatting tweaks and use language similar to RFC 9162 for the comparisons at the end.
lukevalenta
force-pushed
the
lvalenta/verify-consistency-proof-language
branch
from
August 28, 2025 03:30
ce69670 to
09296f2
Compare
lukevalenta
added a commit
to cloudflare/azul
that referenced
this pull request
Aug 28, 2025
Use language from ietf-plants-wg/merkle-tree-certs#139 which aims to clarify some ambiguities.
davidben
approved these changes
Aug 28, 2025
| 1. If `sn` is `0`, then stop iteration and fail the proof verification. | ||
| 2. Set `r` to `HASH(0x01 || p || r)`. | ||
| 3. If `LSB(sn)` is not set, the right-shift `sn` until either `LSB(sn)` is set or `sn` is zero. | ||
| 3. Until `LSB(sn)` is set, right-shift `sn`. |
Collaborator
There was a problem hiding this comment.
For myself: sn is non-zero by (1), so LSB(sn) will eventually be set.
| 1. If `fn < sn`, set `fr` to `HASH(0x01 || c || fr)`. | ||
| 2. Set `sr` to `HASH(0x01 || c || sr)`. | ||
| 3. If `LSB(sn)` is not set, then right-shift each of `fn`, `sn`, and `tn` equally until either `LSB(sn)` is set or `sn` is 0. | ||
| 3. Until `LSB(sn)` is set, right-shift `fn`, `sn`, and `tn` equally. |
Collaborator
There was a problem hiding this comment.
For myself: tn is non-zero by 2.6.1. (2) implies then sn is non-zero, which means the LSB will eventually be set.
lukevalenta
added a commit
to cloudflare/azul
that referenced
this pull request
Sep 2, 2025
Use language from ietf-plants-wg/merkle-tree-certs#139 which aims to clarify some ambiguities.
sys-ravenmki98
added a commit
to sys-ravenmki98/azul
that referenced
this pull request
Sep 29, 2025
Use language from ietf-plants-wg/merkle-tree-certs#139 which aims to clarify some ambiguities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
snmust be non-zero entering each of the loops, so thesn = 0exit condition can never occur.