On 2026-11-11 20:17, Henk Birkholz wrote:
Hi Anders,

Hi Henk,


long time no reply!

As we cannot predict the results of the CBOR subsets experiment
(basically some unpredictable middle ground between a "framework
protocol must require deterministic serialization" and "COSE imposes no
serialization restrictions on it at all"), it seems prudent to install
some safeguards close by; at least when the payload is actually some
CBOR. How such safeguards could actually look like in the COSE space is
for the COSE WG to decide - this is a start. The least we can do is to
help CBOR now as best as we can.

Let's backtrack a bit.  My take on the matter started with RFC 8785 
(canonicalized JSON) [*].  Although working, current solutions using RFC 8785 
depend on external canonicalizer libraries.

This led me into CBOR.  Since a full-blown deterministic encoder for CBOR can 
be expressed with a mere 300 lines of pure JavaScript, this is hardly a 
show-stopper:
https://github.com/cyberphone/simple-cbor-encoder.js/blob/main/cde.js

However, my particular work-item (Embedded Signatures), also requires a "transform" to 
work.  This has been mentioned as a potential hurdle, probably by comparing it with its TWO 
MAGNITUDES more complex cousin, XML DSig.  The "transform" takes exactly one line to 
accomplish:
Using a high-level CBOR JavaScript API: 
https://github.com/cyberphone/cbor-core/blob/main/internet-drafts/hmac.mjs#L55
Using a low-level constrained system written in C: 
https://github.com/cyberphone/ultra-simple-csf-sample/blob/main/src/demo.c#L190


Exactly where this leaves the COSE WG, I don't know.  It's your call!

Regards,
Anders

*] now even adopted by the W3C: 
https://www.w3.org/TR/vc-data-integrity/#canonicalization-method-privacy



Viele Grüße,

Henk

On 11.11.2026 19:40, Anders Rundgren wrote:
On 2026-11-11 17:45, Amaury Chamayou wrote:
It would be great to see this on the agenda, there's no explicit way
to signal deterministic encoding of COSE payloads when they are
captured by digest at the moment. For applications where the data is
already available in other formats and can be materialised quickly, it
would be useful!

Hi WG,

It was cool to see that I'm not alone combining cryptographic operations
with Deterministically Encoded CBOR!
The basics: https://www.ietf.org/archive/id/draft-rundgren-cbor-
core-25.html#name-embedded-signatures

Advanced example including encryption: https://cyberphone.github.io/doc/
defensive-publications/partial-encryption-full-signature.pdf

Anders
Online signature service: https://test.webpki.org/csf-lab/home


Amaury

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*From:*  Steven Mih <[email protected]>
*Sent:* 29 October 2026 07:03
*To:* [email protected] <[email protected]>
*Cc:* [email protected] <[email protected]>; Anton Sokolov
<[email protected]>; Amaury Chamayou
<[email protected]>; Henk Birkholz
<[email protected]>; Dick Brooks
<[email protected]>
*Subject:* [EXTERNAL] Agenda request for IETF 127: draft-mih-sokolov-
cose-deterministic-encodings-00

|Mike, Ivo, all, We posted draft-mih-sokolov-cose-deterministic-
encodings-00: https://datatracker.ietf.org/doc/draft-mih-sokolov-cose-
deterministic-encodings/ <https://datatracker.ietf.org/doc/draft-mih-
sokolov-cose-deterministic-encodings/> A COSE Hash Envelope (RFC 9995)
signs the digest of a preimage, so a verifier that holds the value but
not the bytes that were hashed has to re-encode it exactly as the
producer did. RFC 8949 describes more than one deterministic encoding
(Sections 4.2.1 and 4.2.3), and the preimage content type (259) does
not say which one was applied. The draft adds a protected-header
parameter, deterministic-encodings, that identifies the encoding, and
an IANA registry whose first entry is RFC 8949 Core Deterministic
Encoding Requirements (core-deterministic). Agenda request for IETF
127: - Presenters: Steven Mih & Anton Sokolov (both in-person) -
Topic: Deterministic Encodings for COSE - Draft: draft-mih-sokolov-
cose-deterministic-encodings-00 - Time: 10 minutes Comments on the
list are welcome before then.|

Steven Mih


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

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


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

Reply via email to