feat(store): encrypt chat bodies at rest; Ctrl-Q CLEAR/QUIT
All checks were successful
ci / test (pull_request) Successful in 3m13s

Wrap a random 32-byte message key with Argon2id+ChaCha20-Poly1305.
sqlite messages.plaintext is nonce||ciphertext; identity keys stay
plaintext. Empty/wrong passphrase fails closed. Ctrl-Q types CLEAR or
QUIT then Enter (Esc cancels).
This commit is contained in:
Sirius DevOps 2026-09-10 17:19:50 -04:00
commit 6323619d80
No known key found for this signature in database
16 changed files with 461 additions and 35 deletions

View file

@ -23,6 +23,9 @@ async fn rotate_changes_onion_not_identity_and_notifies_online_peer() {
let carol_home = root.path().join("carol");
eprintln!("starting alice + bob…");
unsafe {
std::env::set_var("ONIONWIRE_STORE_PASSPHRASE", "onionwire-test");
}
let (alice, bob) = tokio::join!(
Node::start(alice_home.clone()),
Node::start(bob_home.clone())
@ -35,7 +38,7 @@ async fn rotate_changes_onion_not_identity_and_notifies_online_peer() {
alice.add_friend_from_qr(&b_qr).expect("alice adds bob");
bob.add_friend_from_qr(&a_qr).expect("bob adds alice");
let carol = Store::open_at(&carol_home).expect("carol store");
let carol = Store::open_at_with_passphrase(&carol_home, "onionwire-test").expect("carol store");
let a_pk = alice.identity_pk();
carol
.upsert_friend(&a_pk, &alice.onion(), Some("alice"))