Skip to content

Spec doesn't explicitly forbid changing the ed25519 signing key of a device #2442

Open

Description

@tulir

Link to problem area: https://spec.matrix.org/v1.19/client-server-api/#device-keys

Issue
Devices for e2ee have an ed25519 signing key and a curve25519 identity key. The ed25519 key is meant to be permanent, but the strongest statement in the spec seems to be "[...] device keys, which are long-lived [...]", which isn't all that strong. In practice, most SDKs (matrix-rust-sdk, mautrix-go) already reject changes to device signing keys, so this is just a spec omission

The spec should probably also specify that the signing key can't be safely changed even by logging out and back in, because that will still fail if a client is offline for the entire time between the logout and relogin.

Activity

  1. added
    clarificationAn area where the expected behaviour is understood, but the spec could do with being more explicit
    spec-omissionimplemented but not currently specified
    A-E2EEIssues about end-to-end encryption
    on Sep 12, 2026
  2. richvdh commented on Sep 22, 2026

    @richvdh
    Member

    I think we could go further, and forbid changing the curve25519 identity key. The spec claims that it can be replaced, but in practice attempting to do so will cause all hell to break loose (see element-hq/element-meta#2374), and frankly if your curve25519 key is compromised then you need to consider the whole device compromised anyway, so there's no reason to rotate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-E2EEIssues about end-to-end encryptionclarificationAn area where the expected behaviour is understood, but the spec could do with being more explicitspec-omissionimplemented but not currently specified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions