Skip to content

DOC: Say bit 3 is direct against indirect, and refuse an empty usage - #30

Merged
Automation51D merged 1 commit into
mainfrom
doc/usage-indirect-and-no-empty-usage
Sep 18, 2026
Merged

Automation51D merged 1 commit into
mainfrom
doc/usage-indirect-and-no-empty-usage

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Two rules in the 51Did layout, and the name that follows from one of them.

Bit 3 records direct against indirect. It was described as set when the
Usage was derived from a consent string. What it actually distinguishes is
whether the caller stated the Usage or the issuer worked it out from another
signal the caller sent. A consent string is the only such signal today, so
the bit is set only in that case today, but it is not what the field means.
The field is now called Usage is indirect.

An empty usage is refused. Usage bits 000 were a readable value,
None, documented as never issued. Every usage the issuer accepts sets bit 0
and it writes no flags byte without one, so 000 means a damaged or forged
identifier. A reader now refuses such a Payload the way it refuses one it
cannot read, and the Usage has exactly three values.

Where Before After
Flags table, bit 3 Usage from consent Usage is indirect
Usage table, 000 None, not issued Refused
Package surface UsageFromConsent, isUsageFromConsent(), usageFromConsent, usage_from_consent, usage_from_consent() UsageIsIndirect, isUsageIndirect(), usageIsIndirect, usage_is_indirect, usage_is_indirect()

Why the payload version does not move

The Version section says the version cannot protect the meaning of a field
that has not moved. This change does not give any existing identifier a
different answer. Bit 3 has only ever been set when a consent string was
decoded, so every identifier issued under the old wording is described
correctly by the new one. The meaning widens, the field stays put, and the
version stays 0. The Usage section now says so.

Checked against the bytes

A standard usage identifier requested from the issuer this morning decodes
as the layout says:

envelope   version 3, domain 51d.es, payload 57 bytes, signature 64 bytes
flags      0b00000011
  bits 0-2 usage       011  = standard
  bit  3   indirect    0    = stated directly by the caller
  bits 4-5 version     00   = payload layout 0
  bits 6-7 type        00   = probabilistic
licence    4 bytes (encrypted)
match key  32 bytes
byte 37    01   = Terms index 1, Model Terms for Marketing version 2
bytes 38+  00 + six 3-byte tags = creator context, version 0

Non-marketing and personalized requests give usage 001 and 111, with
Terms 00 and 01 respectively, as the Terms table says.

Not decided here

The patterns 010, 100, 101 and 110 are never issued either. Under
the rule that a reader answers with the highest bit set, 100 reads as
personalized, which is the most permissive answer. This change refuses only
000 and leaves the others as they are, and whether they should be refused
too is an open question.

Follow on

Every package changes its accessor name and refuses 000, in the same
change as this or immediately after it, so the packages and this page do not
disagree for longer than it takes to land them.

The .NET package change is
51Degrees/pipeline-dotnet#419,
which renames FodId.UsageFromConsent to FodId.UsageIsIndirect, removes
Usage.None and refuses 000 at parse with a new
FodIdParseStatus.NoUsage. The other five packages follow.

Checks

The Nightly Pipeline was dispatched on this branch as a dry run, run
35270143213
,
at commit 81d0692, which is the current head. Nothing merges in a dry run.
Get Pull Requests, Configure, Build and Test on Ubuntu, and Complete all
passed, and the Build and Test log reports
UTM link lint: clean for campaign 'specifications', which is the check
this repository has. The UTM link lint also ran on the pull request itself,
run 35097022070,
and passed. The branch is one commit ahead of main and none behind, and it
does not conflict.

What refusing 000 reaches

Refusing at parse is not confined to a caller reading a field. The
51Degrees cloud service parses every identifier presented to its verify and
redeem endpoints through the same package reader, so once it takes a
package carrying this rule a payload with usage bits 000 is reported as
unreadable there rather than verified. That is the intended answer, and it
is named here because it is a change in what a live endpoint returns and
not only in what a package exposes.

Bit 3 of the flags byte was described as set when the Usage was derived
from a consent string. The distinction it records is whether the caller
stated the Usage or the issuer worked it out from some other signal, and a
consent string is only the one such signal today. The field is restated
that way and renamed "Usage is indirect" in every language.

The bit has only ever been set when a consent string was decoded, so every
identifier issued under the earlier wording is described correctly by this
one. The meaning widens without moving, the Payload version stays 0, and
the section says why that is not the redefinition the Version section warns
against.

Usage bits of 000 were a readable value, "None", documented as never
issued. A reader now refuses such a Payload the way it refuses one it
cannot read. Every usage the issuer accepts sets bit 0, so 000 means a
damaged or forged identifier, the only safe answer to it is already what a
refusal gives, and the Usage is left with exactly three values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants