You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When nanobot connects to a Matrix homeserver with e2eeEnabled: true and sasVerification: true, the bot device appears as "Untrusted" in Element (Web, Desktop, and Element X Android). There is no clean way to clear this warning.
Root Cause
Modern Element clients use cross-signing to determine device trust. Per-device SAS verification alone no longer clears the "Untrusted" label — Element checks for cross-signing key signatures, not individual device verification.
matrix-nio (the library nanobot uses for Matrix E2EE) does not support cross-signing (tracked at matrix-nio/matrix-nio#229, open since 2020). This means:
The bot cannot upload cross-signing keys
Even after successful SAS verification, Element still shows "Untrusted"
Modern Element versions have also removed the UI for manually verifying another user's individual devices
Additional Gap: Bot-initiated verification
The built-in SAS handler (added in v0.2.2 via sasVerification: true) only handles KeyVerificationStart, KeyVerificationKey, KeyVerificationMac, and KeyVerificationCancel events. It does not handle:
m.key.verification.request (sent by Element to initiate verification) — arrives as UnknownToDeviceEvent
m.key.verification.ready (Element's response accepting the request) — arrives as UnknownToDeviceEvent
m.key.verification.done (final confirmation after MAC exchange) — never sent
Without handling request/ready, the SAS flow never starts when a user initiates verification from Element. The bot can only respond to start events, but Element no longer sends start directly — it sends request first.
The bot also has no mechanism to initiate verification toward a user's devices, which is needed since Element removed the manual device verification UI.
Current Workarounds
Accept the cosmetic warning — encryption works (megolm sessions are shared, messages decrypt), the "Untrusted" label is just Element being strict about cross-signing
Disable E2EE (e2eeEnabled: false) — removes encryption and the warning, acceptable for bots on private homeservers but not ideal
Problem
When nanobot connects to a Matrix homeserver with
e2eeEnabled: trueandsasVerification: true, the bot device appears as "Untrusted" in Element (Web, Desktop, and Element X Android). There is no clean way to clear this warning.Root Cause
Modern Element clients use cross-signing to determine device trust. Per-device SAS verification alone no longer clears the "Untrusted" label — Element checks for cross-signing key signatures, not individual device verification.
matrix-nio(the library nanobot uses for Matrix E2EE) does not support cross-signing (tracked at matrix-nio/matrix-nio#229, open since 2020). This means:Additional Gap: Bot-initiated verification
The built-in SAS handler (added in v0.2.2 via
sasVerification: true) only handlesKeyVerificationStart,KeyVerificationKey,KeyVerificationMac, andKeyVerificationCancelevents. It does not handle:m.key.verification.request(sent by Element to initiate verification) — arrives asUnknownToDeviceEventm.key.verification.ready(Element's response accepting the request) — arrives asUnknownToDeviceEventm.key.verification.done(final confirmation after MAC exchange) — never sentWithout handling
request/ready, the SAS flow never starts when a user initiates verification from Element. The bot can only respond tostartevents, but Element no longer sendsstartdirectly — it sendsrequestfirst.The bot also has no mechanism to initiate verification toward a user's devices, which is needed since Element removed the manual device verification UI.
Current Workarounds
e2eeEnabled: false) — removes encryption and the warning, acceptable for bots on private homeservers but not idealFeature Request
m.key.verification.requestandm.key.verification.readyevents in the SAS verification flow so Element-initiated verification completesm.key.verification.doneafter successful MAC exchangeEnvironment
e2eeEnabled: true,sasVerification: true