Element X fork with native Cardano wallet — see SYNC.md on wallet branch for topology
Find a file
Cobb de2edafe61 feat(wallet): rewrite SSSS on account data + AES-256-GCM envelope
The Rust SDK removed the low-level SecretStoreWrapper.putSecret/getSecret
API between 26.03.x and 26.04.x — it was an escape hatch we were using
to pin arbitrary bytes into a Matrix 4S slot. The SDK maintainers never
contracted that primitive; locking it down lets their recovery code
evolve without worrying about third-party storage.

This commit replaces that dependency with a self-contained design we
own end-to-end, so future SDK moves no longer break our backup flow.

### Design
- Slot: `com.sulkta.wallet.seed.v1` in Matrix account data.
  Our namespace, not a Matrix-spec 4S slot — we are NOT impersonating
  Matrix secret storage, we are holding our own opaque blob.
- Envelope (JSON): version tag, algorithm tag, random 12-byte IV, GCM
  output (ciphertext || tag), AAD = slot name. AES-256-GCM via stock
  javax.crypto. AAD binds a blob to its slot so a blob can't be lifted
  from one namespace and successfully opened in another.
- Key: derived from the user's existing Matrix recovery key via
  HKDF-SHA256 with info label "sulkta.wallet.seed.v1". The info label
  guarantees we never produce the same key bytes Matrix uses for its
  own crypto — same secret, different domain.
- I/O: client.setAccountData(key, json) + client.accountData(key)
  via the SDK; the homeserver only ever sees the opaque encrypted blob.

### Files
- api/walletsecretstorage/WalletSecretStorage.kt — new interface
- impl/walletsecretstorage/WalletSecretEnvelope.kt — AES-GCM envelope
  (with unit tests: round-trip, wrong key, tampered ct, tampered iv,
  wrong AAD, wrong version, malformed JSON)
- impl/walletsecretstorage/RecoveryKeyDerivation.kt — base58 decode
  + parity check + HKDF-SHA256 (with unit tests: determinism,
  whitespace tolerance, distinct info labels → distinct keys)
- impl/walletsecretstorage/MatrixAccountDataWalletSecretStorage.kt —
  WalletSecretStorage impl wrapping Client account data
- test/walletsecretstorage/FakeWalletSecretStorage.kt — in-memory fake
- api/MatrixClient.kt: old .secretStorage → .walletSecretStorage
- features/wallet/.../WalletBackupServiceImpl.kt — rewired to use the
  new interface; hasBackupWithoutKey now goes through the same path
  instead of manually poking the raw Matrix HTTP API.
- DELETED: api/secretstorage/SecretStorage.kt, SecretStore.kt, impl/
  secretstorage/RustSecretStorage.kt — the old SDK-dependent path.

