Repository navigation
bothy 0.2.0: encryption, conflict log, Flutter
Encryption, the conflict log and the Flutter binding. On-remote format still
bothy_format = 1: encrypted files use the encrypted flag that format 1 reserved, and
key files are new files that 0.1 readers ignore.
Added
- Client-side encryption (
cryptofeature, on by default): XChaCha20-Poly1305 for segment
bodies, snapshot chunks anddevice.json, with a random data key wrapped under an
Argon2id-derived key in per-device key files (keys/<device>/key-<hlc>.json). Config::encrypt,Config::password,Config::keyandConfig::kdf_cost;
Database::{is_encrypted, is_locked, unlock, unlock_with_key, lock, export_key, change_password}, mirrored in the blocking API. A password unlocks offline from the cached
key file.- Password change re-wraps the data key; the old password stops working on every device and
SyncReport::password_changedreports it. Cached data keys keep working. ErrorKind::KeyRequiredfor syncing a locked database.- Conflict log across the database:
Database::conflicts(since_ms)andclear_conflicts(),
Config::conflict_log(limit)(default 1,000 records,Noneturns logging off), and the
CLI commandbothy conflicts [--since <duration|date>] [--clear].Conflictnow carries
the collection, document id and the time it was recorded, and is#[non_exhaustive]. - CLI:
init --encrypt,unlock [--remember],lock,passwd,--rememberoninitand
join, the global--password-stdinflag, andBOTHY_PASSWORD/BOTHY_NEW_PASSWORD.
statusshows whether the database is encrypted and locked. - CLI:
bothy inspect scan <text>...downloads every remote file of the database and fails
if any contains the text, to check that an encrypted database leaks nothing. - Conformance vectors for the crypto primitives and encrypted segments and snapshots; a fuzz
target for key files and sealed JSON; encrypted seeds in the simulation.
Changed
- A segment with the encrypted flag and no key now fails with
KeyRequiredinstead of
FormatTooNew(vectorsegment/invalid.json, caseencrypted_without_key).
Fixed
- On Android the Drive backend verifies TLS against the Mozilla root store (
webpki-roots);
the platform verifier needs JNI setup there and panicked on the first request.
Packages
- crates.io:
bothy0.2.0,bothy-cli0.2.0 - pub.dev:
bothy0.2.0 (Flutter; building an app needs a Rust toolchain) - Demo app:
examples/flutter-notes
Full changelog: v0.1.0...v0.2.0