On this page
- System overview
- Keys
- Write path
- Read path
- Rate-limit tokens
- Anonymous group permissions
- Oblivious HTTP
- Discovery
- Failure handling
- Deployment
- Delivery boundary
System overview
Keys
- The wallet signs one EIP-712 message per app (
"arkognito key v1", app, chain id). The first time a device sees the wallet for an app it signs twice to check the signature is deterministic and stores a 16-byte fingerprint; later connects sign once and compare. - HKDF derives a root key, which never leaves the key worker.
- Each record gets a fresh random 15-byte id; its one-time key and owner
Sderive from the root and the id. No counters: nothing is reused after expiry, devices never collide. - Each record carries an encrypted tag naming its id. Only the root opens it.
- One-time keys sign only envelopes and ownership proofs.
Write path
- Check.
check()flags identifying attributes; the rarity check compares against the app’s records;strictturns warnings into refusals. - Seal. The SDK takes a fresh key and tag, optionally encrypts the payload, and builds the
envelope: signed by
S, padded to a size bucket, lifetime rounded to a bucket. - Wait and submit. A random 0–20 s delay, one write in flight per user (across tabs), a rate-limit token if required, optionally through OHTTP.
- Relayer validates the request (padding, buckets, lowercase attribute names, signature) and redeems the token against the shared spent list.
- Batch. When
krecords are queued or the max wait expires, and at least 5 blocks after the last batch, the relayer shuffles the batch and sends oneexecuteBatch: creates, spent markers (shuffled separately), and an ownership transfer of each record to itsS. - Verify. The client reads the whole batch back and checks the signature and owner. A mismatch marks the relayer bad and retries elsewhere.
The token redemption and retry steps describe ordinary submissions. A configured membership
project instead requires a Semaphore proof, retains a durable admission reservation and creates
readonly records. Uncertain writes stop automatic failover and batch retries.
Read path
- List the app pinned to one block: keys, owners, attributes, no payloads. Every user downloads the same list.
- Open tags locally. Tags that open are yours; each names a key whose address must equal the record’s owner.
- Fetch whole batches that hold your records, plus two random cover batches, and verify.
Rate-limit tokens
- Issuance at session start: blinded messages signed by an app-derived issuance identity by default, with a per-requesting-address (or per-attestation-code) daily quota.
- Redemption per write: the relayer verifies the unblinded token against the day’s key from
Arkiv and writes an
arkognito.spentmarker in the same transaction. - Key consistency: one key per app per day; two on Arkiv and everyone refuses the issuer.
- Timing: tokens fetched at session start, oldest first, at least 60 s old when spent.
- Double spend: checked at redemption and before writing; a monitor reports any id recorded twice.
Anonymous group permissions
The optionalarkognito/semaphore module adds admin-authenticated groups, deterministic private
membership identities, scoped nullifiers and record-bound proofs. Arkiv stores group state and
proof-bearing records; relayers and readers verify proofs off-chain. No application contract runs
on Arkiv. Independent readers reconstruct historical roots and select the earliest valid use of
each nullifier, retaining spent state after deletion or expiry.
Application-specific admission determines who joins. Semaphore does not establish one identity
per person. Build anonymous permissions,
operate the gate and review measured limits.
Oblivious HTTP
- The client encrypts each relayer request to the relayer’s gateway key (HPKE, RFC 9458 §4) and sends it to an OHTTP relay run by someone else.
- Gateway keys come from heartbeats on Arkiv. For a URL several heartbeats claim, the client accepts only the key whose decrypted answer names that heartbeat’s creator.
- The relay forwards only to https relayers on public hosts that answer
/v1/infowith the heartbeat creator’s address and key, and follows no redirects.
Discovery
- Each relayer keeps an
arkognito.relayerheartbeat entity (150 blocks, renewed every 2 minutes) with its URL, batch size, token requirement and OHTTP key. A dead relayer drops out on its own. - A relayer’s address is the heartbeat’s
$creator; nothing else in the heartbeat is trusted alone. - On restart a relayer patches its heartbeat with its current settings.
Failure handling
Deployment
One container image serves every role (ROLE=relayer or ROLE=ohttp-relay). The reference stack
is two relayers (one also runs the issuer, with a volume for its quota file) and an OHTTP relay,
behind HTTPS. It runs with Docker Compose, on Railway or Fly, or as plain Node processes.
Self-hosting