From 3be1aba6abba326903dd31ed1c93546c79fe2e20 Mon Sep 17 00:00:00 2001 From: Robin Bryce Date: Tue, 6 Aug 2024 13:39:50 +0100 Subject: [PATCH 1/2] re issue#20 suggested clarification regarding leaf-index Depending on the audience the term leaf-index can be confusing. It is clear in the context of RFC9162. This PR seeks to make it clear in the inline example for readers that have not absorbed the details of RFC9162 --- draft-ietf-cose-merkle-tree-proofs.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/draft-ietf-cose-merkle-tree-proofs.md b/draft-ietf-cose-merkle-tree-proofs.md index 98d38d3..6ad1a5b 100644 --- a/draft-ietf-cose-merkle-tree-proofs.md +++ b/draft-ietf-cose-merkle-tree-proofs.md @@ -279,7 +279,7 @@ inclusion-proof = bstr .cbor [ ; tree size at current merkle root tree-size: int - ; index of leaf in tree + ; index of the leaf node in the tree leaf-index: int ; path from leaf to current merkle root @@ -288,6 +288,12 @@ inclusion-proof = bstr .cbor [ ~~~~ {: #rfc9162-sha256-cbor-inclusion-proof align="left" title="CBOR Encoded RFC9162 Inclusion Proof"} +The term `leaf-index` is used for alignment with the use established in {{RFC9162}} + +Note that {{RFC9162}} defines that verification MUST fail if leaf-index is >= tree-size, +and inclusion proofs are defined only for leaf nodes. +The identifying index of a leaf node is relative to all nodes in the tree size for which the proof was obtained. + ### Receipt of Inclusion In a signed inclusion proof, the previous merkle tree root, maps to tree-size-1, and is a detached payload. From eb9bdb7ad6917ff8e7246dad519833ac72ea1f07 Mon Sep 17 00:00:00 2001 From: Henk Birkholz Date: Tue, 6 Aug 2024 16:31:55 +0200 Subject: [PATCH 2/2] Update draft-ietf-cose-merkle-tree-proofs.md Co-authored-by: Steve Lasker --- draft-ietf-cose-merkle-tree-proofs.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/draft-ietf-cose-merkle-tree-proofs.md b/draft-ietf-cose-merkle-tree-proofs.md index f4760c7..925c167 100644 --- a/draft-ietf-cose-merkle-tree-proofs.md +++ b/draft-ietf-cose-merkle-tree-proofs.md @@ -293,8 +293,7 @@ inclusion-proof = bstr .cbor [ The term `leaf-index` is used for alignment with the use established in {{RFC9162}} -Note that {{RFC9162}} defines that verification MUST fail if leaf-index is >= tree-size, -and inclusion proofs are defined only for leaf nodes. +Note that {{RFC9162}} defines that verification MUST fail if leaf-index is >= tree-size, and inclusion proofs are defined only for leaf nodes. The identifying index of a leaf node is relative to all nodes in the tree size for which the proof was obtained. ### Receipt of Inclusion