57 Commits
Author SHA1 Message Date
waozi 1c76dd12d8 Pin Mesh Client dependencies to verified Gitea objects 2026-11-20 04:32:33 -03:00
waozi d99d9e9802 Pin Mesh client to a source-aware Ziran toolchain 2026-11-19 23:48:24 -03:00
waozi 08062f44b6 Sign scoped Telegram Mini App purchase requests 2026-11-19 22:33:58 -03:00
waozi c1ac6095d0 Rename client package and public imports to Mesh 2026-11-17 16:36:54 -03:00
waozi 970d5e44b1 Export signed portable release verification for package consumers 2026-10-31 01:45:06 -03:00
waozi 256fe6ff04 Restart a paged download whose cursor is behind its position
A saved cursor older than the request's since_server_version is left
from a download that began lower, as a repair from version zero does.
Daochi refuses such a cursor, so every later sync failed with
AUTH_REQUEST_FAILED. The download now starts again at the position.
2026-10-30 00:59:02 -03:00
waozi 8250ece58a Pack records with a bounded gzip frame in record_codec
daochi_client/record_codec packs JSON before encryption and unpacks it only
after authentication, within the app's record limit, beside the released
identity ciphertext. Entity's records already import it; this is the part
of that work that was left uncommitted.
2026-10-29 15:05:26 -03:00
waozi 62b15c6b8c Ask the node to restore a held account on login 2026-10-29 14:13:41 -03:00
waozi e948c3f280 Accept short registered aliases in friend requests 2026-10-28 18:23:17 -03:00
waozi f0f56d0ac4 Retain confirmed account alias and picture after login 2026-10-28 16:40:58 -03:00
waozi 25d9f649c4 Recover replayed sync transports with fresh signed transactions 2026-10-25 13:39:04 -03:00
waozi 39037bc6e1 Reuse verified device registration across signed sync requests 2026-10-25 12:43:55 -03:00
waozi 19f5027532 SHA-256, HMAC-SHA-256 and hex come from the crypto package: crypto passes them on to importers and keeps their C names for native hosts and tests, and keeps only the key files' PBKDF2 and ChaCha20-Poly1305 2026-10-25 00:01:45 -03:00
waozi 9f824c4eac Export the rewards module 2026-10-24 20:20:50 -03:00
waozi a92a9f32e3 Rewards an account claims from its node: the claim body names only the reward, the answer reports credited and balance, blocking or without blocking 2026-10-24 20:11:37 -03:00
waozi 1429fe912f Seal and open entity records in plain Ziran with XChaCha20-Poly1305
Every host of an account, including those without libsodium, can now
write the account's entity records: the daochi-record-v1 envelope with
the record key of its kind, as the sync request carries it, checked
byte for byte against libsodium.
2026-10-23 23:08:38 -03:00
waozi 9976953053 Seal entity content in 8 MiB chunks keyed by their index 2026-10-23 22:38:39 -03:00
waozi eab9eb2531 Derive shared entity data keys and seal each photo or level once per account 2026-10-23 22:26:45 -03:00
waozi ac9489451a Accept unchanged encrypted record sync replies 2026-10-22 03:07:58 -03:00
waozi 7cd505414c Finish paged restores before resuming uploads 2026-10-22 02:53:47 -03:00
waozi 84c85dcee0 Bound upload batches through the sync flow 2026-10-22 02:37:32 -03:00
waozi 9ad61f10e3 Handle resumable large-account sync in the client 2026-10-22 02:35:37 -03:00
waozi a2d71cf96a Declare StringEqual in the authorization test
The test called StringEqual without zir_string.h, which generated headers
no longer include, so it no longer compiled with -Werror.
2026-10-19 19:32:42 -03:00
waozi 42aa3ee773 Hash whole SHA-256 blocks in place with inline rotations
SHA-256 copied every byte into its block buffer and called a function for
each rotation. Verifying a 13 MB app package this way took most of a
phone's startup. Whole blocks are now hashed where they lie, with the
rotations written inline, as the Crypto package does; the known-answer
vectors still pass.
2026-10-19 16:32:49 -03:00
waozi aa843632f1 Repin packages to the rewritten history 2026-10-19 11:51:57 -03:00
waozi dad220c33b Wipe decoded keys and key-file plaintext before returning
SignAccountKeysHex now wipes its decoded private key and raw signature,
and the passphrase-encrypted key file functions wipe the plaintext, the
derived key and the sealed copy, on every return path. Inner Breeze's
copy of this code already did; its test moves here and observes each
wipe through Oqs's Cleanse.
2026-10-11 11:04:28 -03:00
waozi 0ccf3f5419 Check account key files and signatures against liboqs
keys_test.c creates keys, round-trips the plain, legacy and
passphrase-encrypted key files, refuses truncated buffers, and checks
signatures with liboqs directly. It comes from Inner Breeze, which now
uses keys.zi instead of its own copy of this code.
2026-10-11 10:49:02 -03:00
waozi c0e6530185 Parse and verify signed app releases
release.zi reads a daochi-zib-release-v2 release: app, sequence, version,
runtime and APIs, artifacts and sorted dependencies, each bounded, and
checks its Ed25519 signature over the canonical message through the
application's own verify callback. DaochiSha256Matches checks downloaded
bytes. Applications keep their policy: which app, runtime, API range and
dependencies they accept. This comes from Inner Breeze's package code.
2026-10-11 10:35:31 -03:00
waozi 86891c5900 Check the portable crypto against known answers
SHA-256, HMAC, PBKDF2, ChaCha20-Poly1305 and hex now have known-answer
vectors here. They come from Inner Breeze, whose copies of this code are
replaced by this package.
2026-10-11 10:19:45 -03:00
waozi a67eac2f33 Seal Daochi encrypted record profile v1 envelopes natively
Add record.zi: canonical daochi-record-v1 metadata AAD and sealed
envelopes with fresh XChaCha20-Poly1305 nonces over the existing native
provider. Photos and Harmony already exchange this profile; native
clients can now build it without app-local crypto. Tests open every
envelope with the libsodium reference and refuse escaped or moved
metadata.
2026-10-10 13:18:21 -03:00
waozi c7d03a2b13 Share canonical Daochi signed request preparation across hosts 2026-10-09 23:02:09 -03:00
waozi 5e71ac46e6 Keep native crypto symbols scoped for combined Daochi and Oqs clients 2026-10-09 17:21:41 -03:00
waozi 928bcf5ecf Reuse native content crypto and binary account validation in Daochi clients 2026-10-09 17:14:41 -03:00
waozi 70797de096 Allow owner-signed Telegram account binding on exact v6 route 2026-10-08 01:46:29 -03:00
waozi bd63901912 Refresh delegated authorization clocks and bind verified Telegram identity 2026-10-08 01:28:44 -03:00
waozi 936dbacc53 Add owner-signed scoped delegated sessions and key envelopes 2026-10-08 01:12:09 -03:00
waozi 591af495fe Keep downstream regression tests on their selected compiler and libraries 2026-10-06 12:39:26 -03:00
waozi 1619f89ed6 Document Daochi Client under the Ziran organization 2026-10-05 20:55:14 -03:00
waozi d4cc57a7e3 End request token views before synchronous reauthentication 2026-10-04 02:40:21 -03:00
waozi 1b5175a8fd test: resolve the compiler through Ziran packages 2026-10-02 13:04:17 -03:00
waozi 089ea14095 Pin Oqs 1c4714b, whose source file matches its Oqs export 2026-09-30 01:25:56 -03:00
waozi 556ab2223a Import Oqs by its package path so apps can use keys.zi
keys.zi imported the Oqs module unqualified, which only worked in module
path builds; a project depending on Daochi Client could not resolve it.
It now imports oqs/Oqs, and the keys test builds as a project.
2026-09-30 01:16:09 -03:00
waozi a0bebace42 Add Daochi account keys and their cryptography
keys.zi creates an ML-DSA-44 account key pair with its SHA-256 public id,
signs messages (SignAccountMessage fits Identity's signer), and reads and
writes the plain account-key-v1 and passphrase-encrypted
ksync-account-key-v2 key files byte for byte as Inbe does. crypto.zi holds
the SHA-256, HMAC, PBKDF2, and ChaCha20-Poly1305 they use. Both moved from
Inbe so every Daochi app shares one implementation; signing goes through
the Oqs package. The app still stores the keys.

Also pin Ziran 300cbe8; the old pin no longer built.
2026-09-30 01:14:19 -03:00
waozi f14e1261e5 Publish Daochi client as a Ziran package
Apps can depend on the client through ziran.toml instead of a vendored
submodule. Each protocol module is exported under its current import name.
2026-09-27 15:46:49 -03:00
waozi 48ecf98b07 Add polled signed account deletion 2026-09-27 11:22:02 -03:00
waozi 0b6e2dc4ed Add polled Daochi requests and signed sync operations 2026-09-27 11:06:22 -03:00
waozi ea36b7185c Make Daochi wire builders portable 2026-09-26 21:54:02 -03:00
waozi f9f3c779e6 Make Daochi URL builders portable 2026-09-26 20:39:16 -03:00
waozi 87cfb337ef Use portable Ziran text views in client protocol 2026-09-26 20:21:01 -03:00
waozi f7a7f47676 Document native text view portability limit 2026-09-26 19:58:03 -03:00