Skip to main content
The Dart binding wraps the native Rust core via dart:ffi. It targets Dart ≥ 3.5. The current loader supports Windows, Linux and macOS desktop library names; this guide does not provide an Android or iOS Flutter build procedure.

1. Get the binding

The package lives in the public everabyte/crypto-sdk repository — pub supports git dependencies with a subdirectory:
The Dart code is a dart:ffi wrapper over the native core (bindings/dart/rust). You need that native library on each platform you ship:
The package loader checks EVB_E2EE_LIB and then searches the package’s Rust target directory for those desktop library names. Do not assume it automatically loads a Flutter plugin asset. Android needs a separately cross-compiled .so for each supported ABI and an Android-aware loader/integration; iOS needs a compatible static/framework integration. Those mobile build and packaging steps are not documented or supported by this quickstart.

2. Generate the account key (UMK) — on device

Persist only wrapped copies: seal the UMK under a recovery phrase and/or a device secret, and keep those secrets in flutter_secure_storage (or your platform keychain). Register the chain with the same POST /e2ee/keys/register call as the TypeScript quickstart:
The device wrap key is derived from deviceSecret, which must never leave the device — Everabyte receives only the wrapped blob and a public device label. Deriving it from a transmitted value (an ID, a name) would let the server silently recover the key; the SDK’s API makes that mistake unrepresentable by taking the secret directly.

3. Encrypt before upload

4. Upload and attach — same REST contract

  1. POST /files/upload/{bucketId} — multipart, file part named wireName (the opaque alias).
  2. POST /e2ee/files/by-path/envelope — { bucketId, fileName: wireName, encryptedName, ...envelope }.
If envelope attachment times out, reconcile the result before cleanup: the server may have committed the envelope. When a file ID is known, check GET /e2ee/files/{fileId}/envelope. After a confirmed failure, find the uploaded row by bucket and opaque wire name, confirm it has no envelope, and hard-delete it through the file API as required by the E2EE upload contract. Handle retention blocks explicitly.

5. Download and decrypt

Every binding opens the same frozen vectors, so a file encrypted here decrypts identically in the Rust crate, the WASM binding and the Everabyte web app.

Next steps