From 5d7c6ed6ebba80b660d0ae3fb02e15ab601c4d72 Mon Sep 17 00:00:00 2001 From: Orie Steele Date: Mon, 27 Nov 2023 12:10:07 -0600 Subject: [PATCH 1/2] add detached payload cose sign 1 example --- index.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/index.html b/index.html index a2223bc0..0bce6651 100644 --- a/index.html +++ b/index.html @@ -1641,6 +1641,24 @@

TODO add COSE Sign1 detached payload examples

+ +
+18(                                 / COSE Sign 1                   /
+    [
+      h'a4013822...3a343536',       / Protected                     /
+      {                             / Unprotected                   /
+        -333: [                     / Receipts (1)                  /
+          h'd284584e...6b6f3c77'    / Receipt 1                     /
+        ]
+      },
+      nil,                          / Detached payload              /
+      h'09772c7f...5c4e736f'        / Signature                     /
+    ]
+)
+      
+ + The detached payload can be either a credential or presentation as described in + Securing Verifiable Credentials. From dbaffb7f66a8050e2dcc1caaa52e4baf2f336ef7 Mon Sep 17 00:00:00 2001 From: Orie Steele Date: Mon, 27 Nov 2023 12:24:38 -0600 Subject: [PATCH 2/2] update COSE examples --- index.html | 59 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 0bce6651..d2f35291 100644 --- a/index.html +++ b/index.html @@ -1636,29 +1636,62 @@

Data URIs

- Detached Payload + COSE Examples

-

-TODO add COSE Sign1 detached payload examples +

+These examples rely on CBOR Diagnostic Notation. +Remember that all actual interchange always happens in the binary format.

-
+      
+{                                   / Protected                     /
+  1: -35,                           / Algorithm                     /
+  3: application/vc+ld+json,        / Content type                  /
+  4: h'177f12cb...1933d554',        / Key identifier                /
+  15: {                             / CWT Claims                    /
+    1: urn:example:123,             / Issuer                        /
+    2: urn:example:456,             / Subject                       /
+  },
+}
+        
+ +
+{                                   / Protected                     /
+  1: -35,                           / Algorithm                     /
+  3: application/vp+ld+json,        / Content type                  /
+  4: h'177f12cb...1933d554',        / Key identifier                /
+  15: {                             / CWT Claims                    /
+    1: urn:example:123,             / Issuer                        /
+    2: urn:example:456,             / Subject                       /
+  },
+}
+          
+ +
 18(                                 / COSE Sign 1                   /
     [
-      h'a4013822...3a343536',       / Protected                     /
-      {                             / Unprotected                   /
-        -333: [                     / Receipts (1)                  /
-          h'd284584e...6b6f3c77'    / Receipt 1                     /
-        ]
-      },
+      h'a4013822...3a343536',       / Protected Header              /
+      {}                            / Unprotected Header            /
+      h'0fbe22a0...3a009118',       / Attached payload              /
+      h'09772c7f...5c4e736f'        / Signature                     /
+    ]
+)
+      
+ +
+18(                                 / COSE Sign 1                   /
+    [
+      h'a4013822...3a343536',       / Protected Header              /
+      {}                            / Unprotected Header            /
       nil,                          / Detached payload              /
       h'09772c7f...5c4e736f'        / Signature                     /
     ]
 )
       
- - The detached payload can be either a credential or presentation as described in - Securing Verifiable Credentials. +

+The payload can be either a credential or presentation as described in +Securing Verifiable Credentials. +