Hi CBOR/Crypto Enthusiasts,

The somewhat quirky application-defined label holding the embedded signature container 
has now been replaced by a CBOR "simple" [preliminary] value, after a tip by 
Carsten.  Lastly, multiple signatures were added to round out the solution.  Below is a 
fully verifiable example combining:
https://www.ietf.org/archive/id/draft-rundgren-cbor-core-10.html
https://www.ietf.org/archive/id/draft-rundgren-cotx-05.html
https://www.ietf.org/archive/id/draft-rundgren-cbor-simple-4-csf-00.html
https://cyberphone.github.io/javaapi/org/webpki/cbor/doc-files/signatures.html

1010(["https://example.com/myobject";, {  # URL based object id included in the 
signed data
  1: "Hello signed world!",  # Application data
  2: [4.7, true, h'012345'],  # Application data
  simple(99): [{ # Embedded signatures [Ed25519, ESP256]
    1: -50,  # COSE signature algorithm
    4: {  # COSE public key (OKP)
      1: 1,
      -1: 6,
      -2: h'fe49acf5b92b6e923594f2e83368f680ac924be93cf533aecaf802e37757f8c9'
    },
# Signature value:
    6: 
h'11fa0f55217316ae7d4f9f916a2efa1361f94c2503159c4736ed4970f59c326acba5ad7829c4ca8dde2498511bc889ae0bed01d434ee19c11b99c0323fc71006'
  }, {
    1: -9,  # COSE signature algorithm
    4: {  # COSE public key (EC2)
      1: 2,
      -1: 1,
      -2: h'e812b1a6dcbc708f9ec43cc2921fa0a14e9d5eadcc6dc63471dd4b680c6236b5',
      -3: h'9826dcbd4ce6e388f72edd9be413f2425a10f75b5fd83d95fa0cde53159a51d8'
    },
# Signature value:
    6: 
h'4d0138563848ea70c29f6106de5d0b42ba400dc8e4d46b167e45f4a58722ddb2ca14d651a8c9e761696062b483b454adc34bc49526d76e7c4e40eab93a200700'
  }]
}])

For a more interesting example, take a peek at: 
https://cyberphone.github.io/wallet-core/doc/

Online testing of embedded signatures: https://test.webpki.org/csf-lab/home

Cheers,
Anders

_______________________________________________
COSE mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to