The φCrypt suite, computed live in your browser via WebAssembly: no server, no pre-baked numbers. One design decision organizes everything here. The signature, the proof system, and the recursion share a single prime field, so signature verification runs natively inside the circuits that prove statements about it; the first tab verifies that, live. Around it sit two independent hardness assumptions: hash-based (φHash: φSign, φCipher) and lattice-based (Module-LWE/SIS: φKEM, φDSA). The Security model tab carries the dependency map, the measured costs, and every caveat.
Pre-production. External cryptanalysis review is in progress and has not
yet reported. Until it does, treat every number on this page as this team's own estimate,
not an audited guarantee.
Loading WebAssembly module…
A signature verification, verified in proof
φDSA lives on the proof system's own field (q = 1342832641), so its verification
arithmetic is circuit-native. Your browser verifies real proofs of the two heavy legs
of a signature verification: the lattice relation A·z − c·t = w at all 256 evaluation
points, and the response-norm bound, each pinned cell by cell to the public signature.
Flip a byte and it rejects.
Scope. The proof verifies φDSA-algfs, a transcript variant of φDSA:
the production signature derives its challenge with SHAKE-256, which cannot be
arithmetized, so the in-circuit variant derives it with the suite's field-native
algebraic sponge (specified under Security model; experimental, review in progress).
The relation and the norm bound are proof-carried; the challenge and the signature's
NTT consistency are recomputed by the verifier from public data, which is sound because
that data is public. The signature is public, not hidden: the hidden authorization that
ships today is the hash-leg one-time-signature proof (Kind 9) beside it. Proofs are
generated natively; verification runs live here in a thread-free module.
Loading verifier module…
φHash
Zeckendorf → S-Box → Triveni → phyllotaxis spiral → Lucas bracketing chain. Deterministic.
—
—
Flip one character above to see the avalanche,
measured beside SHA3-256 (its export here is validated against the NIST test vectors).
The comparison is the statement: every hash, including broken ones, flips about half
its bits.
Beyond avalanche. The gating tests go further than a ~50% flip rate:
the Strict Avalanche Criterion (worst single output-bit deviation <0.15), the Bit
Independence Criterion (max |correlation| <0.25), and the shared S-box measured
exactly at differential uniformity 4 and Walsh linearity 32, matching the AES S-box.
See
tests/test_adversarial_hash.cpp.
φCipher
A GF(2⁸) wide-trail SPN with encrypt-then-MAC. The passphrase is never hashed directly:
the key comes from φ-ROMix v2, a memory-hard KDF (7.5 MB buffer, 121,393
randomly-addressed mixing rounds, ≈46 ms per derivation in this build) built on
standard ChaCha quarter-rounds at 14 rounds. Salted per session below.
—
φKEM — key encapsulation (two-party)
Alice publishes a key. Bob encapsulates a fresh shared secret to it and, separately,
encrypts a message directly to it (φKEM, a φHash-derived DEM key, φCipher AEAD).
Alice recovers both. Every call is millisecond-scale.
φSign — hash-based signature
A stateful hypertree: 3 layers of height-7 trees, WOTS chains at 8 values per digit
(3 bits), and a FORS few-time layer (13 height-7 trees) underneath. Its own
construction in the XMSS/SPHINCS+ style, not an SP 800-208 parameter set; security
reduces to φHash target-collision resistance, with no algebraic assumptions.
Genuinely slow here: this WASM build is single-threaded, so keygen
runs ≈13 s and signing ≈40 s (native single-core: 1.4 s / 4.3 s / verify 0.18 s; the
remaining gap to SHAKE-based schemes is φHash's own cost, measured under Security
model). On state: the demo identity is ephemeral — no secret leaves
WASM memory, so a one-time index can never be reused across reloads. Durable signers
persist the counter before each signature exists (the library's
reserve-then-sign hook).
One-time signatures used
0
φDSA — lattice signature
Fiat–Shamir with aborts, stateless: no counter to persist, the complement to φSign on
an independent assumption (lattices, not hashes). The hybrid signature, not exposed in
this demo, binds both.
Security details
Two independent hardness assumptions. φSign reduces to φHash target-collision
resistance; φKEM and φDSA reduce to Module-LWE/SIS, estimated under a core-SVP/BKZ
model. External cryptanalysis review is in progress and has not yet reported.
| Primitive | Parameter | Output / key | Classical | Post-Grover (quantum) |
|---|---|---|---|---|
| … | ||||
Independence, precisely. The assumptions are independent; the
implementation is not. φSign is entirely φHash. φCipher's KDF ends in one φHash call.
φKEM is instantiated with φHash as its XOF (the core is hash-agnostic; a
NIST-validated SHAKE-256 instantiation works identically), so its key path also needs
φHash to behave as a random oracle. φDSA uses SHAKE-256 throughout and has zero φHash
dependency. Read plainly: φHash is a shared component with suite-wide blast radius,
not a firewall between the two legs.
The φHash-XOF finding and the fix. φHash fully mixes exactly 196
output bytes; beyond that, output is extended by a linear map only, so every further
byte is an affine function of internal state. That is worse than biased: it is
potentially state-recovering. The fix is structural. Cryptographic output is
hard-capped at 123 bytes (the largest tier that never reaches the extension path),
enforced inside the hash itself so no caller, including third-party ones, can cross
it; a statistical battery (frozen-position, frequency, runs, per-byte χ², avalanche)
now gates every release. An audit confirmed no key-bearing path ever crossed the
boundary. The one caller past it, proof-of-work grinding, is public and keyless, and
its consensus score now reads only the fully-mixed prefix.
Reading the hash rows. The figures are (second-)preimage strength:
classical n, quantum n/2 under Grover, from the actual digest width.
The birthday bound does not apply to φSign, by construction: every hash call is tweaked
by its position, so an attacker faces target-collision resistance (cost n, not
n/2), the same reason WOTS/XMSS/SPHINCS+ tweak their hashes; and the counter
ensures no one-time key is reused, with FORS underneath as the few-time net if state
ever desyncs. Operative numbers: tier 0 is 232 classical / 116 quantum, tier 2 is
608 / 304. NIST categories are defined by full gate cost, so these are exponent
comparisons, not certified category claims.
φKEM (φ-KEM-304). Module-LWE with n=512, k=3, q=3329, η=3, and RM(1,3)
reconciliation. The geometry is forced, not chosen: RM(1,3) carries 0.5 bits per
coefficient, so a 256-bit secret needs 512 coefficients and the message polynomial
fixes n=512; the stated price is an incomplete NTT (128 degree-4 residues, one split
shallower than Kyber's). The reconciliation is load-bearing for CCA2 soundness:
decode failure computes to δ ≈ 2⁻²⁸⁵ against the FO bound of 2⁻¹²⁸, where the no-code
baseline fails outright at 2⁻⁶⁹ (an exact convolution under an average-case noise
model; the worst-case question is open and stated in the spec). Core-SVP estimates
β ≈ 1462: about 427-bit classical and 387-bit quantum, best read as model lower bounds
because β approaches the full dimension. The parameters are deliberately conservative:
157 bits of failure margin at 2× the public key and 2.6× the ciphertext of
ML-KEM-1024, a tradeoff the spec owns rather than optimizes away.
φDSA. The ML-DSA algorithm on the shared field (N=256, Q=1342832641,
k=l=9, η=7, τ=60), SHAKE-256 throughout: φDSA is the one primitive here with zero
φHash dependency. The estimator computes both attacks: MLWE key recovery at 282.4
classical / 256.3 quantum, and SIS strong-unforgeability at 280.6 / 254.7, each above
ML-DSA-87 under the same model. η=7 is the smallest noise that lifts key recovery
above the SIS ceiling, so forgery binds by design, and the forgery bound sits in the
norm-below-q regime where the conservative SIS estimate is provable. The estimator is
anchored: it must reproduce the published ML-DSA-2/5 figures (123 / 252) before it is
trusted here. Larger keys and signatures (4,352 / 6,206 B) are the deliberate cost of
the shared field. Not FIPS-204 byte-conformant; validated against its own KATs.
Verify-in-proof, and the algebraic sponge. The shared field lets
signature verification run inside recursive proofs (the first tab, live). SHAKE cannot
be arithmetized, so the in-circuit challenge uses the suite's field-native sponge: a
Poseidon-class x⁷ design of width 27 (rate 18, capacity 9 field elements), a 27×27
Cauchy MDS layer, and 52 full rounds. Every parameter is derived from a 128-bit
collision target, and the build fails if a derivation regresses: a sponge's generic
collision resistance is half its capacity, so capacity and digest each carry
⌈256/⌊log₂q⌋⌉ = 9 elements (≈270 bits, digests 36 bytes); the round count covers
algebraic-degree attacks (⌈128/log₂7⌉ ≈ 46 plus margin); the challenge seed is 5
squeezed elements (≈150-bit challenge space). It is the least battle-tested element on
this page: experimental, in a family with an active cryptanalytic record, under
external review that has not yet reported.
Sizes and measured costs
Wire sizes beside the corresponding FIPS 203/204/205 parameter sets, with native
single-core timings from the suite's own harnesses (—).
The hash-independent price is measured, not implied: φHash costs ≈0.35 µs/byte against
SHAKE-256's 0.009, and the φHash KEM path runs 3992/2468/1997 µs (keygen/encaps/decaps)
against 356/401/479 µs for the same lattice core over SHAKE, at the current capped
block size. SHAKE-256 is the lower-risk default; φHash is the hash-family-independent
opt-in, and that cost buys the hash leg, not extra lattice security.
| Scheme | Public key | Ciphertext / signature | Native timings (single core) |
|---|---|---|---|
| … | |||
The WOTS width, measured and revised. The chain width stood at 13
while the digit extractor produces 3-bit digits; the sweep measured w=8 as identical
in security and signature size with 38% fewer hash calls, so the parameter moved to
w=8 and every number on this page reflects it. The refuted configuration stays
published: measurements move parameters here, and refutations stay on the record.
Related packages
Where these primitives run beyond this demo; all pre-production. The viability column
is throughput honesty: φCipher measures ~1.8 MB/s single-threaded (MAC-bound by
φHash), ample for pages, records, and messages, and disqualifying for line-rate
transport until a faster MAC exists.
| Package | What it is | φCrypt primitives | Viability today |
|---|---|---|---|
| phi-quic | QUIC / TLS 1.3 transport | φHash + φCipher, as a native TLS cipher suite | research only — ~14 Mbit/s cipher throughput cannot serve line-rate transport; needs a faster MAC |
| phi-ossl-provider | OpenSSL 3 provider | φHash + φCipher, exposed to any OpenSSL app by algorithm name | works today for hashing and small-payload AEAD; bulk-stream use inherits the cipher's rate |
| phi-sqlvfs | Encrypted SQLite VFS | φHash (key derivation) + φCipher (page encryption) | works today — page-sized writes sit well inside the measured rate; until external review reports, a hybrid mode (φCipher under a SHAKE/HKDF-derived key) is the recommended deployment |
| phi-net-cpp | P2P network layer — DHT, gossip, routing | φHash (DHT placement) + φSign (peer-record authentication) | works today for single-instance nodes; multi-instance peer-record signing awaits the stateful-counter contract (or φDSA) — see the Signatures tab |
| phi-zk-php | Server-side verifier for the φ zero-knowledge proof stack | φDSA (billing-ticket signing) + φHash | works today — verify-side only, no throughput constraint |
| phi-rpc-cpp | Transport-agnostic JSON-RPC engine | φCrypt's CSPRNG only — channel security is delegated to phi-ossl-provider / phi-quic | works today |
Mobile. Five React Native packages bridge these into the mobile wallet over
JSI: react-native-phi-crypt (φCrypt itself), react-native-phi-sqlite (phi-sqlvfs),
react-native-phi-tcp (the TLS-over-TCP fallback), react-native-phi-rpc-client (phi-rpc-cpp),
and react-native-phi-zk (the ZK statement library). None are published to npm yet — install
from the monorepo directly.
Reporting, side channels, and verifying what you ran
Disclosure. Report vulnerabilities or cryptanalysis to
jbadwal@indinuity.com (also at
Constant-time posture. The cipher core is ctgrind-verified branchless in its hardened build, and authentication comparisons are always branchless. Not yet covered: the AEAD envelope, the signing paths, φHash itself, and φDSA's secret-dependent NTT. These demo builds use the portable table-lookup backend, which has the same cache-timing surface as table-based AES.
Verify the module you ran. SHA-256 of the deployed WebAssembly, restated at every redeploy: loading…
/.well-known/security.txt). A confirmed break of any primitive here is
treated as protocol-breaking across the suite.
Constant-time posture. The cipher core is ctgrind-verified branchless in its hardened build, and authentication comparisons are always branchless. Not yet covered: the AEAD envelope, the signing paths, φHash itself, and φDSA's secret-dependent NTT. These demo builds use the portable table-lookup backend, which has the same cache-timing surface as table-based AES.
Verify the module you ran. SHA-256 of the deployed WebAssembly, restated at every redeploy: loading…