WeAI turns your Mac into a private inference node and lets you weave a small, trusted mesh with people you actually know. This page documents — precisely and honestly — the cryptography it uses, how it's built, and what is and isn't real yet.
Commercial decentralized‑inference networks route encrypted prompts to anonymous, hardware‑attested strangers and pay them. WeAI replaces that anonymous marketplace with a trust graph of friends: you invite people you already trust with a signed link, lend your node's compute, and borrow theirs. No money, no strangers, no account. The social graph is the trust layer.
Inference runs on your hardware by default. Nothing leaves the machine unless you explicitly choose to ask a friend's node.
A friend is added only by accepting a cryptographically signed reai:// invite. The mutual link is the trust — no central authority vouches for anyone.
Requests can hop across the friend‑of‑friend mesh so the node that answers can't tell who asked.
Every other tool forces a single trade‑off — convenient cloud or private local, anonymous marketplace or nothing. WeAI is the layer that lets you pick the right backend per request, so it checks every box — and adds rows the others don't even have.
| Capability | Closed cloud OpenAI, etc. |
Local‑only Ollama, LM Studio |
TEE cloud Tinfoil, 0G |
WeAI |
|---|---|---|---|---|
| Provable zero data retention | ||||
| Cloud convenience & scale | ||||
| Low setup cost & complexity | ||||
| Zero‑trust (TEE attestation) | ||||
| Private observability | ||||
| Borrow a friend's GPU (social trust) | ||||
| Sender anonymity (onion routing) | ||||
| Post‑quantum encrypted channel | ||||
| No account / no token required | ||||
| Choose the backend per request |
A node identity, a signed invite, an onion‑routing layer, and a (planned) transport. Here's how they fit — and exactly which parts execute today.
| Component | What it does | Status |
|---|---|---|
| Node identity | Long‑term Ed25519 + X25519 keypair, generated on‑device. | implemented |
| Signed invites | reai:// link carrying public keys + nonce + TTL, Ed25519‑signed and verified on accept. | implemented |
| Onion seal / peel | Per‑hop layered AEAD; built & peeled with a launch self‑test. | implemented |
| Local inference | Real models via LM Studio / Ollama on the local GPU. | implemented |
| Key custody | Keys generated + stored in the Keychain automatically; never shown or managed by hand. | implemented |
| Peer transport | Outbound relay + mutual-auth SecureChannel (X25519 + ML-KEM-768). Verified over the wire on loopback. | implemented |
| Remote borrow / share | Running your prompt on a friend's node over the encrypted channel — protocol verified. Needs a hosted relay for the open internet. | implemented |
| Hardware attestation (TDX) | The provider's Intel TDX quote is verified against the pinned Intel SGX Root CA, graded against Intel's published TCB levels, checked against Intel's PCK revocation list, and its measured OS and container images resolved. NVIDIA GPU evidence is verified too. An unknown measurement is reported, never assumed good. | implemented |
| Send gate | Nothing is transmitted over a connection the app could not validate. Each answer carries the disposition it was sent under, shown in the chat. | implemented |
| Encrypted history | Off by default. When enabled, threads are stored under a Keychain device factor combined with an optional scrypt‑stretched passphrase — both always required. No public‑key cryptography at rest anywhere, which is the post‑quantum argument. | implemented |
| wDrive storage | Client‑side encrypted vaults, content‑addressed and anchored to 0G by merkle root, with chunk dedup, version history, sharing and a third‑party verifier. Reading and verifying work against 0G mainnet today; the first payable write needs a funded wallet. | write path unfunded |
WeAI uses only vetted, standardized primitives from Apple's CryptoKit — constant‑time, hardware‑accelerated, and widely reviewed. No custom crypto.
| Primitive | Role in WeAI | Why this choice |
|---|---|---|
| Ed25519 RFC 8032 · 64‑B sig | Signs and verifies invite links — authenticity & integrity of who invited you. | Deterministic, misuse‑resistant, tiny signatures. |
| X25519 RFC 7748 · 32‑B keys | The static & ephemeral DHs of the SecureChannel handshake (es/ss/ee/se), and onion layer keys. | Modern, constant‑time, ubiquitous. |
| X‑Wing X25519 + ML‑KEM‑768 | Ephemeral PQ‑hybrid KEM mixed into every SecureChannel session, and onion layer keys (macOS 26+). Pub 1216 B, ct 1120 B. | Secure unless both ECC and the lattice KEM break. Defeats harvest‑now‑decrypt‑later. |
| ML‑KEM‑768 FIPS 203 | The quantum‑resistant half of X‑Wing. | NIST‑standardized lattice KEM, category‑3 security. |
| HKDF‑SHA256 RFC 5869 | Derives the directional session keys (i2r / r2i) and onion keys from the mixed shared secrets, salted by the transcript hash. | Standard KDF; domain‑separated per direction & purpose. |
| HMAC‑SHA256 RFC 2104 | Key‑confirmation tag at the end of the handshake — each side proves it derived the same keys before any data flows. | Detects a man‑in‑the‑middle or key mismatch up front, not mid‑stream. |
| ChaCha20‑Poly1305 RFC 8439 · AEAD | Encrypts & authenticates each onion layer and every SecureChannel frame (8‑byte sequence prefix for replay protection). | Fast in software, no timing side‑channels, 128‑bit auth tag. |
| SHA‑256 FIPS 180‑4 | Derives the short node ID & key fingerprint, and the handshake transcript hash that binds every message. | Collision‑resistant identifier & transcript binding. |
| Keychain login keychain · generic password | Stores the Ed25519 & X25519 private keys automatically — generated on first launch, never shown or hand‑managed. | OS‑guarded key custody; zero manual key handling for the user. |
| CSPRNG SecRandomCopyBytes | Invite nonces, ephemeral keys, and all randomness. | OS‑backed cryptographic randomness. |
When you borrow a friend's node, the two machines first run an IK‑style handshake (the pattern Noise calls
IK: the initiator already knows the responder's static key — it came in the invite). Both ends are
mutually authenticated to the exact X25519 keys exchanged in the signed invite, and the session is
post‑quantum hybridized with an ephemeral X‑Wing KEM. Three messages, then encrypted data:
es DH, so a passive observer never sees who is dialing), plus an X‑Wing ciphertext encapsulated to the responder.es · ss · ee · se — and the X‑Wing shared secret into one input keying material.HKDF‑SHA256(ikm, salt = SHA‑256(transcript), info = "reai/i2r" | "reai/r2i") yields two directional keys. The transcript hash binds every public value (context, both statics, both ephemerals, the X‑Wing pub & ciphertext) so nothing can be swapped.HMAC‑SHA256 over the transcript under a derived "reai/confirm" key. If it doesn't verify, the channel is torn down before a single prompt byte is sent.es/se authenticate against the static keys from the invite; ee gives forward secrecy; ss binds the long‑term identities. The ephemeral X‑Wing secret means a recording made today stays secret even against a future quantum computer — break it only if ECC and ML‑KEM both fall.
Only ciphertext and a routing node‑ID. The relay can't read prompts or responses, can't impersonate either peer (it holds no static key), and can't replay frames. A wrong or unknown initiator key is rejected at msg 1 — the responder only completes for keys it learned from a real invite.
Ephemeral X25519 → ECDH with the hop's static key → HKDF‑SHA256(salt="reai-onion-v1") → ChaCha20‑Poly1305 seal. Fresh ephemeral per message.
X‑Wing encapsulate() to the hop's public key yields a fresh shared secret + a ~1120‑B ciphertext, used directly as the ChaCha20‑Poly1305 key. The larger packets you see in the Mesh tab are this PQ overhead.
reai://invite/<base64url>..badSignature) or expired (.expired).A documentation page that only lists strengths is marketing. Here is the honest gap analysis — these are the things to fix before WeAI is something you'd trust with sensitive prompts across machines.
pruned state. And no attestation covers a model's weights: a verified enclave proves where the computation ran, not what was computed.Outbound‑only connection to a lightweight rendezvous/relay (no port‑forwarding), then a mutual‑auth IK‑style handshake keyed by the invite‑exchanged keys, PQ‑hybridized with an ephemeral X‑Wing KEM. Verified end‑to‑end over the relay by the self‑test.
Identity keys are generated on first launch and held in the macOS Keychain — zero manual key management.
Deploy a stateless, community‑runnable relay (over TLS) so friends connect across the open internet, and run the already‑implemented onion across independent relay hops so no single relay sees both ends.
Add a Secure‑Enclave P‑256 device key so a node can attest its hardware identity, on top of the Keychain‑held identity keys.
Enforce one‑time‑use nonces, confirm the out‑of‑band verify code, support expiries & revocation.
Per‑peer authorization, rate limits, resource caps, and prompt isolation against injection & abuse.