For the complete documentation index, see llms.txt. This page is also available as Markdown.

Roles

The DeRec protocol defines three roles: Owner, Helper, and Replica. The first two are present in every deployment; Replica is used when an Owner identity is backed up across more than one device. All three are logical responsibilities defined by the protocol — an implementation may deploy them in separate systems or within a single codebase, but their responsibilities and trust boundaries remain distinct.

Owner

The Owner is the entity that protects and recovers a Secret. The Owner orchestrates all protocol flows and is the only role that ever reconstructs the encryption key.

Responsibilities

The Owner is responsible for:

  • Generating or managing the Secret to be protected

  • Encrypting the Secret and splitting its key into shares using a threshold scheme

  • Pairing with Helpers over secure pairing sessions

  • Distributing shares to Helpers

  • Initiating verification, discovery, and recovery flows

  • Reconstructing the Secret from recovered shares once the threshold is met

  • Unpairing Helpers it no longer wants to use — only the Owner side of a channel may start Unpair

  • Announcing changed endpoints or communication info to its Helpers (UpdateChannelInfo)

  • The Owner controls the configuration of:

    • Number of Helpers (n)

    • Recovery threshold (t)

    • Each Helper's weight (subshares per share, one by default)

    • Helper set membership

Security Boundary

The Owner environment is assumed to be trusted during:

  • Secret creation

  • Key generation

  • Share generation

Recovery and reconstruction

If Owner's environment is compromised during recovery, the confidentiality of the Secret cannot be guaranteed. The protocol does not attempt to protect against a compromised Owner.

Helper

A Helper is an independent entity that stores one share for a given secret version of the encryption key on behalf of the Owner. A Helper participates in protocol flows but never reconstructs the Secret or the full encryption key.

Responsibilities

A Helper is responsible for:

  • Establishing secure communication with the Owner

  • Receiving and storing a key share, or refusing it

  • Enforcing protocol-defined validation rules

  • Participating in verification flows

  • Answering discovery requests with the secrets and versions it holds

  • Returning its stored share during a valid recovery session

  • Accepting or refusing an Owner's unpair request

  • Announcing its own changed endpoints or communication info (UpdateChannelInfo; apart from Pairing, it is the only flow a Helper starts)

  • A Helper must not

    • Attempt to derive the encryption key from a single share

    • Store or request the plaintext Secret

Independence Requirement

Security relies on Helper independence. The protocol assumes that fewer than the threshold number of Helpers collude. If t or more Helpers collude and combine shares, reconstruction of the encryption key becomes possible.

Each share is expected to go to a different Helper, so that compromising one Helper yields at most one share. A single guardian acting as several Helpers for the same Owner is against the protocol's recommendation and discouraged; the library does not prevent it, and the application then resolves channel linking itself; see One share per Helper.

Additionally, helpers are not required to know anything about the Helper Set. This means that Helpers can participate in the protocol without being aware of how many helpers (n) exist in the Helper Set nor how many Shares (t) are required to reconstruct the Encryption Key.

Replica

A Replica is another device under the same Owner identity, used to keep the Secret synchronized across more than one device. The full conceptual treatment lives in the Replicas section; this entry summarizes the role's responsibilities and trust boundary.

Replica devices share the Owner's trust boundary: they hold the full Secret, including the per-Helper shared keys and the replica-group shared key.

Source and Destination

Every member of a replica group holds a persistent ReplicaRole, recorded in the roster inside the Secret. Exactly one member is the Source; every other member is a Destination. The role is not a handshake detail: it is stored, every member records the same value for a given peer, and it decides ties when members catch up with ReplicaDiscovery.

When the Source is removed with UnpairReplica, the device running the removal promotes a successor — the first remaining member its channel store returns — and publishes the new roster. Every other member reads the new Source from that roster. Removing a Source that is the only member dissolves the group.

Responsibilities

A Replica is responsible for:

  • Joining a group: an existing member creates a contact, and the new device scans it and starts pairing as ReplicaDestination

  • Keeping its local Secret in sync with the rest of the group, and catching up with ReplicaDiscovery when it has fallen behind

  • Acting toward Helpers on the same footing as the Owner — once synced, every Replica can drive any flow the Owner can drive

  • Removing members that should no longer hold the Secret, with UnpairReplica followed by a publish. Any member may remove any member, the Source included

Trust Boundary

Everything in the Owner trust model applies to every Replica. A compromised Replica is equivalent to a compromised Owner — the protocol does not attempt to protect against it.

The replica_id identifier, the role model in full, and the conflict surface that arises when more than one Replica publishes concurrently are covered in the Replicas section. Member removal is covered in Replica removal.

Role Interaction

The protocol defines structured interactions between Owner and Helpers. These include:

  • Pairing or session establishment

  • Share distribution

  • Share verification

  • Discovery of the secrets and versions a Helper holds

  • Recovery requests

  • Unpairing (started by the Owner only)

  • Channel-info updates (UpdateChannelInfo, started by either side of a Helper channel)

Replica group members additionally interact among themselves: Secret synchronization on every publish, catch-up (ReplicaDiscovery), and member removal (UnpairReplica).

All interactions are performed using defined message schemas and protocol validation rules. Ad hoc communication outside protocol-defined flows is not considered valid participation.

These interactions correspond to the protocol flows defined in Flows.

Logical vs Physical Deployment

Roles are defined at the protocol level. In practice:

  • A mobile wallet may implement the Owner role.

  • A cloud service may implement the Helper role.

  • An organization may operate multiple Helpers, each a separate Helper identity; acting as several Helpers for the same Owner is discouraged.

  • A user backing the same identity across a phone and a laptop runs the Owner role on each device, with the two devices paired to each other as Replicas.

  • A single vendor may implement both roles in separate services.

    The protocol enforces logical separation of responsibilities even if roles are implemented within the same organization.

Summary of Capabilities

Role
Can Access
Cannot Do

Owner

Full Secret lifecycle

Recover without threshold shares

Helper

One key share

Reconstruct the Secret independently

Replica

Full Secret under the same Owner identity (synced state)

Recover without threshold shares

The protocol’s security guarantees depend on maintaining these role boundaries and enforcing threshold-based reconstruction. The Replica role is documented in depth in the Replicas section.

Last updated