### Backward compat note
Users who backed up a wallet seed on the OLD SDK have a blob in Matrix's
4S at `com.sulkta.cardano.wallet_seed`. This branch cannot read those.
Since the prior integration was only tested internally, acceptable
today — anyone with an old backup re-enters their mnemonic.
2026-04-17 10:16:53 -07:00
.github Update nschloe/action-cached-lfs-checkout action to v1.2.5 (#6600) 2026-04-16 15:26:20 +02:00
.idea Kotlin 2.3.20 2026-03-26 11:32:40 +01:00
.maestro CI: yet another Maestro fix (#6505) 2026-04-01 13:30:01 +02:00
annotations Improve Kover setup by using only convention plugins (#6213) 2026-03-16 14:41:07 +00:00
app Merge branch 'main' into wallet 2026-04-16 22:05:16 -07:00
appconfig Fix compilation issue: RoomAliases does not exist anymore. 2026-04-09 09:52:40 +02:00
appicon Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
appnav Take into account homeserver capabilities (#6507) 2026-04-15 12:29:41 +00:00
codegen Cleanup 2026-01-02 16:07:45 +01:00
docs fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.19 (#6411) 2026-03-20 16:20:37 +01:00
enterprise@cdde60c158 Restore enterprise submodule. (#6541) 2026-04-07 10:18:42 +00:00
fastlane/metadata/android/en-US Adding fastlane file for version 26.04.3 2026-04-16 16:40:04 +02:00
features feat(wallet): rewrite SSSS on account data + AES-256-GCM envelope 2026-04-17 10:16:53 -07:00
gradle Merge pull request #6596 from element-hq/renovate/androidx.annotation-annotation-jvm-1.x 2026-04-16 18:07:50 +02:00
libraries feat(wallet): rewrite SSSS on account data + AES-256-GCM envelope 2026-04-17 10:16:53 -07:00
plugins Setting version for the release 26.04.3 2026-04-16 16:39:44 +02:00
screenshots Sync Strings from Localazy 2026-04-13 00:48:40 +00:00
services Fix tests 2026-04-09 09:32:52 +02:00
tests Merge pull request #6587 from element-hq/feature/bma/flagsFromOnBoarding 2026-04-15 16:16:23 +02:00
tools Sign in with Classic 2026-04-13 11:16:05 +02:00
.editorconfig Restore no-unused-imports behaviour for ktlintFormat 2025-12-04 10:18:19 +01:00
.gitattributes Import Compound tests from project https://github.com/element-hq/compound-android 2025-10-06 10:47:31 +02:00
.gitignore Copyright: Add missing headers 2025-11-10 11:05:31 +01:00
.gitmodules Add git@github.com:element-hq/element-android-enterprise.git as a git module. 2024-06-26 11:58:42 +02:00
AGENTS.md Create AGENTS.md 2026-03-25 12:19:26 +01:00
AUTHORS.md Organization renaming: replace all https://github.com/vector-im by https://github.com/element-hq 2023-12-13 09:40:07 +01:00
BLOCKERS.md fix(wallet): replace text-marker hack with proper raw event API (room.sendRaw + MsgLikeKind.Other) 2026-03-27 11:45:12 -07:00
build.gradle.kts Fix TransactionTooLargeExceptions caused by Appyx (#6410) 2026-03-23 18:07:00 +01:00
CHANGES.md Changelog for version 26.04.3 2026-04-16 17:34:48 +02:00
CLAUDE.md Create AGENTS.md 2026-03-25 12:19:26 +01:00
CODEOWNERS Update CODEOWNERS after organization renaming 2023-12-12 13:54:32 +01:00
CONTRIBUTING.md Add warning about new features to pull request template (#6425) 2026-03-20 16:36:35 +01:00
Gemfile Add Gemfile to be able to run danger locally. 2023-01-19 11:13:48 +01:00
gradle.properties fix(deps): update android.gradle.plugin to v8.13.1 (#5260) 2025-11-26 11:57:22 +01:00
gradlew Update Gradle Wrapper from 8.14.3 to 9.2.1 2025-11-18 00:35:23 +00:00
gradlew.bat Update Gradle Wrapper from 8.14.3 to 9.2.1 2025-11-18 00:35:23 +00:00
LICENSE Copy licence from https://www.gnu.org/licenses/agpl-3.0.txt 2024-09-06 16:39:00 +02:00
LICENSE-COMMERCIAL New LICENSE-COMMERCIAL file 2025-01-07 09:59:50 +01:00
PHASE1-STATUS.md docs: Phase 1 verified complete — /pay autocomplete confirmed on emulator 2026-03-28 05:54:21 -07:00
README.md vector-im -> element-hq 2025-11-17 18:04:54 +01:00
settings.gradle.kts Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
SYNC.md docs: add SYNC.md explaining repo topology + upstream sync procedure 2026-04-16 21:01:31 -07:00

Latest build Quality Gate Status Vulnerabilities Bugs codecov Element X Android Matrix room #element-x-android:matrix.org Localazy

Element X Android

Element X Android is the next-generation Matrix client provided by Element.

Compared to the previous-generation Element Classic, the application is a total rewrite, using the Matrix Rust SDK underneath and targeting devices running Android 7+. The UI layer is written using Jetpack Compose, and the navigation is managed using Appyx.

Get it on Google PlayGet it on F-Droid

Table of contents

Screenshots

Here are some screenshots of the application:

Translations

Element X Android supports many languages. You can help us to translate the app in your language by joining our Localazy project. You can also help us to improve the existing translations.

Note that for now, we keep control on the French and German translations.

Translations can be checked screen per screen using our tool Element X Android Gallery, available at https://element-hq.github.io/element-x-android/. Note that this page is updated every Tuesday.

More instructions about translating the application can be found at CONTRIBUTING.md.

Rust SDK

Element X leverages the Matrix Rust SDK through an FFI layer that the final client can directly import and use.

We're doing this as a way to share code between platforms and while we've seen promising results it's still in the experimental stage and bound to change.

Status

This project is actively developed and supported. New users are recommended to use Element X instead of the previous-generation app.

Minimum SDK version

Element X Android requires a minimum SDK version of 24 (Android 7.0, Nougat). We aim to support devices running Android 7.0 and above, which covers a wide range of devices still in use today.

Element Android Enterprise requires a minimum SDK version of 33 (Android 13, Tiramisu). For Element Enterprise, we support only devices that still receive security updates, which means devices running Android 13 and above. Android does not have a documented support policy, but some information can be found at https://endoflife.date/android.

Contributing

Want to get actively involved in the project? You're more than welcome! A good way to start is to check the issues that are labelled with the good first issue label. Let us know by commenting the issue that you're starting working on it.

But first make sure to read our contribution guide first.

You can also come chat with the community in the Matrix room dedicated to the project.

Build instructions

Just clone the project and open it in Android Studio. Make sure to select the app configuration when building (as we also have sample apps in the project).

To build against a local copy of the Rust SDK, see the Developer onboarding instructions.

Support

When you are experiencing an issue on Element X Android, please first search in GitHub issues and then in #element-x-android:matrix.org. If after your research you still have a question, ask at #element-x-android:matrix.org. Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting from the application settings. This is especially recommended when you encounter a crash.

Copyright (c) 2025 Element Creations Ltd. Copyright (c) 2022 - 2025 New Vector Ltd.

This software is dual licensed by Element Creations Ltd (Element). It can be used either:

(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR

(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).

Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.