Skip to content

Conseal is pre-release. The interface can change between releases.

Threat model: the identity

identity gives every device in the circle the same ECDH and ECDSA key pairs, so a message sealed to the user opens on any of their devices, and outlives the device that set the circle up. The pairs travel in the keyring, the one record of the contract’s reserved keyring collection, sealed under the AEK like any record, so the server holds it without being able to open it.

  • One identity, made once. A sync creates the keyring only when it finds none on the server and none on the device, and pushes it under the contract’s fixed id with no base version. Two devices that create one at once push the same record, so one push conflicts, and that device takes the other’s keyring in place of its own.
  • Nothing handed out early. identity returns key pairs only once the server has taken them. A keyring this device made and hasn’t pushed yet could still lose to another device’s, and a message sealed to it would then open nowhere.
  • A keyring that doesn’t open isn’t replaced. When the server’s keyring doesn’t open under the AEK, this device’s own goes up with no base version, conflicts, and stops retrying (unreadable_conflict), as any unreadable conflict does. identity throws KeyringError, and the server’s record stays: if the fault is this device’s, such as a wrong key, the identity every other device holds isn’t overwritten. A keyring the server sealed itself is refused the same way, so a server can’t make a client take an identity of its own.
  • Out of the app’s reach. No registry collection may be named keyring or take its id, so get, save, remove and importAll never reach it, and a crafted export can’t plant an identity. Sync events and the report’s counts leave it out, so its private keys never reach a listener.
  • Out of every export. Exports and backups hold the registry’s collections only. A file that carried the keyring would let whoever got it open every message sealed to the user.
  • Plaintext at rest. On the device the keyring is a record like any other: the private keys sit as JWKs in the app’s RecordStore, in plaintext. identity imports them as non-extractable CryptoKeys, which keeps them out of what the app passes around, not out of the store. A script that can read the app’s storage reads them, as it could open the keyring with the AEK anyway.
  • An honest server, for one identity. A server that hides the keyring from a device makes that device create a second one, and can later serve either to either device. Both are the user’s own, made on their devices, so this costs messages, not secrecy: a message sealed to one doesn’t open with the other. Against an honest server the fixed record id and the 409 leave the user with one identity.
  • The server, to keep it. A recovery from the mnemonic gets the identity back from the server’s copy. The mnemonic derives the AEK, not the identity, so if the server’s copy is gone, so is the identity.
  • Rotate the identity. A revoked device keeps it, as it keeps the AEK.
  • Vouch for the public keys. Where others find the user’s public keys, and how they know the keys are the user’s, is the app’s.
  • Hide that it exists. The server learns that the user has an identity, and when it was made: the record’s write is dated like any other.