| Internet-Draft | SCSWP | August 2026 |
| Hebbar & Hiremani | Expires 23 February 2027 | [Page] |
This document specifies the Secure Collaborative State Workspace Protocol (SCSWP), a stateful, continuously authenticated protocol that enables multiple clients, operating from heterogeneous networks, to securely access and collaboratively manage a shared file workspace hosted on a central authoritative server.¶
SCSWP defines a complete protocol lifecycle encompassing client provisioning via a Key-Dissolving bootstrap mechanism, mutual X.509 certificate-based identity authentication, ephemeral Elliptic-Curve Diffie-Hellman (ECDH) key exchange producing a three-level cryptographic key hierarchy (K1, K2, K3), continuous Dynamic Network and Access (D/N/P/S) trust evaluation, per-client capability-based authorization, workspace-aware congestion control with a dynamic worker-pool scheduler, concurrent file-operation management via mutual exclusion locks and optimistic version control, idempotent operation execution, a hash-chained audit ledger, and session continuity and recovery through the Dynamic Network and Access Continuity (DNAC) mechanism.¶
The fundamental security principle of SCSWP is that client trust is not established permanently at login time. Instead, identity, device state, network context, session state, authorization state, resource state, and workspace state are evaluated continuously and cryptographically throughout the full lifetime of every connection.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 23 February 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Contemporary distributed systems increasingly require multiple clients, operating from geographically separated and organizationally distinct networks, to collaboratively access and modify shared files through a central authoritative server. Existing approaches address either the security plane (e.g., TLS-protected file servers) or the collaborative concurrency plane (e.g., distributed version control systems) independently. No single protocol addresses both planes together with continuous trust evaluation as a first-class protocol requirement.¶
The Secure Collaborative State Workspace Protocol (SCSWP) fills this gap by unifying the following capabilities into a single, coherent protocol:¶
Client Provisioning: Centrally managed, server-authorized client creation using a Key-Dissolving bootstrap mechanism that controls protocol entry without replacing cryptographic authentication.¶
Mutual Authentication: X.509 certificate-based identity validation in both directions, establishing that both the server and the client are who they claim to be before any key material is derived.¶
Cryptographic Key Hierarchy: A three-level key hierarchy (K1, K2, K3) derived through HKDF [RFC5869] over ECDH [RFC8422] shared secrets, providing forward secrecy, purpose separation, and epoch-based key rotation.¶
Continuous Trust Evaluation: A Dynamic Network and Access (D/N/P/S) trust model in which the client's Device context, Network context, Port context, and Socket/Session context are continuously authenticated and evaluated. Trust is not a binary post-login state; it is a continuously scored signal that drives rekeying, revalidation, and session suspension decisions.¶
Per-Client Capability Authorization: Fine-grained, server-issued capability bits (READ, WRITE, APPEND, CREATE, DELETE, RENAME, LOCK, ADMIN) that govern which file operations each client may request within each workspace.¶
Workspace-Aware Congestion Control: A two-layer congestion model combining transport-level flow control with an application-level priority-scheduled worker pool that prevents any single client from exhausting shared server resources.¶
File Concurrency Management: Mutual exclusion locks, optimistic version control with configurable conflict policies (REJECT, RETRY, MERGE, REBASE, CONFLICT VERSION), and operation idempotency via deduplication identifiers.¶
Hash-Chained Audit Ledger: Every significant operation produces an authenticated, hash-chained audit record incorporating the operation identifier, client and session identifiers, file identifier, previous and new versions, key epoch, trust state, and DNAC hash.¶
DNAC Session Continuity: The Dynamic Network and Access Continuity mechanism provides cryptographic session recovery after disconnection. Upon reconnection, the client presents its last DNAC digest; the server validates the chain and, if valid, restores the session with a fresh K3 key epoch.¶
This document specifies:¶
This document does NOT specify:¶
SCSWP is designed around the following core principles:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The following terms are used throughout this document:¶
SCSWP operates between a single authoritative Server and one or more Clients. The server manages workspace files, client identities, cryptographic material, and session state. Clients access workspace files exclusively through the server; no peer-to-peer file transfer occurs.¶
The protocol is organized into the following functional planes, processed in the order listed for every file operation:¶
Client Request
|
v
+-----------------------+
| IDENTITY PLANE | X.509 identity validation
+-----------------------+
|
v
+-----------------------+
| TRUST PLANE | D/N/P/S continuous evaluation
+-----------------------+
|
v
+-----------------------+
| SECURITY PLANE | K1 / K2 / K3 key hierarchy
+-----------------------+
|
v
+-----------------------+
| AUTHORIZATION PLANE | Capability / ACL check
+-----------------------+
|
v
+-----------------------+
| RESOURCE PLANE | Congestion + worker scheduling
+-----------------------+
|
v
+-----------------------+
| WORKSPACE PLANE | Lock / version / idempotency
+-----------------------+
|
v
+-----------------------+
| STORAGE PLANE | File I/O + version history
+-----------------------+
|
v
+-----------------------+
| AUDIT / STATE PLANE | Hash-chained audit + DNAC update
+-----------------------+
|
v
Client Response
At the highest level of abstraction, SCSWP maintains three orthogonal security planes simultaneously:¶
These planes are independent but interact: trust plane events (e.g., suspicious D/N/P/S change) trigger security plane actions (e.g., K3 epoch rotation).¶
The complete SCSWP lifecycle is as follows:¶
Before a client can connect to the server, an authorized administrator MUST register the client identity through the server's administration interface. Registration produces the following server-side records:¶
Client Identity Record:¶
Client Capability Record:¶
The Key-Dissolving bootstrap mechanism controls protocol entry. A client MUST successfully complete the bootstrap phase before proceeding to identity authentication. The bootstrap credential itself does not authenticate the client cryptographically; it merely gates entry to the authentication phase.¶
The OP_PROVISION message carries:¶
Upon receipt of OP_PROVISION, the server MUST:¶
If all checks pass:¶
If any check fails:¶
Servers MUST use a constant-time string comparison when validating bootstrap tokens to prevent timing oracle attacks [RFC6151].¶
Bootstrap tokens MUST carry an expiration timestamp. A server MUST reject any token whose token_expires_at timestamp is less than or equal to the current UTC time at the moment of validation.¶
The error code TOKEN_EXPIRED (0x02) MUST be returned in the OP_ERROR payload.¶
Re-issuance of a new token for the same client is a server administration action and is outside the scope of this protocol.¶
SCSWP requires mutual X.509 [RFC5280] certificate authentication.¶
The server operates a Certificate Authority (CA) using an ECDSA key pair over curve P-384 (secp384r1) [RFC8422]. The CA issues a self-signed certificate that serves as the trust anchor for all client connections. The CA private key MUST be stored securely in volatile memory and regenerated on each server start, or persisted in a hardware security module.¶
The server CA certificate MUST include:¶
During client provisioning (Section 4.1), the server CA MUST issue a signed X.509 certificate to the client included in the OP_ACK response as cert_pem.¶
The client certificate MUST include:¶
After successful certificate validation, the client and server perform an ephemeral Elliptic-Curve Diffie-Hellman (ECDH) key exchange [RFC8422].¶
K1 is the session root key, derived as follows:¶
IKM = ECDH(client_private_key, server_public_key)
= ECDH(server_private_key, client_public_key)
K1 = HKDF-SHA256(
IKM = IKM,
salt = nil,
info = "SCSWP_K1:" || session_id,
L = 32 octets
)
¶
Where:¶
K1 MUST be retained in volatile memory only. K1 MUST NOT be written to persistent storage, transmitted over the network, or included in any log output. K1 is used solely as input to K2 derivation (Section 7.2) and MUST NOT be used directly as an encryption or MAC key.¶
The D/N/P/S context is a structured representation of the client's current operating environment across four dimensions:¶
The D/N/P/S context MUST be encoded as a JSON object [RFC8259] with the following normative fields:¶
{
"device_id": <string>,
"network_ip": <string>,
"port": <uint16>,
"session_id": <string>,
"epoch": <uint32>,
"dnac": <string>
}
¶
ABNF for the JSON object:¶
dnps-object = "{" SP
%s"\"device_id\"" ":" SP json-string "," SP
%s"\"network_ip\"" ":" SP json-string "," SP
%s"\"port\"" ":" SP json-uint "," SP
%s"\"session_id\"" ":" SP json-string "," SP
%s"\"epoch\"" ":" SP json-uint "," SP
%s"\"dnac\"" ":" SP json-string
SP "}"
¶
The client MUST send an OP_TRUST_EVAL message to the server at regular intervals. The RECOMMENDED interval is T_TRUST = 5 seconds. The OP_TRUST_EVAL message carries:¶
An HMAC-SHA-256 [RFC2104] signature:¶
sig = HMAC-SHA256(key = K3.auth_key,
data = canonical_JSON(dnps_object))
¶
where canonical_JSON is a deterministic UTF-8 encoding with keys lexicographically sorted and no insignificant whitespace.¶
The server MUST verify the HMAC signature before accepting the D/N/P/S context. An invalid signature MUST result in OP_ERROR code SIGNATURE_INVALID (0x0B) and an incremental trust penalty.¶
The server maintains a Trust Score T in [0, 100] for each active session. The initial Trust Score on session establishment is 100.0.¶
Trust Penalties:¶
| Signal | Penalty (ΔT) |
|---|---|
| Network address change | -15.0 |
| Device identifier change | -60.0 |
| Operation rate > R_MAX in W_RATE | -5.0 per evaluation |
| HMAC signature invalid | -25.0 |
| Authentication failure | -25.0 |
where R_MAX = 20 operations and W_RATE = 10 seconds.¶
Trust Healing: If no anomalies are detected, the Trust Score SHOULD be increased by H_TRUST (RECOMMENDED: 0.5) up to the maximum of 100.0.¶
Policy Actions Triggered by Trust Score:¶
The Trust Score MUST be included in every audit record produced during the session (Section 12.1).¶
SCSWP messages MUST be carried over a reliable, ordered, full-duplex transport. RECOMMENDED transport: WebSocket [RFC6455] over TLS 1.3 [RFC8446]. The WebSocket connection MUST be established to the server's protocol endpoint, conventionally at path "/protocol".¶
Future deployments MAY use QUIC [RFC9000] as the transport layer. If TLS is not available at the transport layer, implementations MUST rely on the SCSWP application-layer AES-256-GCM envelope (Section 8.3) to provide confidentiality and integrity. TLS is STRONGLY RECOMMENDED regardless.¶
All SCSWP messages are encoded as JSON objects [RFC8259]. The normative wire format is:¶
{
"opcode": <uint8>,
"session_id": <string | null>,
"epoch": <uint32>,
"payload": <object>
}
¶
ABNF for the message envelope:¶
scswp-message = "{" SP
%s"\"opcode\"" ":" SP uint8 "," SP
%s"\"session_id\"" ":" SP (json-string / "null") "," SP
%s"\"epoch\"" ":" SP uint32 "," SP
%s"\"payload\"" ":" SP json-object
SP "}"
uint8 = 1*3DIGIT
uint32 = 1*10DIGIT
¶
Unknown opcode values MUST result in an OP_ERROR response with error code UNKNOWN_OPCODE (0x0D). The total message length SHOULD NOT exceed 67108864 octets (64 MiB).¶
File payload data included in OP_FILE_OP WRITE and READ responses MUST be protected using AES-256-GCM [NIST.SP.800-38D].¶
Encryption:
nonce := CSPRNG(12 octets)
ct || tag := AES-256-GCM-Encrypt(
key=K3.payload_key, nonce=nonce, aad=nil, pt=data)
envelope := nonce || ct || tag
data_b64 := BASE64URL(envelope) ; RFC 4648 Section 5
Decryption:
envelope := BASE64URL-DECODE(data_b64)
nonce := envelope[0:12]
pt := AES-256-GCM-Decrypt(
key=K3.payload_key, nonce=nonce, aad=nil,
ct=envelope[12:])
¶
AES-256-GCM authentication tag length MUST be 128 bits (16 octets). If tag verification fails, the receiver MUST discard the message, increment a failure counter, apply a trust penalty (Section 6.3), and NOT process the decrypted data. Control messages SHOULD use K3.ctrl_key for envelope protection.¶
The following opcodes are defined in this specification:¶
| Value | Name | Direction | Description |
|---|---|---|---|
| 0x01 | OP_PROVISION | C->S | Bootstrap / Key-Dissolving |
| 0x02 | OP_AUTH | C->S | ECDH identity authentication |
| 0x03 | OP_TRUST_EVAL | C->S | D/N/P/S context signal |
| 0x04 | OP_WORKSPACE_AUTH | C->S | Workspace authorization ack |
| 0x05 | OP_FILE_OP | C->S | File operation (LIST/READ/WRITE) |
| 0x06 | OP_LOCK | C->S | Acquire file write lock |
| 0x07 | OP_UNLOCK | C->S | Release file write lock |
| 0x08 | OP_DNAC_RECOVERY | C->S | Session recovery via DNAC |
| 0x09 | OP_REKEY | C->S | Explicit K3 epoch rotation request |
| 0x0A | OP_HEARTBEAT | C->S | Keep-alive |
| 0x0B | OP_ACK | S->C | Generic success response |
| 0x0C | OP_ERROR | S->C | Error response |
| 0x0D | OP_NACK | S->C | Negative acknowledgement |
OP_FILE_OP Sub-Operations (carried in payload "op" field): LIST, READ, WRITE, APPEND. See Section 15.1 for IANA registration of these opcodes.¶
SCSWP implements a two-layer congestion control model. Layer 1 is handled by the transport (TLS/WebSocket or QUIC). Layer 2 implements workspace-aware scheduling and backpressure above the transport layer.¶
The server MUST maintain per-client resource metrics: outstanding_ops, resource_debt, op_rate, and queue_depth.¶
If outstanding_ops >= MAX_OPS_PER_CLIENT (RECOMMENDED: 10), the server MUST reject the incoming operation with OP_ERROR code SERVER_BUSY (0x0A) and a RECOMMENDED retry_ms value of 500. The client MUST honor retry_ms before retransmitting.¶
The server MUST maintain a shared pool of N_WORKERS asynchronous workers (RECOMMENDED: N_WORKERS = 8). Each queued operation is assigned a priority score:¶
score = resource_debt(session_id)
+ op_weight(op_type)
- wait_boost(wait_time)
op_weight: READ=0 SYNC=5 APPEND=8 WRITE=10
wait_boost: min(wait_time_seconds * 2, 50)
¶
Workers MUST be dispatched in ascending score order (lowest score = highest priority), RECOMMENDED to be implemented as a binary min-heap. When an operation completes, DEBT_INCREMENT (RECOMMENDED: 5.0) is added to resource_debt. On each scheduler cycle, resource_debt is multiplied by DEBT_DECAY (RECOMMENDED: 0.9).¶
Resource debt enforces scheduler fairness but MUST NOT affect authorization. A client's right to perform an operation is determined entirely by its capability bits (Section 7.1) and its trust score (Section 6.3). Resource debt determines only WHEN an authorized operation executes, not WHETHER it is permitted.¶
The server MUST maintain a File State Record for every file operated on within a workspace, containing at minimum:¶
| Field | Type | Description |
|---|---|---|
| file_id | string | workspace_folder "/" filename |
| file_name | string | The base file name. |
| version | uint32 | Monotonically increasing. Starts at 1; incremented by 1 on each successful WRITE or APPEND. |
| lock_state | enum | UNLOCKED | WRITE_LOCK |
| locked_by | string | session_id of the lock holder, or NULL. |
| updated_at | datetime | UTC timestamp of last modification. |
The server MUST retain the complete version history of each file as a sequence of records: file_id, version, data, written_by, written_at, size_bytes.¶
SCSWP uses server-side exclusive write locks to prevent concurrent WRITE or APPEND operations from producing an undefined result.¶
A client MUST send OP_LOCK before issuing a WRITE or APPEND operation. The server MUST verify LOCK capability, atomically check lock_state, and respond with OP_ACK {status: "LOCKED"} if UNLOCKED, or OP_ERROR {error: "FILE_LOCKED"} if WRITE_LOCK is held by another session.¶
A client MAY include an expected_version field in OP_FILE_OP WRITE or APPEND payloads. If the server's current version differs, a conflict is detected.¶
The client MUST include a conflict_policy field. If absent, the server MUST apply REJECT. Defined policies:¶
Each file-modifying operation (WRITE, APPEND) MUST carry a client-generated operation_id (UUID v4 [RFC4122]). The server MUST maintain an idempotency record keyed on operation_id. If a record exists, the server MUST return the previously computed result without re-executing the operation, including idempotent: true in the OP_ACK payload. The idempotency record SHOULD be retained for a minimum of 24 hours.¶
The DNAC hash chain accumulates a cryptographic summary of the session's authenticated state. Each link is defined as:¶
DNAC_N = SHA-256(
prev_dnac ||
session_id ||
operation_id ||
state_digest ||
timestamp
)
¶
Where prev_dnac is the hex-encoded SHA-256 of the previous link, or the ASCII string "GENESIS" for the first link. All fields are concatenated with the "|" separator before hashing. The DNAC chain MUST be initialized with DNAC_0 = "GENESIS".¶
The DNAC chain advances after every significant protocol event:¶
| Event | state_digest |
|---|---|
| Successful bootstrap | "BOOTSTRAP" |
| Successful authentication | "AUTH_OK" |
| Successful WRITE v{N} | "<file_id>:v<version>" |
| Successful READ | "READ:<file_id>" |
| Trust evaluation | "TRUST:<score>" |
The server MUST persist the DNAC chain tip (DNAC_N) and preceding link (DNAC_{N-1}) to stable storage upon session termination to enable recovery.¶
When a client reconnects after disconnection, it MUST attempt DNAC-based session recovery before initiating full re-authentication.¶
Client sends OP_DNAC_RECOVERY:¶
{ "client_id": "<client_id>", "last_dnac": "<DNAC_N_hex>" }
¶
If last_dnac matches the persisted DNAC tip:¶
If last_dnac does NOT match, the server responds:¶
OP_ERROR { "error": "DNAC_MISMATCH_REAUTHENTICATE" }
¶
The client MUST perform full re-authentication starting from OP_PROVISION.¶
Every significant protocol event MUST produce an audit record containing:¶
| Field | Type | Description |
|---|---|---|
| operation_id | string | UUID v4; unique audit record identifier. |
| client_id | string | UUID v4; identifies the client. |
| session_id | string | UUID v4; identifies the session. |
| file_id | string | "<workspace>/<filename>", or NULL. |
| operation_type | string | Event name (see below). |
| timestamp | datetime | UTC timestamp of record creation. |
| result | string | "SUCCESS", "FAILED", "SUSPENDED", "DISCONNECTED", or error code. |
| trust_score | float | Trust Score T at record creation time. |
| key_epoch | uint32 | Current K3 epoch at record creation time. |
| prev_version | uint32 | File version before operation, or NULL. |
| new_version | uint32 | File version after operation, or NULL. |
| prev_hash | string | Hex SHA-256 of the previous audit record. |
| record_hash | string | Hex SHA-256 of this record's chain link. |
| dnac | string | DNAC chain tip at record creation time. |
Operation type values: BOOTSTRAP, AUTH, TRUST_EVAL, WORKSPACE_AUTH, LIST, READ, WRITE, APPEND, LOCK, UNLOCK, REKEY, DNAC_RECOVERY, HEARTBEAT, DISCONNECT.¶
Audit records MUST be chained to form a tamper-evident ledger:¶
prev_hash = record_hash of the preceding record ("GENESIS" for first).
record_hash = SHA-256(prev_hash || operation_id || result)
(fields concatenated with "|" separator; output hex-encoded)
¶
An auditor verifying the ledger MUST start from the record with prev_hash = "GENESIS" and verify each record_hash in sequence. A mismatch indicates tampering at that record. The audit ledger SHOULD be exportable in CSV [RFC4180] format.¶
A reference implementation of the SCSWP protocol, including both the authoritative server and a compatible client, is available as an open-source Python package.¶
The source code and packaging details can be found at the following URL: https://github.com/sripad2020/Secure-Collaborative-State-Workspace-Protocol¶
The published package is available on PyPI: https://pypi.org/project/scswp/¶
The reference implementation includes the min-heap priority scheduler, ECDH-based key hierarchy, DNAC hash-chain construction, and SQLite-backed audit ledger as specified in this document.¶
K1, K2, K3, and their subkeys MUST be stored exclusively in volatile memory. Implementations MUST NOT write key material to disk, log it in diagnostic output, transmit K1 or K2 in any protocol message, or retain previous-epoch K3 material after key rotation. On session termination, all key material MUST be securely erased.¶
Tokens MUST contain a minimum of 128 bits of entropy [RFC4086]. Validation MUST use constant-time string comparison [RFC6151]. Tokens MUST expire within a server-configured window (RECOMMENDED maximum: 24 hours). Tokens are single-use. After three consecutive failed validation attempts, the token MUST be permanently revoked.¶
All OP_TRUST_EVAL messages are HMAC-signed with K3.auth_key; invalid HMACs MUST be rejected and penalized. The server MUST treat the absence of OP_TRUST_EVAL for more than T_TRUST_TIMEOUT seconds (RECOMMENDED: 15 seconds) as suspicious and apply a trust penalty. Replayed messages from a previous epoch carry an outdated epoch value and MUST be rejected.¶
Clients without LOCK capability MUST NOT be able to acquire or release locks. Servers SHOULD implement a maximum lock duration (RECOMMENDED: 300 seconds) after which the lock is forcibly released and a trust penalty applied.¶
The audit store SHOULD be append-only. Periodic ledger hash checkpoints SHOULD be published to an external, immutable log. The DNAC chain and the audit chain are independent; an attacker must tamper with both to conceal an operation.¶
Deployments where data integrity is paramount SHOULD restrict all clients to the REJECT conflict policy. The CONFLICT VERSION policy is the safest option for multi-client scenarios as it preserves all versions pending administrator resolution.¶
Network change penalties are intentionally lower than device change penalties to accommodate mobile clients. Administrators SHOULD be able to manually restore a suspended session after out-of-band verification.¶
SCSWP's K1 derivation relies on the security of ECDH over P-384, which could be broken by a cryptographically relevant quantum computer [SHOR1994]. Future versions SHOULD incorporate a hybrid key establishment mechanism combining ECDH with a PQ-KEM [NIST.PQC.FIPS.203]:¶
IKM_hybrid = ECDH_secret || PQ-KEM_secret¶
This IKM_hybrid replaces the ECDH_secret input to HKDF in K1 derivation. The rest of the key hierarchy (K2, K3) is unchanged.¶
D/N/P/S signals MUST never be transmitted without K3.auth_key HMAC protection. D/N/P/S data MUST NOT appear in the audit ledger in cleartext. Administrators MUST be informed that D/N/P/S data constitutes personal data under applicable privacy regulations.¶
IANA is requested to create a new registry titled "SCSWP OpCode Registry" under the "Secure Collaborative State Workspace Protocol (SCSWP)" registry group. Registration Policy: Specification Required [RFC8126].¶
| Value | Name | Reference |
|---|---|---|
| 0x01 | OP_PROVISION | Section 4.2 |
| 0x02 | OP_AUTH | Section 5.2 |
| 0x03 | OP_TRUST_EVAL | Section 6.2 |
| 0x04 | OP_WORKSPACE_AUTH | Section 7.1 |
| 0x05 | OP_FILE_OP | Section 10 |
| 0x06 | OP_LOCK | Section 10.2 |
| 0x07 | OP_UNLOCK | Section 10.2 |
| 0x08 | OP_DNAC_RECOVERY | Section 11.3 |
| 0x09 | OP_REKEY | Section 7.3 |
| 0x0A | OP_HEARTBEAT | Section 3.2 |
| 0x0B | OP_ACK | Section 8.4 |
| 0x0C | OP_ERROR | Section 8.4 |
| 0x0D | OP_NACK | Section 8.4 |
| 0x0E | OP_CHUNK | Reserved; future use |
| 0x0F | OP_SYNC | Reserved; future use |
| 0x10-0xEF | Unassigned | |
| 0xF0-0xFF | Private Use |
IANA is requested to create a new registry titled "SCSWP Capability Flags Registry" under the "SCSWP" registry group. Registration Policy: Specification Required [RFC8126].¶
| Bit | Name | Value | Reference |
|---|---|---|---|
| 0 | READ | 1 | Section 7.1 |
| 1 | WRITE | 2 | Section 7.1 |
| 2 | APPEND | 4 | Section 7.1 |
| 3 | CREATE | 8 | Section 7.1 |
| 4 | DELETE | 16 | Section 7.1 |
| 5 | RENAME | 32 | Section 7.1 |
| 6 | LOCK | 64 | Section 7.1 |
| 7 | ADMIN | 128 | Section 7.1 |
| 8-31 | Unassigned |
IANA is requested to create a new registry titled "SCSWP Conflict Policy Registry" under the "SCSWP" registry group. Registration Policy: Specification Required [RFC8126].¶
| Name | Reference |
|---|---|
| REJECT | Section 10.3 |
| RETRY | Section 10.3 |
| MERGE | Section 10.3 |
| REBASE | Section 10.3 |
| CONFLICT_VERSION | Section 10.3 |
IANA is requested to create a new registry titled "SCSWP Error Code Registry" under the "SCSWP" registry group. Registration Policy: Specification Required [RFC8126].¶
| Code | Name | Description |
|---|---|---|
| 0x01 | INVALID_BOOTSTRAP_TOKEN | Token not found or already used. |
| 0x02 | TOKEN_EXPIRED | Token validity period elapsed. |
| 0x03 | AUTH_FAILED | ECDH or certificate verification failed. |
| 0x04 | NO_SESSION | session_id not found. |
| 0x05 | FILE_LOCKED | File held by another session. |
| 0x06 | VERSION_CONFLICT | expected_version mismatch. |
| 0x07 | RETRY_REQUIRED | Client should re-fetch and retry. |
| 0x08 | PERMISSION_DENIED | Client lacks required capability. |
| 0x09 | SESSION_SUSPENDED | Trust score at or below threshold. |
| 0x0A | SERVER_BUSY | outstanding_ops limit reached. |
| 0x0B | SIGNATURE_INVALID | HMAC verification failed. |
| 0x0C | DNAC_MISMATCH | DNAC recovery hash mismatch. |
| 0x0D | UNKNOWN_OPCODE | Received opcode not recognized. |
| 0x0E | FILE_NOT_FOUND | Requested file does not exist. |
| 0x0F | WORKSPACE_NOT_FOUND | Workspace folder does not exist. |
+-------------+ OP_PROVISION (valid token) +-------------+
| UNREGISTERED|----------------------------->| BOOTSTRAP |
+-------------+ +------+------+
|
OP_AUTH (ECDH) |
v
+--------+--------+
| AUTHENTICATING |
+--------+--------+
|
K1 derived |
v
+--------+--------+
| K1 READY |
+--------+--------+
|
K2, K3 derived |
v
+--------+--------+
+--------------------->| ACTIVE |<----+
| +--+---+---+------+ |
| | | | |
| trust < REKEY_THRESHOLD | | | |
| +----------------------+ | | |
| v | | |
| +-----------+ trust<=SUSP | | disconnect |
| | REKEYING | +------------+ | |
| | (new K3) | | | |
| +-----+-----+ v v |
| | +----------+ +----------------+ |
+-------+ | SUSPENDED| | DISCONNECTED | |
+----------+ +-------+--------+ |
| |
DNAC valid | |
+-----------+ |
| DNAC invalid |
v |
+--------+--------+ |
| RECOVERED +----------------+
| (new K3 epoch) |
+-----------------+
P-384 provides 192 bits of security, significantly exceeding the NIST 128-bit minimum [NIST.SP.800-57]. The workspace domain model involves persistent client identities and long-lived shared workspaces, making the higher security margin appropriate. P-384 is performant on modern hardware and supported natively in all major cryptographic libraries.¶
HKDF [RFC5869] provides domain separation through the info parameter; the "SCSWP_K1:", "SCSWP_K2:", and "SCSWP_K3:" prefixes ensure key material derived for different purposes cannot be confused. It also supports arbitrary output lengths, enabling a single HKDF call for K3 to produce all three subkeys simultaneously.¶
AES-256-GCM provides authenticated encryption (confidentiality and integrity in a single pass), is hardware-accelerated via AES-NI on all major CPU architectures, and is the standard cipher suite in TLS 1.3 [RFC8446].¶
The three K3 subkeys enforce cryptographic purpose separation. auth_key is used exclusively for HMAC-SHA-256 over D/N/P/S signals and MUST NOT be used for encryption. ctrl_key is used for AES-256-GCM encryption of control messages and MUST NOT be used for file payload encryption. payload_key is used for AES-256-GCM encryption of file content and MUST NOT be used for control messages. This separation ensures that a compromise of one subkey does not affect the security of the others.¶
Client Server
------ ------
OP_PROVISION {bootstrap_token, hostname} ------>
[Validate token]
[Set is_active=TRUE]
[Create session]
[Load ACL]
<----- OP_ACK {client_id, cert_pem, capabilities, session_id}
OP_AUTH {public_key_pem} -------------------->
[ECDH exchange]
[Derive K1, K2, K3]
<--- OP_ACK {server_public_key, epoch=1, epoch_nonce_b64}
OP_TRUST_EVAL {dnps, sig, epoch=1} ---------->
[Verify HMAC-sig]
[Evaluate D/N/P/S]
<------ OP_ACK {trust_score=100.0, rekey=false, epoch=1}
Client Server
------ ------
OP_LOCK {folder, filename} ------------------>
[Check ACL: LOCK cap]
<----------- OP_ACK {status="LOCKED", file_id}
OP_FILE_OP {op="WRITE", data_b64,
expected_version=5,
conflict_policy="REJECT",
operation_id} ----------------->
[ACL: WRITE cap check]
[Idempotency check]
[Version: server=5, OK]
[Worker pool dispatch]
[AES-256-GCM decrypt]
[Write to disk + audit]
[Advance DNAC]
<---- OP_ACK {op="WRITE", filename, version=6}
OP_UNLOCK {folder, filename} -------------->
<--------- OP_ACK {status="UNLOCKED"}
Client Server
------ ------
[reconnect after disconnect]
OP_DNAC_RECOVERY {client_id, last_dnac} ------>
[Look up DNAC tip]
[Compare hashes]
[Rotate K3 to epoch N+1]
<--- OP_ACK {status="SESSION_RESTORED",
epoch=N+1, epoch_nonce_b64}
[Client derives new K3; session resumes]
Client Server
------ ------
OP_TRUST_EVAL {dnps={network_ip changed},
sig, epoch=3} --------------->
[Apply -15 network penalty]
[trust=85 -> below 80: YES]
[Rotate K3 to epoch 4]
<--- OP_ACK {trust_score=85, rekey=true,
epoch=4, epoch_nonce_b64="..."}
[Client derives K3 for epoch 4; all subsequent
messages use epoch=4 and new K3 subkeys]