From f99c0edc621b920639c883173af2eb30d33b9d19 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:05:22 +0000 Subject: [PATCH 1/6] Add usage section --- draft-birkholz-cose-receipts-ccf-profile.md | 36 +++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index 16909cc..ee33b3d 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -132,7 +132,7 @@ where: Each leaf in a CCF ledger carries the following components: -~~~ +~~~ ccdl ccf-leaf = [ internal-transaction-hash: bstr .size 32 ; a string of HASH_SIZE(32) bytes internal-evidence: tstr .size (1..1024) ; a string of at most 1024 bytes @@ -150,7 +150,7 @@ The `internal-transaction-hash` and `internal-evidence` byte strings are interna CCF inclusion proofs consist of a list of digests tagged with a single left-or-right bit. -~~~ +~~~ cddl ccf-proof-element = [ left: bool ; position of the element hash: bstr .size 32; hash of the proof element (string of HASH_SIZE(32) bytes) @@ -205,6 +205,38 @@ verify_inclusion_receipt(inclusion_receipt): A description can also be found at {{CCF-Receipt-Verification}}. +# Usage in COSE receipt + +A COSE receipt with a CCF inclusion proof is described by the following schema: + +~~~~ cddl +protected-header-map = { + &(alg: 1) => int + &(vds: 395) => 2 + * cose-label => cose-value +} +~~~~ + +- alg (label: 1): REQUIRED. Signature algorithm identifier. Value type: int. +- vds (label: 395): REQUIRED. verifiable data structure algorithm identifier. Value type: int. + +The unprotected header for an inclusion proof signature is described by the following schema: + +~~~~ cddl +inclusion-proof: bstr .cbor ccf-inclusion-proof + +inclusion-proofs = [ + inclusion-proof ] + +verifiable-proofs = { + &(inclusion-proof: -1) => inclusion-proofs +} + +unprotected-header-map = { + &(vdp: 396) => verifiable-proofs + * cose-label => cose-value +} +~~~~ + # Privacy Considerations Privacy Considerations From d2e7b21b896bacddf90f7bbb2e6656ccf6cfc907 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:06:20 +0000 Subject: [PATCH 2/6] typo --- draft-birkholz-cose-receipts-ccf-profile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index ee33b3d..d17aadf 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -132,7 +132,7 @@ where: Each leaf in a CCF ledger carries the following components: -~~~ ccdl +~~~ cddl ccf-leaf = [ internal-transaction-hash: bstr .size 32 ; a string of HASH_SIZE(32) bytes internal-evidence: tstr .size (1..1024) ; a string of at most 1024 bytes From 83903c58247988e476280182441a099060cb030e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:41:50 +0000 Subject: [PATCH 3/6] Update draft-birkholz-cose-receipts-ccf-profile.md --- draft-birkholz-cose-receipts-ccf-profile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index d17aadf..28dc56d 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -207,7 +207,7 @@ A description can also be found at {{CCF-Receipt-Verification}}. # Usage in COSE receipt -A COSE receipt with a CCF inclusion proof is described by the following schema: +A COSE receipt with a CCF inclusion proof is described by the following CDDL definition: ~~~~ cddl protected-header-map = { From 85475cc53740e6fe1f8814b1580570538bb4848f Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:41:55 +0000 Subject: [PATCH 4/6] Update draft-birkholz-cose-receipts-ccf-profile.md --- draft-birkholz-cose-receipts-ccf-profile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index 28dc56d..de32336 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -220,7 +220,7 @@ protected-header-map = { - alg (label: 1): REQUIRED. Signature algorithm identifier. Value type: int. - vds (label: 395): REQUIRED. verifiable data structure algorithm identifier. Value type: int. -The unprotected header for an inclusion proof signature is described by the following schema: +The unprotected header for an inclusion proof signature is described by the following CDDL definition: ~~~~ cddl inclusion-proof: bstr .cbor ccf-inclusion-proof From bccdeec4216b7835915a2d39472e7577dcc95e0e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:45:22 +0000 Subject: [PATCH 5/6] Update draft-birkholz-cose-receipts-ccf-profile.md --- draft-birkholz-cose-receipts-ccf-profile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index de32336..12d9574 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -223,7 +223,7 @@ protected-header-map = { The unprotected header for an inclusion proof signature is described by the following CDDL definition: ~~~~ cddl -inclusion-proof: bstr .cbor ccf-inclusion-proof +inclusion-proof = bstr .cbor ccf-inclusion-proof inclusion-proofs = [ + inclusion-proof ] From f8f395c89fb7c7a568b1e18f3dc6b174ab9b8b36 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 26 Nov 2024 15:49:43 +0000 Subject: [PATCH 6/6] Update draft-birkholz-cose-receipts-ccf-profile.md --- draft-birkholz-cose-receipts-ccf-profile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-birkholz-cose-receipts-ccf-profile.md b/draft-birkholz-cose-receipts-ccf-profile.md index 12d9574..42b6638 100644 --- a/draft-birkholz-cose-receipts-ccf-profile.md +++ b/draft-birkholz-cose-receipts-ccf-profile.md @@ -223,7 +223,7 @@ protected-header-map = { The unprotected header for an inclusion proof signature is described by the following CDDL definition: ~~~~ cddl -inclusion-proof = bstr .cbor ccf-inclusion-proof +inclusion-proof = ccf-inclusion-proof inclusion-proofs = [ + inclusion-proof ]