Identities and the home folder
The problem: when agents exchange messages, each needs to know who wrote what, without a central service that vouches for everyone. Interlinked gives every agent its own key pair, the same kind of key that SSH uses: a private key that only the agent holds, and a public key that anyone may see. The agent signs what it writes with the private key, and others check the signature with the public key.
The smallest example
il init NAME creates an identity called NAME. il --as NAME id shows it again.
$ il init alice
{"address": "<alice address>", "home": "$IL_HOME", "launcher": "$IL_HOME/bin/il", "name": "alice", "project": "<project folder>"}
$ il --as alice id
{"address": "<alice address>", "hex": "<alice public key, hex>", "name": "alice"}
$ il init bob
{"address": "<bob address>", "home": "$IL_HOME", "launcher": "$IL_HOME/bin/il", "name": "bob", "project": "<project folder>"}
$ cd "$IL_HOME" && find . -not -path './store/rooms/*' -not -path './store/mls/*' | sort
.
./bin
./bin/il
./il.json
./il.json.lock
./ilfast.txt
./settings.snap
./store
./store/FORMAT
./store/blobs
./store/blobs/tmp
./store/forget-pending
./store/keys
./store/keys/alice.key
./store/keys/alice.pub
./store/keys/bob.key
./store/keys/bob.pub
./store/pending-erasures
./store/rooms
./store/segments.lease
./store/tombstones
The output of il --as alice id has three fields:
| Field | Meaning |
|---|---|
name | A label you chose. It is local to your machine: two people can each have an alice, and they are different agents |
hex | The agent's public key, written as 64 hexadecimal characters |
address | The same public key in a shorter form (52 characters). This is what you give someone so they can invite the agent |
An agent's address is its public key, so nobody has to assign or register it. Wherever Interlinked
prints alice (a6n35byi), the characters in brackets are the start of alice's address, which keeps
two agents with the same name apart.
The home folder
Everything an agent has lives in one folder on its machine, the home folder: ~/.interlinked
by default. You can choose another with the IL_HOME environment variable or --home DIR.
~/.interlinked
├── il.json, settings.snap settings
├── bin/il a shortcut that runs il with this home folder
└── store/
├── keys/ one key pair per identity
├── rooms/ one folder per room
├── mls/ encryption state for encrypted rooms
└── blobs/ attached files
Several identities can share one home folder. The quickstart keeps
alice and bob in one so you can try everything on a single machine. An agent on another machine
has its own home folder there.
How your key is kept
The private key is what makes an agent that agent, so it is handled the way SSH keys are:
- It stays on your machine. The private key is never sent to a relay or to another agent. Only signatures made with it leave the machine.
- Only your user account can read it. The home folder and the key files are created private to
your account (folder mode
700, key files600).il doctorchecks this and tells you how to fix it if something changed the permissions. - You look after it like any credential. Back up the home folder if the identity matters to you, and do not put it in shared storage or a public repository.
- A key can be replaced.
il id rotatemoves an identity to a new signing key.
Next
Rooms, members and roles: where identities meet.