Two things the emulator run surfaced:
- The invite payload is about a kilobyte, so the plain Text card grew past the
screen and pushed Copy invite / Done below the fold on a phone. Four lines
with an ellipsis: the copy button carries the whole string, and the QR is the
primary path anyway.
- "Node & Settings" as a 10sp label in a third of the bottom bar is one OEM font
scale away from wrapping. The tab says "Settings"; the destination screen keeps
its "Node & Settings" title.
Plans P2 and P3 are one change: the shell decides who calls the roster, so the
roster cannot land before it. The tree is green at this commit, which is why
they are not split.
Shell (P2)
- The horizontal text-link bar is gone. Three top-level destinations hang off a
persistent 64dp bottom bar — Chats (default), Wallet, Node and Settings — and
everything else is a sub-screen behind a chevron.
- MainActivity owns the shell: a Scaffold with the tab bar around a NavHost of
chats / wallet / settings plus share, paste, chat, profile, wallets and
rotate. Tab selection pops back to the start destination and restores saved
state, so a chat left open behind the Wallet tab survives a trip to Settings.
- The node keeps living on the wallet screen, where its card already is, so the
third tab is the security surface: profile, saved wallets, rotate identity,
delete message history, the keep-alive status row, and — disclosed here
instead of under the roster — the identity/SDK lines that made the home screen
read as a test build.
- OwTopBar: 20sp bold title, optional "Tor active" pill beneath it, a 36dp
padlock surface for Lock, and the overflow. Rotate identity, saved wallets and
delete history live in the overflow; the destructive two go through a typed
confirmation dialog or the typed ROTATE screen, never a single tap.
- Insets: the tab bar consumes the navigation-bar inset and
LocalBottomBarPresent tells screens inside the shell not to pad for it again,
so there is no double gap above the tabs and the IME still wins when the
keyboard is up.
- window.isNavigationBarContrastEnforced = false on Q+, so the system's
translucent scrim does not draw a second band over the canvas.
Messenger (P3)
- The identity block is one bar: identicon, "Your identity", the truncated
fingerprint in mono, a copy-invite icon and a QR icon. Gone from here: the
YOU (stable forever) card, the "sdk … · identity = ed25519 pubkey" line and
the keep-alive paragraph. The full fingerprint and locator stay on the profile
and invite screens.
- The empty state says what to do and offers both ways out ("Add contact",
"Share my invite"), and keeps the honest sentence: invites are not
discoverable.
- Friend rows: petname, short mono fingerprint, and a locator shortened as
head…tail.onion — the suffix is never the part that is cut, and a v3 onion is
never soft-wrapped.
- Invite sharing shows a QR of the payload beside the copyable text; the clip is
marked sensitive on API 33+.
No ViewModel, SDK, Tor or wallet call changed. Every callback is the call the
old screens made; the wallet screens are untouched for the next card.
One palette, one geometry, one button. The alpha build had a four-colour
darkColorScheme and every screen inventing its own pill, which is why the app
read as a debug harness; `ui/Theme.kt` now carries the tokens and new UI takes
them from `OwColors` / `OwRadius` / `OwSize` instead of Material defaults.
Tokens (§1.1, §1.2): canvas #0A0C0E, surface #12161A, interactive #1C2228,
border #262E36, mint accent #2EE59D, text #F3F5F7 / #9BA3AE / #5E6773, and the
amber/crimson status triples. Cards are 16dp; buttons and inputs are 12dp
squircles; 999dp survives only for status pills. Typography is system sans for
chrome, and `MonoStyle` is the single mono style, reserved for pubkeys,
truncated locators, seeds, host:port and block heights.
Primitives (§1.3), in `ui/components/`:
- OwButton — primary / secondary / outline / destructive, exact heights and
radii, no elevation;
- OwSegmentedControl — one track, accent selected segment, animated;
- OwAlertBanner — warning / error / info with a status icon and a tinted
surface;
- OwCard, OwDivider, OwPill, OwStatusDot, TorStatusPill, OwSectionTitle,
OwIconButton (36dp), Identicon, OwConfirmDialog (typed confirmation),
OwQrCode (zxing, light plate for scanning).
Fourteen single-colour vector icons, so no `material-icons-extended` (a
multi-MB dependency) and no icon font. `Label`/`Mono` moved here from the
roster so the design system is not owned by one screen.
Behaviour: none. These are pure view helpers.
The store and identity backup shared one hard-coded Argon2id profile
(m=19456 KiB, t=2, p=1) with nothing recorded on disk, so changing it
would have bricked every existing store and backup.
Record the profile with the data and raise the default:
- KdfProfile { Legacy = 0, Current = 1 }; Current is m=65536 KiB,
t=3, p=1, out=32.
- Backups: seal() writes a profile byte after owbak1. Legacy blobs
(exactly SEALED_BODY_LEN after MAGIC) still open; an unknown id is
an error, never a fallback.
- Stores: store_meta gains kdf_profile (additive, default 0). The
SQLCipher file key has no place to record a profile before the db
opens, so a legacy file is detected by trial-opening with the
legacy profile, then rekeyed to Current in one SQLCipher
transaction; store_meta is re-wrapped (salt + ciphertext + profile)
in a single transaction on the first successful unlock. Both are
one-shot: the next start takes the current path.
- docs/THREAT_MODEL.md states the new params and the versioning.
Measured in release on this host: kdf legacy 0.018s / current 0.095s;
Store reopen current 0.354s, legacy upgrade path 0.528s.
`tip` was the one payment frame with no domain tag: sign_tip signed the
LF-joined fields, so its signature could be confused with any other
newline-joined preimage. Mirror inv/rcp: sign_tip now emits
"onionwire-tip-v1" || 0x00-separated txid/amount/address/memo/ts, and
verify_tip tries that form then the historical layout.
Legacy acceptance is now one switch instead of nine call sites:
`pay::LEGACY_SIGS` (default true) plus `pay::legacy_sigs()`. Every v1 /
concat fallback reads it — the `onionwire:v1` invite string and its two
historical signature forms, `loc`, `inv`, `rcp`, and `tip`. `prf` is not
gated here because src/profile.rs is outside this card's file scope; the
spec says so.
Tests: legacy-on keeps every untagged form verifying (incl. a new tip
case); legacy-off rejects each untagged form while the tagged form still
verifies (loc, inv, rcp, tip, invite); sign_tip is pinned to the tagged
layout.
docs/PROTOCOL.md gains the emitted/accepted table per signed frame and
the mixed-fleet consequence.
The app-spawned child already takes its login from the sealed store record
and only falls back to ONIONWIRE_WALLET_RPC_LOGIN; make that order explicit
in the code and name the exposure once per process when the fallback is used.
The dial URL still carries user:pass (Wallet::from_url needs it), but no
rendering path repeats it: Endpoint::redacted and WalletClient::redacted_url
print http://<redacted>:<redacted>@host:port/json_rpc, WalletClient has a
hand-written Debug, and error/status copy redacts the whole login, not just
the password half.
Residual, documented at the top of wallet_child.rs: --rpc-login is visible in
/proc/<pid>/cmdline to same-uid processes because monero-wallet-rpc has no
other credential channel.
`setUnlockedDeviceRequired(true)` is now set on the key that wraps the store
passphrase (API 28+; below that the pre-gate path is unchanged and logs which
branch ran). `setUserAuthenticationRequired(false)` is untouched: the gate only
refuses while the lock screen is up, it is not a biometric prompt, so an
unattended unlock on an unlocked device still works.
A Keystore key cannot be retrofitted, so the gate needs a second alias:
`onionwire.store.unlock-gated` is generated with the flag and is the only key a
fresh install creates; `onionwire.store` is the pre-gate key and exists only on
installs that stored a passphrase earlier. Migration runs the next time the
passphrase is in hand (save(), or a successful load() — never inside open(),
which must not generate keys):
1. seal under the unlock-gated key (created here if needed)
2. write the blob to `…bin.tmp`
3. read those bytes back, open them with the gated key alone, compare to the
passphrase in hand — failure drops the temp file, throws SecretUnavailable
with the reason, and leaves the previous blob and key untouched
4. rename the temp file over the blob
5. only now delete the pre-gate alias
A crash before 4 leaves the old blob and key intact; a crash between 4 and 5
leaves a working gated blob plus a stale alias the next save/unlock retires.
`open()` tries the gated key first and falls back to the pre-gate key, so that
window is harmless. `forget()` deletes both aliases.
Reporting is honest about a platform limit: `KeyInfo` exposes
`isUserAuthenticationRequired` but has no getter for the unlock requirement, so
nothing can ask the Keystore whether the flag stuck.
`KeystorePassphraseCipher.unlockGateReport()` reports our own bookkeeping (which
alias the live key was generated under) plus `platformReportsGate = false`, and
a device whose Keystore refuses the flag falls back to the ungated alias and
says so instead of claiming the gate. A locked device that makes the gated key
unusable is reported as "the device is locked", not as a GCM tag failure.
Instrumentation: migration happy path (gated key appears, pre-gate alias gone
only after the on-disk blob opens under the new key), a failed re-wrap (old key
and blob byte-identical, no temp file), the gated proof refusing a pre-gate
blob, and the crash window still unlocking. Logcat lines print
MANUFACTURER/MODEL/SDK_INT and the branch taken. Not run here: no device or
emulator on this host. JVM suite still 213 tests / 0 failures; androidTest
sources compile.
Records why epoch 0 is prekey-derived: one-shot Noise sessions plus
both-send-first convergence forbid a per-session secret with no wire field.
Evaluates a one-time prekey batch in the invite, a per-session epoch field in
the hybrid header, and accepting the window; picks accept with named revisit
triggers. No code or protocol change.
Measured facts used: v2 invite is 1930 chars; each ML-KEM-768 OPK adds 1584
base64url chars; MAX_INVITE is 4096; the TUI QR path (qrcode 0.14.1,
EcLevel::M) caps at 2331 bytes.
Run 770 built the APK and AAR and uploaded them as an artifact, then the release
never received them: /actions/runs/770/jobs lists only `android`, because a
job-level `if` that reads `needs.android.result` on this runner is evaluated as
unset and the job is dropped before it is created. A dropped job is invisible -
it is not a red job and not a skipped job in the job list - so the run reads
green while the release is missing two assets.
release.yml's publish job already carries `always() &&` for exactly this reason
(its comment cites run 135). Mirror it. Nothing else changes: the job is still
gated on android succeeding and on dry_run being false.
The publish job has never completed. Two plumbing bugs, no crypto involved:
1. The sign step ran `docker run -v "${GITHUB_WORKSPACE}:/work"`.
GITHUB_WORKSPACE is a path INSIDE the job container, but docker resolves a
bind mount's source on the HOST, where that path does not exist — so /work
arrived empty and the script was absent. Run 768 failed with
"bash: .ci-tools/scripts/sign-release.sh: No such file or directory" (127).
Rehearsed locally against the pinned image: the bind mount yields an empty
/work, the same command with a named volume + docker cp signs and
self-verifies all four assets. Use the build jobs' pattern.
2. Signing ran before the files it signs existed. The find+cp loop that fills
dist/ lived in the publish step, after the signature step. Move it into its
own "Stage both arch artifacts into dist" step before signing, and let
publish only validate dist/.
Fail-closed design unchanged: no MINISIGN_SECRET_KEY stops before any upload,
signing still precedes publishing, and the tag cleanup step is untouched.
docs/RELEASING.md described the old publish job; it now matches the workflow.
The signing step has never run: there was no keypair, so no .pub in the tree and
no MINISIGN_SECRET_KEY secret. scripts/sign-release.sh resolves its public key at
.ci-tools/scripts/onionwire-signing.pub, which is this path in the CI checkout,
so it exited on "no public key" before minisign was ever invoked. Release run 767
died here and its fail-closed cleanup deleted the tag it had created; nothing was
published.
Generated with `minisign -G -W` (no passphrase: CI cannot answer a prompt, and a
passphrase stored beside the key in the same secret store protects nothing). The
secret half lives only in the Forgejo Actions secret MINISIGN_SECRET_KEY; it is
not in this repository and never has been. Procedure: docs/VERIFY.md,
"Maintainer: the signing key".
Public key: RWRWHhuty5VhgHpdAsbzMVNLmu1mztJblfxv06HjtVcrKHKS75792Jb+
README, android/README, VERIFY and the two release scripts all named v0.14.0,
a version that was never tagged or released - the newest tag is v0.4.0, so the
documented download URLs were dead. Align them with the version this release
cuts (minor bump off v0.4.0 -> v0.5.0).
VERIFY.md gains a Check 0: /releases/latest/download/... is not served by this
Forgejo (404, pin the tag), and Cloudflare answers a non-browser User-Agent with
403 error code 1010 even on a correct URL (measured: browser 206, curl 206,
Python-urllib 403).
Padding and the hybrid header are independent layers: the bucket is inside
the ratchet AEAD, the 2312-byte header is outside it. tests/padding.rs now
drives the ladder through a real hybrid step and asserts 2601 bytes in the
Noise body (2622 on the wire) against the classical 329/350, plus the
35113-byte largest-bucket frame under the 65535 cap. The node-level PQ
round-trip is corrected to say what it actually proves: epoch 0 stays
classical, so its frame does not widen.
Every ratchet keypair is {x25519, ml-kem-768}. On a rotation the stepper
encapsulates to the receiver's current ratchet KEM key; both the X25519 DH
and the ML-KEM secret feed KDF_RK under the new onionwire-ratchet-v2-kdfrk
domain, so a later X25519 break does not open a chain established by a
hybrid step.
Epoch 0 stays classical by construction: the bootstrap root must be a pure
function of the two long-lived prekeys for both-send-first convergence, and
a per-session ss_kem differs for every one-shot Noise dial. The first
rotation (including the bootstrap tie-break rotation) is hybrid, so the
residual HNDL window is exactly the epoch-0 chain. docs/THREAT_MODEL.md
states that window; no full PQ forward secrecy is claimed.
Header 0x02 adds kem_pub[1184] || kem_ct[1088] to the 40-byte classical
header and is used on every frame of a hybrid chain, so a lost first frame
is harmless. A step with no KEM section is rejected (hybrid step required)
and a hybrid step at a classical friend is rejected (unexpected hybrid
step): no classical fallback.
State moves to blob v0.2: fixed 211-byte prefix plus flagged KEM fields.
A v1 blob is dropped and re-bootstrapped (hard cut, like F8); a corrupt v2
or a newer version is an error, not a silent reset.
Tests: hybrid root agreement on both sides, both-send-first convergence
with hybrid keys, no-downgrade, tampered kem_pub/kem_ct fail closed,
MAX_SKIP on a hybrid chain, classical friends still step classically,
state freeze at v0.2 and the node-level hard cut.
Chat plaintext is padded inside the ratchet AEAD to one of
256/512/1024/2048/4096/8192/16384/32768 bytes, with an explicit big-endian
uint16 pad_len followed by the body and random fill. An observer sees only
the bucket; the padding is authenticated by ChaCha20-Poly1305 and by the
Noise session. The receiver trusts pad_len only, rejects an overrun before
appending or persisting anything, and never infers a boundary from trailing
bytes. fil chunks are unchanged.
docs/PROTOCOL.md gains a normative Length buckets section, THREAT_MODEL
replaces the no-padding limit, README notes the bucketed chat length.
Adds an ML-KEM-768 install key beside the ed25519 identity and x25519
prekey. A friend added from a v2 invite always gets a version-2 PQ
prelude before Noise msg 1, and both sides bind (ct, ss_kem) into the
Noise prologue (onionwire-v2 \0 ct \0 ss_kem). The row decides: a
kem_pk friend without a prelude is rejected with 'prelude required',
a prelude for a classical row with 'unexpected prelude'.
Invites are now onionwire:v2 with kem=<base64url pk>; decode still
accepts v1 (no kem) and yields a classical friend. F8 rotates the
KEM key with the prekey and hard-cuts stored ratchet state. The TUI
labels a legacy friend 'classical'.
Docs: PROTOCOL (keys, framing, prologues, no-downgrade, invite v2),
THREAT_MODEL (what PQ transport does and does not buy; epoch 0 stays
classical), README (invite size, F8, legacy caveat). SDK exposes pq on
InviteInfo/FriendInfo and gains a v2 decode round-trip test.
A bare monero-wallet-rpc name is the executable beside this binary
when that file is executable, then PATH. An absolute path is left
alone, so Android and operator overrides keep working. Remote daemon
and remote wallet RPC are unchanged.
The F7 NODE row kept the height from child start. Ctrl-R only
re-read that cache, so a syncing daemon looked frozen. Poll
wallet_child_refresh off the UI thread and copy the answer back.
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
`cuprate-daemon` is a default feature, so `cargo test --locked` in the Pi CI
job compiles `tapes`. That crate calls `VecDeque::pop_front_if`, stable only
since 1.93. `rust:1.91-bookworm` dies with `error[E0658]: use of unstable
library feature 'vec_deque_pop_if'` after the rest of the graph has already
built. The Android workflows were already on 1.98 for this; ci.yml and
release.yml were left on 1.91 when the feature was off, and that is no longer
true.
`rust-version` moves with the image. cargo checks it before features, so a
1.91 compiler must be refused up front instead of fifteen minutes into
`tapes`. `--no-default-features` would still compile on 1.91; the declared
floor is the default build's floor, which is what CI and `cargo build` run.
RandomX's cmake-rs build script panics with "is cmake not installed?"
in the rust:bookworm job container once cuprate-daemon is a default
feature. Install cmake and build-essential in the root test, release,
and fuzz containers. Android jobs already did this.
The Wallets & Settings screen only named keys that already work. F6 is the
wallet, F7 is the node, and p on the roster or chat opens peer payments.
Profile, backup and wipe stay composer commands, named in help.
Node::start_wallet_child is the call the TUI makes. The test stores an
in-process testnet source, starts the child, and checks the typed daemon
client's get_info. It does not bootstrap Tor.
cuprate-daemon is now in the Linux TUI default, so a release build of the
onionwire bin links the daemon with no extra feature flag. A build with
--no-default-features still refuses with NO_FEATURE_MSG. cuprated keeps
default-features = false so Cuprate's arti feature cannot pull arti-client
0.44 next to OnionWire's 0.46.
Cargo.lock is unchanged: cuprated was already an optional dependency.
TUI.md: the `last` line's shape when one half of a save is refused, why an
app-owned source saves with an empty `url` while a typed endpoint with no login
is still refused, and the wording the `chain` row carries in a build without
`cuprate-daemon`.
WALLET.md: the same gate from the node's side, and the start contract — a start
that fails part way stops what it spawned and leaves the chain datadir as the
thing a retry reuses.
Settle the contract the red feature-gated test was fighting, and make the code
and both tests express it: a start that fails after the chain daemon came up is
all or nothing, the same contract
node::tests::a_missing_binary_fails_the_start_and_leaves_no_child asserts one
level up. A daemon left running behind an error has no owner (the caller gets
the error back, not the client), no handle to stop it, and holds 18081 against
the next start; what a retry reuses is the chain datadir on disk, never a
process that outlived its owner. start_with_creds already behaved that way, so
this states the contract where the stop happens rather than changing it.
in_process_source_launches_a_daemon_and_stop_shuts_it_down was red because its
fake monero-wallet-rpc never binds the port its own readiness gate probes:
start() returns that error, the test discarded it with `let _ =`, and it then
asserted the daemon had survived a failed start. It now holds the published
port the way the module's other start tests do
(test_support::PublishedPortHold) and expects the start to succeed, with every
assertion it had kept. The failure path gets its own test instead, which pins
the tear-down: neither child running, the daemon's port closed, the chain
datadir kept.
cuprate::available() was never consulted in the TUI, so the 'chain' row
offered 'in-process node · cuprate in this app' in a build whose only possible
answer is cuprate::NO_FEATURE_MSG. The row now carries that wording where the
choice is made, the same way prune_display()/network_display() carry theirs.
The choice stays in the picker: builds with the feature exist, and a stored
in-process source must still be readable.
A save on F7 ran the wallet-config write first and returned early on its
error, so an empty 'url' row failed the whole save: 'wallet RPC endpoint
required'. That refusal belongs to Wallet::from_config and it is about an
externally run monero-wallet-rpc; an app-owned chain source (local monerod,
in-process Cuprate) spawns its own child with generated creds and a port it
picked, and Node::start_wallet_child_with replaces the stored client after
the spawn, so the url/login rows describe no endpoint the app dials.
- an empty endpoint on an app-owned source no longer vetoes the chain-source
write; the validator itself is untouched, and a *typed* endpoint with no
login is still refused
- both halves of a save are attempted and reported on one line shape, so a
wallet-config refusal cannot silently drop a chain source the user picked