Code change:
properties across registered proof types. For example, 2 different merkle tree based verifiable data structures <del> might both support proofs of inclusion.  Protocols requireing proof of inclusion ought to be able to preserve their functionality, while </del> <ins> might both support proofs of inclusion.  Protocols requiring proof of inclusion ought to be able to preserve their functionality, while </ins> switching from one verifiable data structure to another, so long as <del> both structures upport the same proof types. </del> <ins> both structures support the same proof types. </ins> <del> 5. </del> <ins> 4.1. </ins> This document establishes a registry of verifiable data structure proof types tags, with the following initial contents: <del> 5.1. </del> <ins> Editors note: The registry requirements needs to address the case of multiple proofs of a given type. 4.2. </ins> Inclusion proofs provide a mechanism for a verifier to validate set membership. <del> The integer identifier for this "verifiable-data-structure-proof- type" is TBD_2.  The string identifier for this "verifiable-data- structure-proof-type" is "inclusion proof". </del> <ins> The integer identifier for this Proof Type is TBD_2.  The string identifier for this Proof Type is "inclusion". </ins> sec-rfc9162-sha256-inclusion-proof provides a concrete example. <del> 5.2. </del> <ins> 4.3. </ins> Consistency proofs provide a mechanism for a verifier to validate the consistency of a verifiable data structure. <del> The integer identifier for this "verifiable-data-structure-proof- type" is TBD_3.  The string identifier for this "verifiable-data- structure-proof-type" is "consistency proof". </del> <ins> The integer identifier for this Proof Type is TBD_3.  The string identifier for this Proof Type is "consistency". </ins> sec-rfc9162-sha256-consistency-proof provides a concrete example. <del> 5.3. </del> <ins> 5. </ins> <del> This section defines how to map the data structures described in RFC9162 to the terminology defined in this document, using cbor and </del> <ins> This section defines how the data structures described in RFC9162 are mapped to the terminology defined in this document, using cbor and </ins> cose. <del> 5.3.1. </del> <ins> RFC9162_SHA256 requires the following: TBD_1 (verifiable-data-structure): 1, the integer representing the RFC9162_SHA256 verifiable data structure algorithm. TBD_2 (inclusion-proof): a bstr representing the RFC9162_SHA256 inclusion proof TBD_3 (consistency-proof): a bstr representing the RFC9162_SHA256 consistency proof 5.1. </ins> <del> The integer identifier for this "verifiable-data-structure" is 1. The string identifier for this "verifiable-data-structure" is </del> <ins> The integer identifier for this Verifiable Data Structure is 1.  The string identifier for this Verifiable Data Structure is </ins> "RFC9162_SHA256". <del> 5.3.2. </del> <ins> See sec-verifiable-data-structure-algorithms. See RFC9162, 2.1.1.  Definition of the Merkle Tree, for a complete description of this verifiable data structure. 5.2. See RFC9162, 2.1.3.1.  Generating an Inclusion Proof, for a complete description of this verifiable data structure proof type. The cbor representation of an inclusion proof for RFC9162_SHA256 is: 5.2.1. In a signed inclusion proof, the previous merkle tree root, maps to tree-size-1, and is a detached payload. Other specifications refer to signed inclusion proofs as "receipts", profiles of proof signatures are encouraged to make additional protected header parameters mandatory. TODO: reference to scitt receipts. </ins> <del> See RFC9162, 2.1.1.  Definition of the Merkle Tree. </del> <ins> The protected header for an RFC9162_SHA256 inclusion proof signature is: </ins> <del> 5.3.2.1. </del> <ins> alg (label: 1): REQUIRED.  Signature algorithm identifier.  Value type: int / tstr. verifiable-data-structure (label: TBD_1): REQUIRED. verifiable data structure algorithm identifier.  Value type: int / tstr. crit (label: 2): OPTIONAL.  Criticality marker.  Value type: [ +label ] Editors note: Recommend removing "crit" and mandating "kid".  See issue 21 [1]. </ins> <del> The cbor representation of a merkle root is the bytestring represenation of MTH. </del> <ins> The unprotected header for an RFC9162_SHA256 inclusion proof signature is: </ins> <del> 5.3.2.2. </del> <ins> inclusion-proof (label: TBD_2): REQUIRED. proof type identifier. Value type: bstr. </ins> <del> See RFC9162, 2.1.3.1.  Generating an Inclusion Proof. </del> <ins> The payload of an RFC9162_SHA256 inclusion proof signature is: </ins> <del> The cbor representation of the inclusion proof is: </del> <ins> A previous merkle tree hash as defined in RFC9162. </ins> <del> 5.3.2.3. </del> <ins> The payload MUST be detached. </ins> <del> See RFC9162, 2.1.4.1.  Generating a Consistency Proof. </del> <ins> Detaching the payload forces verifiers to recompute the root from the inclusion proof signature, this protects against implementation errors where the signature is verified but to root does not match the inclusion proof. </ins> <del> The cbor representation of the consistency proof is: </del> <ins> The following example needs to be converted to proper CDDL: 5.3. See RFC9162, 2.1.4.1.  Generating a Consistency Proof, for a complete description of this verifiable data structure proof type. The cbor representation of a consistency proof for RFC9162_SHA256 is: </ins> Editors note: tree-size-1, could be ommited, if an inclusion-proof is always present, since the inclusion proof contains, tree-size-1. <del> 5.4. </del> <ins> 5.3.1. In a signed consistency proof, the latest merkle tree root, maps to tree-size-2, and is an attached payload. </ins> <del> In a signed inclusion proof, the previous merkle tree root, maps to tree-size-1, and is a detached payload.  In a signed consistency proof, the latest merkle tree root, maps to tree-size-2, and is an attached payload. </del> <ins> The protected header for an RFC9162_SHA256 consistency proof signature is: alg (label: 1): REQUIRED.  Signature algorithm identifier.  Value type: int / tstr. verifiable-data-structure (label: TBD_1): REQUIRED. verifiable data structure algorithm identifier.  Value type: int / tstr. crit (label: 2): OPTIONAL.  Criticality marker.  Value type: [ +label ] Editors note: Recommend removing "crit" and mandating "kid".  See issue 21 [2]. The unprotected header for an RFC9162_SHA256 consistency proof signature is: consistency-proof (label: TBD_2): REQUIRED. proof type identifier. Value type: bstr. The payload of an RFC9162_SHA256 consistency proof signature is: The latest merkle tree hash as defined in RFC9162. The payload MUST be attached. The following example needs to be converted to proper CDDL: </ins> 6.

Related discussion:
text: This PR build on and attempts to clarify what is generic vc what is specific to RFC9162 encodings
Mostly improves on the earlier version, I like the generality it allows for. A couple of larger questions in here amongst the suggestions