"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.
88 lines
4.2 KiB
TOML
88 lines
4.2 KiB
TOML
[package]
|
|
name = "onionwire"
|
|
version = "0.2.1"
|
|
edition = "2024"
|
|
# 1.98, not 1.91. Arti 0.46 builds on 1.91, but the default feature set includes
|
|
# `cuprate-daemon`, and `tapes` (a Cuprate dep this repo cannot patch) calls
|
|
# `VecDeque::pop_front_if`, stable only from 1.93. 1.98 is the release CI and
|
|
# the Android workflows actually build that graph with. `--no-default-features`
|
|
# does not need it; `cargo` checks `rust-version` before features, so the
|
|
# declared floor is the default build's floor.
|
|
rust-version = "1.98"
|
|
description = "Lean Tor messenger: Arti in-process, identity=pubkey, onion=locator. No XMPP."
|
|
license = "MIT"
|
|
publish = false
|
|
repository = "https://forgejo.siriusdevops.com/sirius/onionwire"
|
|
|
|
# TLS backend: `rustls` by default, `native-tls` (OpenSSL) opt-in.
|
|
#
|
|
# Arti marks these two backends non-additive, so exactly one may be selected per
|
|
# build graph — hence exposing them as crate features. rustls is the default
|
|
# because Android has no OpenSSL in the NDK and the Linux TUI/release build does
|
|
# not need a system OpenSSL for TLS either. (OpenSSL is still *compiled* into
|
|
# every build by rusqlite's `bundled-sqlcipher-vendored-openssl`, vendored and
|
|
# static: that is the SQLCipher layer, not Arti's TLS.)
|
|
[features]
|
|
default = ["rustls", "cuprate-daemon"]
|
|
native-tls = ["arti-client/native-tls"]
|
|
rustls = ["arti-client/rustls"]
|
|
# In-process Monero chain daemon (Cuprate) as the local chain source, instead of
|
|
# spawning `monerod`. ON in the Linux TUI/release binary (this default). A build
|
|
# with `--no-default-features` does not include it. `cuprated` is pre-1.0 and is
|
|
# not published to crates.io (every Cuprate crate there is a `0.0.0-placeholder`
|
|
# name reservation), so this pins a git revision and pulls a large tree (RandomX,
|
|
# fjall, axum/hyper, rayon). See `docs/WALLET.md`, "The in-process chain daemon".
|
|
#
|
|
# Cuprate's own `arti` feature stays OFF (and is off in its default feature set,
|
|
# which is why `default-features = false` is load-bearing): it would link a
|
|
# second, older Tor stack (arti-client 0.44, which cannot unify with this
|
|
# crate's 0.46) next to OnionWire's. The in-process daemon runs clearnet-only;
|
|
# OnionWire's Arti is the only Tor in the process.
|
|
cuprate-daemon = ["dep:cuprated", "dep:toml"]
|
|
|
|
[dependencies]
|
|
arti-client = { version = "0.46", default-features = false, features = [
|
|
"tokio",
|
|
"onion-service-client",
|
|
"onion-service-service",
|
|
"compression",
|
|
] }
|
|
futures = "0.3"
|
|
safelog = "0.9"
|
|
ed25519-dalek = { version = "2", features = ["rand_core"] }
|
|
rand = "0.8"
|
|
rusqlite = { version = "0.36", features = ["bundled-sqlcipher-vendored-openssl"] }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "time", "net"] }
|
|
tor-cell = "0.46"
|
|
tor-hsservice = "0.46"
|
|
tor-rtcompat = { version = "0.46", features = ["tokio"] }
|
|
# Direct dependency only to select rustls's crypto provider: Arti pulls rustls in
|
|
# through `tor-rtcompat` with `default-features = false`, and rustls 0.23
|
|
# resolves its provider from its OWN `ring`/`aws-lc-rs` features, so without this
|
|
# line the rustls backend compiles with no provider at all and the first TLS
|
|
# config fails. Same reasoning (and pin) as `crates/onionwire-sdk/Cargo.toml`.
|
|
rustls = { version = "0.23", default-features = false, features = ["ring"] }
|
|
ratatui = { version = "0.30.2", default-features = false, features = ["crossterm"] }
|
|
x25519-dalek = { version = "2", features = ["static_secrets"] }
|
|
snow = "0.10"
|
|
serde_json = "1"
|
|
hkdf = "0.12"
|
|
hmac = "0.12"
|
|
argon2 = "0.5"
|
|
chacha20poly1305 = "0.10"
|
|
sha3 = "0.10"
|
|
sha2 = "0.10"
|
|
md-5 = "0.10"
|
|
rpassword = "7"
|
|
zeroize = { version = "1", features = ["derive"] }
|
|
qrcode = { version = "0.14", default-features = false }
|
|
cuprated = { git = "https://github.com/Cuprate/cuprate", rev = "4f8fcd1bf468f566fcd89c460d50de4adb6825bf", default-features = false, optional = true }
|
|
# `cuprated::config::Config` is deserialized, not built field by field: the
|
|
# struct's nested types move with the pinned revision, a TOML document does not.
|
|
# Cuprate has `deny_unknown_fields` on every config struct, so a stale key is a
|
|
# parse error instead of a silently ignored setting.
|
|
toml = { version = "0.8", features = ["parse", "display"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|