Skip to content

Clarify language in consistency proof verification algorithm - #139

Merged
davidben merged 1 commit into
mainfrom
lvalenta/verify-consistency-proof-language
Aug 28, 2025
Merged

Clarify language in consistency proof verification algorithm#139
davidben merged 1 commit into
mainfrom
lvalenta/verify-consistency-proof-language

Conversation

@lukevalenta

@lukevalenta lukevalenta commented Aug 28, 2025

Copy link
Copy Markdown
Collaborator
  • 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
lukevalenta requested a review from davidben as a code owner August 28, 2025 03:28
* 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
lukevalenta force-pushed the lvalenta/verify-consistency-proof-language branch from ce69670 to 09296f2 Compare August 28, 2025 03:30
@lukevalenta
lukevalenta requested a review from bwesterb August 28, 2025 03:30
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.
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`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@davidben
davidben merged commit 84c5fff into main Aug 28, 2025
2 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants