Identity model

In Tier an identity is a key pair, nothing more. There are no accounts, no registration, and no certificate authority. Whoever holds the secret seed is the identity; everyone else knows it by an ID derived from its public key.

Principles

  • Self-certifying IDs. An ID is the SHA-256 hash of an Ed25519 public key. Anyone can check that a key belongs to an ID by hashing it; no third party vouches for the binding.
  • One seed per identity. A single 32-byte secret seed reproduces the whole identity: the signing key and both long-term encryption keys.
  • Two layers. Node identities belong to devices and do transport and encryption. User identities are what people address; a node hosts them and proves, with a signed credential, that it may act for them.
  • Network binding. Every signed statement includes the network name, so it cannot be replayed into another network.
  • Verify out of band. Nothing in the network says that an ID belongs to a particular person. Compare full IDs over a separate trusted channel.

Seed and derived keys

An identity starts as a 32-byte seed from the system CSPRNG. Everything else is derived from it deterministically, so the seed is the only secret that has to be stored:

KeyDerivationUsed for
Ed25519 key pairThe seed is the Ed25519 private key seed.Signatures. The 32-byte public key is the identity material.
X25519 key pairHKDF-SHA256, input = seed, empty salt, info "tier identity x25519 v1", 32 bytes.Classical and hybrid message encryption to a node.
ML-KEM-768 key pairHKDF-SHA256, input = seed, empty salt, info "tier identity ml-kem-768 v1", 64 bytes as the ML-KEM key-generation seed.Post-quantum and hybrid message encryption to a node.

Distinct HKDF context strings keep the derived keys independent of each other. The v1 suffix versions the derivation.

IDs

An ID is 32 bytes: SHA-256(Ed25519 public key). The same rule applies to node (peer) IDs and user IDs. It is written as 64 lowercase hexadecimal characters, or as a Tier address, a checksummed bech32m form of the same 32 bytes (see Addresses).

An ID is public and safe to share. It reveals nothing about the seed, and it is the same on every Tier network.

Node identity

Each tierd has one node identity: the node's permanent network name.

  • Storage. On first start the node generates a seed and stores the raw 32 bytes in /var/lib/tier/node_key (mode 0600, directory 0700). The file is written atomically: a private temp file is created with mode 0600 before any secret byte is written, flushed, and installed with link(), which fails rather than overwrite a key that appeared in the meantime.
  • Fail closed. If the file exists but is unreadable, the wrong size, or corrupt, tierd refuses to start and leaves it untouched. A new identity is generated only when the file is confirmed absent.
  • Transport. The node presents a self-signed X.509 v3 certificate that carries its Ed25519 public key (subject CN=tierd, signed by the same key, valid for 10 years). It is the QUIC/TLS leaf certificate, so a peer's identity is exactly the key it presents in the handshake, with no external PKI.
  • Signed statements. The node key signs its membership records, its encryption-key announcement, its presence records, and every sealed message it sends.

Encryption public keys are not gossiped: the ML-KEM-768 public key alone is 1184 bytes. A node sends a signed enc_keys announcement when a connection opens, bound to the network name and verified against the key the peer authenticated with in the handshake. Presence records published to communicators carry the same keys for clients that are not directly connected.

User identity

A user identity is an Ed25519 key pair independent of any device. It is what the messenger shows as "your id", what a contact stores, and what a tier-agent collector address points to. Its ID is computed the same way: SHA-256(user public key).

A node hosts user identities as seed files in /var/lib/tier/users/<user-id-hex>.seed (mode 0600). tier-messenger creates one if the node has none; tierctl user add [seed] creates or imports one; tierctl user rm stops hosting it. A node can host many users, and the same user can be hosted on several nodes by importing the same seed.

Device credentials

The user key does not encrypt anything. It authorizes devices. The user key signs a device credential that allows one node, identified by its peer ID, to act for the user on one network until an expiry time:

signed input = "tier-user-cred-v1" || network || user public key || device peer ID || expiry
credential   = expiry (8 bytes) || signature length (2 bytes) || Ed25519 signature

A hosting node issues its own credentials, valid for 365 days, and issues them again when it restarts. A verifier accepts a credential only if the signature verifies under the user key, the device ID matches the authenticated connection, the network matches, and the expiry has not passed.

User messages

Messages between users travel as ordinary sealed messages between devices (see Encryption). Inside the sealed plaintext is a user envelope: the sender's user public key, its device credential, the recipient user ID, and the payload. The receiving node already knows which device sent the message, because the transport authenticated it. It accepts the envelope only if the credential proves that this device is authorized by the enclosed user key, for this network, and unexpired. The result is an authenticated sender user ID. The recipient user ID selects which local user gets the message, since one node can host several.

User directory

To be reachable as a user, a node enrolls each hosted user that has a live subscriber (for example, an open messenger) with the communicators responsible for that user ID. The same rendezvous hashing and two-replica placement as presence records apply (see Discovery).

  • An enrollment carries the user public key and the device credential. The device ID is not a field: the communicator takes it from the authenticated connection and verifies the credential against it, so a node cannot enroll a device it does not control.
  • An enrollment is a short lease: 20 seconds, refreshed every 7 seconds while the user has a live subscriber. A clean shutdown sends an explicit de-enrollment. If the node dies, the user drops offline within at most 20 seconds.
  • A lookup returns the user's enrolled device IDs, up to 64. A message to a user fans out to all of its online devices.
  • This is how tierctl status and the messenger decide whether a user is online, offline, or unknown.

Identities in applications

WhereIdentity
tierdNode identity, /var/lib/tier/node_key.
tier-messengerA user hosted on the node, in /var/lib/tier/users/. Select one with --as <user-id>.
tier-agentIts own user identity, from seed_file in its config (/var/lib/tier-agent/agent-agent.seed or agent-collector.seed). tier-agent id prints it.
tier-vanityGenerates new seeds offline; import one with tierctl user add <seed>.

Backups and moving identities

  • The seed is the identity. A copy acts as the identity; a lost seed cannot be recovered.
  • Back up /var/lib/tier/node_key, /var/lib/tier/users/, and for agents /var/lib/tier-agent/*.seed. Store backups as secrets.
  • To move a user to another node, import its seed there with tierctl user add <seed>. To move a node, restore node_key before the first start; otherwise a new identity is created.
  • There is no revocation mechanism in the identity layer. If a seed leaks, stop using that identity and tell your contacts the new ID over a trusted channel.

Algorithms

PurposeAlgorithm
SignaturesEd25519
IdentifiersSHA-256 of the Ed25519 public key
Key derivationHKDF-SHA256
Key agreementX25519
Key encapsulationML-KEM-768
Authenticated encryptionChaCha20-Poly1305
TransportQUIC with TLS 1.3, key exchange X25519MLKEM768 with X25519 fallback
Transport certificatesSelf-signed X.509 v3 with Ed25519
Address encodingbech32m (BIP 350), implicit prefix tier
RandomnessSystem CSPRNG

The implementation uses OpenSSL 3.5 and ngtcp2, both vendored and linked statically.