Most security protocols bury their assumptions in footnotes. RFC 2025 buries one in a concatenation. The Simple Public-Key GSS-API Mechanism, published in October 1996, assembles its context identifier from two random values laid end to end — and the instant one of those values goes missing, the identifier stops being a receipt for two parties and becomes a receipt for one.

That is not a defect. It is the most revealing design decision in the document, and it has aged into a useful lesson for anyone who stores a context ID in a database column and calls the job done.

The short version

  • Where a response token exists, RFC 2025 builds the context ID from the initiator's randSrc followed by the target's randTarg. Two contributions, two witnesses.
  • Unilateral SPKM-2 has only an SPKM-REQ. The target contributes no random value, so it must accept the initiator's freshness claim or reject the context outright.
  • key-src-bind strengthens the binding of that request and its proposed key. It does not manufacture a target contribution.
  • Establishment replay protection and the optional replay or sequencing services for later messages are separate decisions. A context ID is not evidence of authorisation, delivery, or business completion.

A receipt whose authors can be counted

RFC 2025 specifies the Simple Public-Key GSS-API Mechanism, or SPKM. Its context-establishment tokens carry a great many fields, but one small construction gives the exchange an unusually legible evidentiary shape. The initiator supplies randSrc. If a target response follows, the target appends randTarg. Their concatenation becomes the context ID used in every subsequent token for that security context.

The ordering is the point. The identifier is not a label slapped on after the fact; its components reveal which peer contributed to freshness. With both values present, the initiator knows the target generated something for this exchange, and the target knows its own contribution sits alongside the initiator's. The result is a narrow bilateral receipt — a value that separates this context-establishment conversation from an old one with high probability.

Narrow is doing real work in that sentence. RFC 2025 says the random values need not be unpredictable; they need only be generated so that a previously used value is very unlikely to recur. Their job is uniqueness across contexts, not secrecy. A gloriously random-looking value cannot enlarge the claim beyond that job, however much a dashboard might wish it could.

Four exchanges, one decisive asymmetry

The token patterns expose the difference without mercy. SPKM-1 always uses a target response: unilateral is SPKM-REQ then SPKM-REP-TI, and mutual authentication adds SPKM-REP-IT. Mutual SPKM-2 also includes a response. In every one of those cases, a target-generated random value can join the initiator's value in the context ID.

Unilateral SPKM-2 is the exception, and it is a lonely one. It consists of a single SPKM-REQ. There is no reply token in which the target can contribute randTarg, so the context ID is the initiator's value alone. RFC 2025 states the consequence without flinching: the target must trust the initiator to supply a fresh random value, or reject the context.

This is not a cosmetic difference between a one-token and a two-token handshake. It relocates control over freshness. In the responding exchanges, each peer plants its own non-reuse contribution inside the identifier. In unilateral SPKM-2, the party deciding whether to accept the context has planted nothing. The identifier still works; it simply is not evidence that both sides helped make the context fresh.

What key-src-bind repairs — and what it leaves open

RFC 2025 adds a second protection to unilateral SPKM-2. When the chosen key-establishment algorithm does not itself bind the source name to the context key, the request must carry key-src-bind, an MD5 digest over the encoded source name and the proposed context key.

The binding helps the target decide that the received token and key belong together with the claimed source. The RFC describes it as assisting the target in trusting the freshness of the token and proposed key. But the field is still produced inside the initiator's request. It adds no response, no randTarg, and no proof that the target generated fresh material.

The distinction is easy to lose in a database column labelled "context established" or in a diagram that collapses the whole exchange into one confident green arrow. Binding, freshness contribution and mutual authentication are three different facts. A control that strengthens one must not be counted as evidence for the others.

Two replay planes

SPKM also supports replay detection and sequencing for protected messages sent after establishment. Those services use sequence numbers when the application asks for them, and they are not automatically implied by the random values that separate one context from another.

The generic GSS-API specification, RFC 2743, keeps the distinction explicit. Replay and sequence services are selectable context flags for per-message processing. A caller requests them, the acceptor reports what was available, and an implementation may still return a suspect message with supplementary status information. Throughout, the application remains responsible for transporting context-establishment and per-message tokens.

So an audit trail is really answering two different questions:

  1. Was this context-establishment attempt distinguished from old context attempts?
  2. Were later messages checked for duplication or order within the accepted context?

A context ID helps answer the first. Negotiated flags, sequence state and per-message verification results answer the second. Merging them manufactures a claim the protocol never made.

The historical record, kept to scale

The RFC Editor records RFC 2025 as an October 1996 Proposed Standard, with no published erratum listed for the document at the time of this review. IANA's SMI registry still records object identifiers for SPKM-1, SPKM-2, SPKM-3 and the SPKM GSS token arc. Those records establish specification history and identifier allocation; they say nothing about contemporary deployment, and should not be asked to.

RFC 2847 later defined SPKM-3 as equivalent to SPKM-1 except for specified changes. That relationship is useful for tracing the mechanism family, but it does not move the evidence boundary in RFC 2025: a context ID can only be read in light of the exchange that produced it.

The safe interpretation is compact. A two-part randSrc || randTarg context ID records bilateral freshness contribution for the security context. A unilateral SPKM-2 context ID records only the initiator's contribution, even when key-src-bind is present. Neither form proves certificate authorisation, algorithm choice, later message delivery, or a successful business outcome.

Read the identifier, then read the exchange. The receipt is only ever as good as the signatures it actually carries.

Sources