Skip to content

Standards audit: modern IANA option registry, Token entropy, and extension roadmap #23

Open

Description

@maikebing

Why this is needed

The modern IANA CoAP registry assigns option number 19 to Q-Block1 (RFC 9177). The current tree contains a legacy OptionType.Token=19 definition from an old draft-era model; CoAP tokens are carried in the fixed header TKL field under RFC 7252 and are not an option. This is an interoperability hazard for any modern Q-Block peer.

The current token generator also uses a 32-bit monotonic counter seeded by System.Random. That may be adequate for local correlation but needs an explicit uniqueness/entropy decision for secure and non-secure transports.

References:

  • RFC 7252 §3.1 and §5.3.1 (token placement and matching)
  • RFC 7959 (Block1/Block2)
  • RFC 9175 §4 (token processing update for secure transports)
  • RFC 9177 (Q-Block1/Q-Block2)
  • IANA CoRE Parameters registry (current option and method assignments)
  • RFC 8613/9668 (OSCORE/EDHOC are separate security extensions)

Proposed work

  • Produce a versioned registry mapping for every supported option and method; remove or isolate legacy draft-only option 19 so it cannot decode modern Q-Block1 as Token.
  • Add compatibility tests against current IANA assignments and unknown critical/elective option handling.
  • Decide and document the token generation contract (length, uniqueness, retransmission reuse, secure-source requirements) before changing defaults.
  • Keep OSCORE/EDHOC, FETCH/PATCH/iPATCH, No-Response, Echo/Request-Tag, CoAP-over-TCP/WebSocket, multicast, and Q-Block as separate opt-in work items with RFC status and real use cases.

This issue is an audit and roadmap item; it does not claim those extensions are implemented.

Activity

  1. maikebing commented on Nov 12, 2026

    @maikebing
    MemberAuthor

    Additional baseline reproduction: decoding hex 42020001aa55d10608 should preserve header Token aa55 and wire option 19 value 08. Current Message.AddOption interprets every number19 as the legacy Token and overwrites the header token with 08; the default encoder also skips option19. A dedicated registry probe produced 7 failures / 3 passes. This is separate from the critical-bit mask fix included in PR #32 (12 classification tests). No Q-Block support is claimed. The default modern-wire vs preserved legacy-API compatibility choice has been presented to the user; this issue stays open until that choice and the remaining token/registry contract are resolved.

  2. maikebing commented on Nov 12, 2026

    @maikebing
    MemberAuthor

    User decision: modern semantics are the default. Preserve and deprecate the public Token option name; header tokens use Message.Token. Wire option19 must remain a raw modern option and must never overwrite the header token. Old draft semantics are available only through explicitly selected legacy codecs; they must not switch the default or affect concurrent modern decoding. This authorizes the compatibility change discussed above. Implementation and baseline/legacy regression evidence are in progress; no claim of complete Q-Block support is made.

  3. maikebing commented on Nov 13, 2026

    @maikebing
    MemberAuthor

    Next-batch status in PR #38: modern raw option19/header Token separation and explicit legacy handling remain intact. Automatic header Tokens now use the platform CSPRNG; unsigned getter/Size consumer and long Observe deadline follow-ups are implemented with regressions. #33 stays OPEN because actual DTLS session/traffic-key/re-key identity and secure non-reuse are still UNKNOWN. This umbrella therefore stays OPEN. Q-Block constants continue to denote registry metadata only, and #26 real libcoap/Californium matrix remains NOT_RUN. See docs/audits/coap-20261113/next-batch-validation.json for bounded evidence and migration limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions