I think the realistic and efficient thing is to assume CBOR libraries will have one interface for int64_t and other interfaces for integers of different flavors and larger ranges. Even some languags that support big numbers well separate this, because the processing and storage internally is so different. Int64_t can be handled extremely efficient because CPU HW supports it extremely efficiently.
Also, COSE is targeted at constrained environments. Int64_t alg IDs work great in that environment. String IDs don’t. LL > On Jan 9, 2026, at 12:56 AM, Anders Rundgren <[email protected]> > wrote: > > Hi CBOR/COSE enthusiasts! > > During the design of the (in)famous Embedded Signature specification and > associated implementations [*}, I stumbled over the type of the COSE > algorithm ID, in CDDL defined as "tstr/int". A problem is that my CBOR > implementations do not really support "int" since this effectively translates > to a 65-bit integer. A quick consultation with the associated IANA > Designated Expert (Carsten Bormann) revealed that IANA would not accept COSE > algorithm IDs even above the JavaScript 53-bit level. > > A similar issue arose with "iat" in CWT. Although it might be cool with > timestamps spanning billions of years forward and backward, this is not > particularly interoperable with current time APIs. > > To cope with such issues, my primary project (creating a cross-platform > profile for CBOR), defines a set of "standardized", presumably portable, CBOR > protocol primitives: > https://www.ietf.org/archive/id/draft-rundgren-cbor-core-24.html#name-protocol-primitives > > For the COSE-derived solutions, the type of "alg" was set to int32 while > limiting "iat" to the range defined by the I-D: 0 ("1970‑01‑01T00:00:00Z") to > 253402300799 ("9999‑12‑31T23:59:59Z"). > > Anders > > *] https://test.webpki.org/csf-lab > > _______________________________________________ > 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]
