Expand description
cargo run stress enter: run many login/registration flows against PHC.
Each iteration runs the real auth + enter flow — AuthStartEP,
AuthCompleteEP, EnterEP —
but forges the Yivi disclosure that normally comes from the user’s Yivi app: we mint the
SessionResult the Yivi server would have returned and sign it with the Yivi server signing key
(the auth server only checks that signature, so a locally-signed one is accepted). The EnterEP
call is what reads and writes PHC’s object_store, so this stresses that store under realistic load.
Structs§
Enums§
- Mode 🔒
- What an enter flow does once it has its attributes.
Loginexpects the account to already exist, so run aRegisterpass with the same--totalfirst: identities are deterministic in the iteration index, so the same range logs back in. - Outcome 🔒
- The result of one enter flow, for the summary.
Constants§
Functions§
- auth_
start_ 🔒req - Builds the
AuthStartReqevery flow uses: disclose the identifying + bannable attribute. - enter_
with_ 🔒disclosure - One timed enter flow using a precomputed disclosure:
AuthStart(for a fresh sealed state) →AuthComplete→EnterEP. No signing happens here, so the timing reflects the server’s work. - fetch_
sprequest 🔒 - One
AuthStartto learn the disclosure session request — the Yivi attribute identifiers the auth server asks for. Identical for every flow, so fetch it once and build every forged disclosure from it. - precompute_
disclosures 🔒 - Signs one disclosure per identity, in parallel across all cores. RSA signing dominates a single thread (it’s what made the load generator the bottleneck), so it happens here — up front and untimed — rather than inside the measured loop.
- sprequest_
unverified 🔒 - Reads the
sprequest(disclosure session request) out of the auth server’sdisclosure_requestJWT without verifying its signature: we made no claim to authenticate it — we only need to learn which Yivi attribute identifiers it asks for, to forge a matching response. - stage 🔒
- Sorts
samplesand prints onename: p50 / p95 / maxline. - summarize 🔒
- Prints outcome counts, throughput, and per-stage latency percentiles. The per-stage split is
the point:
auth-completeis the auth server’s crypto (verify the disclosure, sign the attributes), whileenteris PHC’s object_store reads/writes (plus its pseudonym crypto). - value_
for 🔒 - The value identity
idiscloses for attributeati. Deterministic ini, so aregisterpass then aloginpass over the same range line up.