Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

3.6 KB
Raw Blame

AliasVault Rust Core

Cross-platform core library providing shared business logic for all AliasVault clients:

  • Browser Extensions (Chrome, Firefox, Edge, Safari via WASM)
  • Web App (via the same WASM build)
  • Mobile Apps (iOS via Swift bindings, Android via Kotlin bindings)

Core Modules

vault_model

The client vault datamodel registry (tables, keys, scoping, bucket layout), generated from core/models/src/vault/VaultTableRegistry.ts.

vault_codec

The manifest-v1 storage format: canonicalize the local SQLite tables into manifests, data buckets and content-addressed blobs, and materialize them back.

vault_merge

Last-Write-Wins (LWW) merge of a local vault onto the server's, one manifest at a time, rows out.

vault_pruner

Permanently deletes items in trash older than retention period (default: 30 days).

vault_sync

The sync engine every client drives: a sans-IO command loop that asks the host for HTTP, state and SQLite access and runs the status check, pull, merge, push and the storage-format migration. Its tests run the whole engine against an in-process model of the v2 vault API (tests/fake_server.rs) with a real SQLite host per device (tests/test_host.rs).

sqlite_host

An in-memory SQLite database (SqliteMemoryDatabase) that hosts every client's vault, so no platform needs its own SQLite build.

credential_matcher

Priority-based credential filtering for autofill. Root domains come from an embedded copy of the Public Suffix List (src/credential_matcher/public_suffix/public_suffix_list.dat) which is refreshed on every release.

email_parser

RFC 822 email parsing into html/plain bodies and attachment metadata, with on-demand attachment bytes.

favicon

Which of an item's URLs a favicon is fetched from, and the Logos.Source key it is stored under.

password_generator

Password and passphrase (Diceware) generation with embedded per-language wordlists.

identity_generator

Random identity (alias persona) generation: names from embedded per-language dictionaries (decade-based for de/it/ro), birth date, email prefix and username. See src/identity_generator/dictionaries/README.md for the dictionary format.

crypto

Argon2id key derivation, AES-256-GCM, RSA-OAEP key grants, the account key hierarchy and the SRP-6a handshake.

common

Crate-wide helper utils.

bindings

The host entry points: wasm (wasm-bindgen, browser) and uniffi_api (UniFFI, Swift and Kotlin).

Building

./build.sh --web                # WASM for the web app
./build.sh --browser-extension  # WASM for the browser extension
./build.sh --ios                # iOS device + simulator with Swift bindings
./build.sh --android            # Android ABIs with Kotlin bindings
./build.sh --mobile             # iOS + Android
./build.sh --all                # All targets (WASM as --web)

Only the web app (fetched on page load) builds with the size-optimized release profile. The browser extension (extension profile), iOS and Android (mobile profile) build with opt-level = 3, which trades a few megabytes for faster sync, since those ship as a one time download. The web build is written to core/client/wasm-web and the extension build to core/client/wasm-extension, and each app resolves its own through a package condition. Every build bundles SQLite behind SqliteMemoryDatabase, which hosts every client's vault database in memory. (brew install llvm), which build.sh finds on its own.

Testing

cargo test                    # All tests
cargo test vault_merge        # Specific module
cargo test --features uniffi  # With UniFFI enabled