| Internet-Draft | RFC 9162 SHA-384 and SHA-512 Receipts | November 2026 |
| Taylor | Expires 18 May 2027 | [Page] |
RFC 9942 defines COSE Receipts and registers one verifiable data structure, RFC9162_SHA256, the binary Merkle tree of RFC 9162 instantiated with SHA-256. This document registers two more: RFC9162_SHA384 and RFC9162_SHA512, the same tree instantiated with SHA-384 and SHA-512, each with its inclusion and consistency proof types. The tree construction, proof formats, and verification algorithms are unchanged apart from the hash function and the resulting digest size.¶
This note is to be removed before publishing as an RFC.¶
Discussion of this document is invited on the COSE Working Group mailing list (cose@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/cose/.¶
The test vectors in Appendix A were produced by the author's reference implementation and reproduced by a second, separately written implementation of Section 2.1 of [RFC9162]; both inclusion and consistency proofs verify with the algorithms of Sections 2.1.3.2 and 2.1.4.2 of [RFC9162]. Independent reproduction by other implementers is welcome.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 18 May 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
[RFC9942] defines how proofs from a verifiable data structure are carried in COSE Receipts, and defines the RFC9162_SHA256 verifiable data structure based on the binary Merkle tree of [RFC9162]. Section 4.4.1 of [RFC9942] states that where a specification supports a choice of hash algorithm, a separate IANA registration must be made for each supported algorithm.¶
Some deployments require a hash function with a larger output than SHA-256. Examples include environments that follow national security algorithm guidance such as [CNSA2], which specifies SHA-384 or SHA-512, and transparency logs that are expected to remain in service for decades. Such deployments can use the RFC 9162 tree with either function, but they cannot currently express that choice in a COSE Receipt.¶
This document defines RFC9162_SHA384 and RFC9162_SHA512 together, so that deployments following such guidance have both permitted functions available from one specification. It is intentionally minimal: it changes only the hash function. Implementations of RFC9162_SHA256 can support both by parameterizing the hash function and the digest length.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses the terms verifiable data structure, inclusion proof, consistency proof, and receipt as defined in [RFC9942].¶
In this document, HASH denotes the hash function of the verifiable data structure in use and HASH_SIZE its output length in bytes, as given in Table 1.¶
Each verifiable data structure defined here is the binary Merkle tree defined in Section 2.1 of [RFC9162], with the hash function HASH instantiated as shown below. Both functions are specified in [FIPS180-4].¶
| Name | vds value | HASH | HASH_SIZE (bytes) |
|---|---|---|---|
| RFC9162_SHA384 | TBD1 | SHA-384 | 48 |
| RFC9162_SHA512 | TBD2 | SHA-512 | 64 |
For clarity, restating Section 2.1.1 of [RFC9162] with D_n = {d[0], d[1], ..., d[n-1]} an ordered list of n entries:¶
The leaf and node prefixes 0x00 and 0x01 are unchanged from [RFC9162]. Hash output MUST NOT be truncated. SHA-512/256 and SHA-512/224 are distinct functions and are not covered by this document.¶
A single log MUST use one hash function for its entire life. A log MUST NOT mix nodes produced by different hash functions in one tree.¶
How entries are formed is outside the scope of this document, as it is in [RFC9942]. A verifier supplies the candidate entry bytes when checking an inclusion proof.¶
Inclusion proofs for both verifiable data structures have the same structure as the RFC9162_SHA256 inclusion proof in Section 5.2 of [RFC9942] (see also Section 4.3 of [RFC9942]), except that each element of the inclusion path is HASH_SIZE bytes:¶
RFC9162_SHA384_Inclusion_Proof = bstr .cbor RFC9162_SHA384_Inclusion_Proof_Content RFC9162_SHA384_Inclusion_Proof_Content = [ tree_size: uint, leaf_index: uint, inclusion_path: [ + bstr .size 48 ] ] RFC9162_SHA512_Inclusion_Proof = bstr .cbor RFC9162_SHA512_Inclusion_Proof_Content RFC9162_SHA512_Inclusion_Proof_Content = [ tree_size: uint, leaf_index: uint, inclusion_path: [ + bstr .size 64 ] ]¶
The proof is carried under label -1 (inclusion proofs) in the verifiable data structure proofs (vdp) header parameter of a receipt whose verifiable data structure (vds) header parameter is TBD1 or TBD2.¶
The payload of an inclusion receipt is the HASH_SIZE-byte Merkle tree root for the log at tree_size. The payload SHOULD be detached, as described in [RFC9942].¶
To verify, a verifier computes the leaf hash HASH(0x00 || entry), applies the algorithm in Section 2.1.3.2 of [RFC9162] using HASH, and uses the resulting root as the payload when verifying the receipt signature. A verifier MUST reject the proof if leaf_index is not less than tree_size, or if any path element is not exactly HASH_SIZE bytes.¶
Consistency proofs for both verifiable data structures have the same structure as the RFC9162_SHA256 consistency proof in Section 5.3 of [RFC9942] (see also Section 4.3 of [RFC9942]), except that each element of the consistency path is HASH_SIZE bytes:¶
RFC9162_SHA384_Consistency_Proof = bstr .cbor RFC9162_SHA384_Consistency_Proof_Content RFC9162_SHA384_Consistency_Proof_Content = [ tree_size_1: uint, tree_size_2: uint, consistency_path: [ + bstr .size 48 ] ] RFC9162_SHA512_Consistency_Proof = bstr .cbor RFC9162_SHA512_Consistency_Proof_Content RFC9162_SHA512_Consistency_Proof_Content = [ tree_size_1: uint, tree_size_2: uint, consistency_path: [ + bstr .size 64 ] ]¶
The proof is carried under label -2 (consistency proofs) in the vdp header parameter. The payload of a consistency receipt is the HASH_SIZE-byte root of the tree at tree_size_2.¶
To verify, a verifier applies the algorithm in Section 2.1.4.2 of [RFC9162] using HASH. As in that algorithm, a verifier MUST reject the proof unless 0 < tree_size_1 < tree_size_2, and MUST reject it if any path element is not exactly HASH_SIZE bytes.¶
A receipt using one of these verifiable data structures sets the vds header parameter (label 395, in the protected header) to TBD1 (RFC9162_SHA384) or TBD2 (RFC9162_SHA512). All other processing follows [RFC9942].¶
This document does not constrain the signature algorithm of the receipt. Deployments that select a larger hash for long-term or high-assurance reasons are likely to select a signature algorithm of comparable strength. That choice is made by the deployment.¶
This document introduces no privacy considerations beyond those of [RFC9942] and [RFC9162].¶
The security considerations of [RFC9942] and [RFC9162] apply.¶
The security of each tree rests on the collision resistance and second-preimage resistance of its hash function. The distinct leaf and node prefixes prevent an interior node from being presented as a leaf.¶
The vds value binds a receipt to one hash function. A verifier MUST select the hash function from the vds value in the protected header and MUST NOT infer it from digest length or from any other field. In particular, a verifier MUST NOT accept a SHA-384 proof under the SHA-512 identifier or the reverse.¶
Larger digests do not protect against a log operator that signs inconsistent tree heads. Detecting that behavior still depends on consistency proofs and on independent monitoring of the log.¶
This document does not claim resistance to attacks by a cryptographically relevant quantum computer. Such resistance, where required, depends on the receipt signature algorithm, which this document does not specify.¶
IANA is requested to add the following entries to the "COSE Verifiable Data Structure Algorithms" registry established by [RFC9942]:¶
At the time of writing, value 2 is requested by [I-D.ietf-scitt-receipts-ccf-profile] and value 3 by [I-D.bryce-cose-receipts-mmr-profile]; the requested values here are suggestions to the designated experts.¶
IANA is requested to add the following entries to the "COSE Verifiable Data Structure Proofs" registry established by [RFC9942]:¶
For both hash functions, the entries are the seven ASCII strings "leaf-0" through "leaf-6", without terminators. All values are hexadecimal. The shapes of the proofs match the worked example in Section 2.1.5 of [RFC9162]: the inclusion path for the fourth leaf of a seven-leaf tree is [c, g, l], and the consistency path from size 3 to size 7 is [c, d, g, l].¶
Hash of the empty tree, MTH({}):
38b060a751ac96384cd9327eb1b1e36a21fdb71114be0743
4c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b
Root at tree size 3:
6631a828e51877ed1860afd312fbabba8f977179197fc700
d543421c056c74913e3f08f43be72dc54fab07110a20e746
Root at tree size 7:
d6e12ee01a43477631615d0e458086e3effb76e674db015e
4590246bb857a00786ec042db401d64a01f1e10e29054f59
Leaf hash of entry 3, SHA-384(0x00 || "leaf-3"):
9730b1c656e957163fb68c9acb37a8d026912cbab1b45d36
f8a375c6ba2c1f5eddde078ea49f226d22623b5612afb32d
Inclusion path for leaf index 3 at tree size 7:
[0] b6128764435408aa378081e87de7aa1bf80447d97508ff23
7ff56b83c333cb71cfa44f02674cd5a3f6e533c28634a6f7
[1] 34e4e58b9df8e0c5a70eb807a6cd688970b0f99773621cdf
a9af5dc4d568b2bbfcd7a9c67755426b5ef73cd4bc216a33
[2] 0ec6aad3b8606c7af55d4bd3dc7270452cc422e122b7a7be
771db2c5cd86f0ccfea1bad340b7a43aca61f4bbff6b0f75
Consistency path from tree size 3 to tree size 7:
[0] b6128764435408aa378081e87de7aa1bf80447d97508ff23
7ff56b83c333cb71cfa44f02674cd5a3f6e533c28634a6f7
[1] 9730b1c656e957163fb68c9acb37a8d026912cbab1b45d36
f8a375c6ba2c1f5eddde078ea49f226d22623b5612afb32d
[2] 34e4e58b9df8e0c5a70eb807a6cd688970b0f99773621cdf
a9af5dc4d568b2bbfcd7a9c67755426b5ef73cd4bc216a33
[3] 0ec6aad3b8606c7af55d4bd3dc7270452cc422e122b7a7be
771db2c5cd86f0ccfea1bad340b7a43aca61f4bbff6b0f75
¶
Hash of the empty tree, MTH({}):
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc
83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f
63b931bd47417a81a538327af927da3e
Root at tree size 3:
abac9499dee08aa674fbe37dadde62eca33889267020f519
8c220122c10efb72e47576d58d72817a2f2121181fae0f63
a817231ade266059fd82e3720bf4eb9a
Root at tree size 7:
02ae0710e2c8a49aee39e14b2dff06a35b1236e67d58e154
f202becdfb34bdd2e8462e7d63f75806b7b59bb3c5926e6c
32cc3d80c5c9a884ad3a2f5cc1de32f0
Leaf hash of entry 3, SHA-512(0x00 || "leaf-3"):
fa463a8c891c6bcaa12ee8c3d78e0ab2252740a4733f1ab0
8f05801e31c1327227d96a4f844124e2b66b0c9a4ef68751
6d6d6cafacea5982ae1b60b31bdb67da
Inclusion path for leaf index 3 at tree size 7:
[0] a5c2611f2255e702a9c19fbf0e8eea88ad5244ad3b475dfc
e66e37e4e5468f1d4c239c82e9edae02ecae73d4c4316ff8
895889eeb6bfa2b5d590d8e60a21f640
[1] a3a9f52ec3e6a1adf54a1d97f1e074667ada50c784230e00
59a69758dc24819df4cd7d63f746528d73c933a08cfdca57
3858ace5ff6036e3c42c465b32c0954f
[2] ba7705d3ae9a0e5db7954f2088b6d7895edec59c4b4ee7a7
a9fb4759bfaf28a1a6277bf77db08c2a18f86038c92e56a9
7cd4a42f8c0ecb4f9a5384f2f037b068
Consistency path from tree size 3 to tree size 7:
[0] a5c2611f2255e702a9c19fbf0e8eea88ad5244ad3b475dfc
e66e37e4e5468f1d4c239c82e9edae02ecae73d4c4316ff8
895889eeb6bfa2b5d590d8e60a21f640
[1] fa463a8c891c6bcaa12ee8c3d78e0ab2252740a4733f1ab0
8f05801e31c1327227d96a4f844124e2b66b0c9a4ef68751
6d6d6cafacea5982ae1b60b31bdb67da
[2] a3a9f52ec3e6a1adf54a1d97f1e074667ada50c784230e00
59a69758dc24819df4cd7d63f746528d73c933a08cfdca57
3858ace5ff6036e3c42c465b32c0954f
[3] ba7705d3ae9a0e5db7954f2088b6d7895edec59c4b4ee7a7
a9fb4759bfaf28a1a6277bf77db08c2a18f86038c92e56a9
7cd4a42f8c0ecb4f9a5384f2f037b068
¶
This document reuses the structure of [RFC9942] and of the CCF and MMR profile drafts for COSE Receipts ([I-D.ietf-scitt-receipts-ccf-profile], [I-D.bryce-cose-receipts-mmr-profile]).¶