Private proximity circuit benchmark
private_proximity_2d evaluates abs(ax-bx) <= R && abs(ay-by) <= R
for public radii 1, 2 and 4. Each party supplies eight packed bits: x in the
low nibble and y in the high nibble, both unsigned 0..15. Differences do not
wrap. No walls or LOS visibility masks enter these circuits.
This entry uses the existing LOS canister and runner,
the cdk-rsx-crypto-private-los algorithm crate and its generic GC runtime.
There is no second canister or execution implementation. Existing LOS and
comparator IDs 0–5 remain; proximity IDs 6/7/8 select radius 1/2/4. Their request
and output suite descriptors explicitly bind the proximity predicate, radius,
packed position contract and generated circuit. Equality8 uses this same
runtime as the comparison.
Use the shared native binary and canonical builder from the LOS guide. Generate
a fresh native reference for actual N1/100, and its portable-AES receipt with
--suite private-los; the source recipe and package are shared. Then run:
node benches/crypto/private-proximity/run.mjs \
--artifact /absolute/fresh/proximity-run/artifact \
--reference /absolute/fresh/proximity-run/native-reference.json \
--reference-receipt /absolute/fresh/proximity-run/native-reference-receipt.json \
--out /absolute/fresh/proximity-run/results \
--pocket-ic /absolute/qualified/pocket-ic
The defaults select radius 1/2/4 and Equality8, all five stages, and actual
N1/100: 40 independent populations, with separately staged empty controls.
--cases and --batches override those defaults using the shared runner options.
Inspect the populations without building or starting a server:
node benches/crypto/private-proximity/run.mjs --dry-run
node --test benches/crypto/private-los/matrix.test.mjs
Randomness fill, garbling from prefilled randomness, evaluation, exact-frame serialization and borrowed parsing have separate body timers. Inputs, scratch, buffers and crypto contexts are staged before each timer; queries reuse the shared role-specific scratch and retain their own material. No component sum is a measured end-to-end protocol. Every cost row executes its stated N; failures remain failures and no cost is extrapolated.
The native reference retains the existing 48 LOS/control probes and adds 16 boundary probes per radius: threshold and threshold+1 on each axis and diagonals, descending coordinates, corners, equal positions and nibble boundaries. Target checks compare every request, reply and locally chosen Bob label byte. Independent signed-integer absolute distances check proximity; LOS geometry does not check proximity answers. Native algorithm tests compare all 65,536 position pairs per radius. A separate instrumented artifact checks four Alice and two Bob hashes per AND plus compiled AND/XOR counts; it cannot supply performance rows.
Local chosen-label selection is a deterministic public fixture, outside the
timed work. It executes no OT. Actual IC OT, party transport and full private
protocol costs remain BLOCKED and their costs/rounds/network bytes remain
null. Role-separated private runtime owners and best-effort wiping retain the
limitations documented in the algorithm guide. This benchmark introduces no
game application, input authentication or secret-storage contract.
The report tool checks the exact primary populations, independent instrumented-image probes and complete local receipts before producing a fresh Markdown/JSON/CSV report. The prior LOS directory supplies separately labeled reference measurements; it does not supply new proximity costs:
python3 benches/crypto/private-proximity/report.py \
--run /absolute/fresh/proximity-run/results \
--counter /absolute/fresh/proximity-run/counter-checks \
--los-reference playground/private-los-20261031/reuse-001/selected-results \
--date 2026-10-31 --out /absolute/fresh/proximity-report