Private two-dimensional LOS — static circuit costs

Fixture: Selected shared sequential workspaces.

The four public maps compile to 0/276/703/2,265 ANDs. At actual N100, the 64-wall circuit uses 16,828,926.7 garbling and 11,187,818.4 evaluation body instructions per query. These are separate circuit stages through one generic runtime; actual IC OT and the full private protocol remain blocked.

Cost tables use actual IC instructions per query, obtained by dividing the measured cohort by its actual N. N1 is a separate measurement; N10 and N100 are actual bulk cohorts. Each body and independent empty harness has two freshly reconstructed deterministic samples. Values are rounded to 0.1; exact integer numerators, denominators and every sample remain in cost-summary.json and raw results. No harness subtraction, component-summed total, page-fee addition or extrapolation is used. N1000 was not measured.

Position bits 0..3 encode x and 4..7 encode y. Tile centres are (2x+1,2y+1); wall vertices are doubled integer grid points. Walls are closed, endpoint touch blocks, and identical positions are visible. The maps contain exact 0/4/16/64 prefixes of one nonduplicate distributed unit-segment set. maps.json preserves every endpoint and program descriptor.

Exact public wall maps

Coordinate axes and pale grid lines are guides; only dark segments are walls.

At actual N100, the four-wall direct circuit has nearly the selector's gate-stage cost: garbling is 0.39% higher and evaluation 1.80% higher. The 16-/64-wall circuits use 2.45×/7.60× its garbling body and 2.52×/7.92× its evaluation body. Direct four-wall LOS needs 8,960 rather than 12,256 request payload bytes and 63,069.7 rather than 193,505.7 measured randomness body instructions per query (272 versus 4,240 PRG material bytes). Thus the four-wall circuit is close in garble/evaluate cost with smaller requests and randomness work; larger maps require substantially more gate work. The selector excludes LOS preprocessing and is only an arbitrary-input comparator. These stage measurements establish no overall protocol winner.

Program Walls AND XOR AND depth Declared A/B Live A/B
LOS 0 0 0 0 0 8/8 0/0
LOS 4 4 276 533 18 8/8 8/8
LOS 16 16 703 1,234 20 8/8 8/8
LOS 64 64 2,265 3,527 22 8/8 8/8
Equality8 0 7 8 3 8/8 8/8
Synthetic selector 0 255 510 8 256/8 256/8

The empty map folds to constant true: zero gates and zero logical OT, with one random active false-wire label whose output meaning is complemented. This does not expose the delta. Equality8 and the 255-AND/510-XOR selector use the identical generic runtime. The selector receives arbitrary synthetic 256-bit Alice data; it is not a LOS implementation, does not construct a visibility mask, and excludes preprocessing.

Payloads are exact constructed circuit adapter bytes per query. The request contains live Alice labels, optional constant label and 32 bytes per AND. The reply is one 16-byte label. Each direction adds an actual 84-byte header. No party transport is executed; sent/received network bytes and rounds stay null.

Program Request payload Request frame Reply payload/frame Logical OT N1/N10/N100
LOS 0 16 100 16 / 100 0 / 0 / 0
LOS 4 8,960 9,044 16 / 100 8 / 80 / 800
LOS 16 22,624 22,708 16 / 100 8 / 80 / 800
LOS 64 72,608 72,692 16 / 100 8 / 80 / 800
Equality8 352 436 16 / 100 8 / 80 / 800
Synthetic selector 12,256 12,340 16 / 100 8 / 80 / 800

All programs declare eight Bob bits. Only the empty map has zero live Bob inputs. Actual OT cost, generated/check/base OT counts and private-protocol communication are null, including when logical OT is zero. A distinct BLAKE3 application descriptor binds each exact program, map, liveness and positional request contract in the unchanged header; the underlying GC construction suite remains separate.

Inputs, output buffers, workspaces, AES schedules, shared session prefix and public descriptor preparation precede body timers. Randomness measures per-query stream construction and actual fill into prepared material. Garbling consumes previously filled material and includes scratch wiping. Evaluation uses staged garblings and fixture-only locally selected Bob labels, without OT. Serialization writes both actual frames; parsing borrows both frames and validates routes and lengths.

Postcheck costs depend on the staged phase: they complete remaining stages, evaluate the parsed frame, check complete returned-label bytes, decode through Alice and run independent ordinary i64 geometry. They are neither a pure Alice/Bob phase nor a second protocol. Whole checked-update costs include wrappers, postchecks, reply serialization and page fees. Page columns are already included in whole; Counter 0 also includes any charges between its probes. Whole costs below belong to these checked fixture endpoints, not the full private protocol.

The selected sequential fixture reuses one cleared Alice workspace and one cleared Bob workspace for the cohort. Every query still retains fresh material, its own private output map, garbling and output buffers. The initial fixture retained two workspaces per query. Circuit gates, fresh query domains, bytes, outputs and logical work are identical; differences include scratch layout and actual page admissions.

Matched initial → selected fixture, actual N100:

Program Stage Body/query Whole/query Page/query
LOS 0 garble 7,380.6 → 4,978.7 27,019.9 → 23,815.9 8,800.0 → 5,600.0
LOS 0 evaluate 8,980.6 → 6,578.7 28,508.9 → 25,304.9 8,800.0 → 5,600.0
LOS 4 garble 2,433,965.6 → 2,222,763.7 5,342,560.8 → 5,131,354.8 324,000.0 → 112,800.0
LOS 4 evaluate 1,542,974.6 → 1,438,172.6 4,449,916.7 → 4,397,110.8 164,000.0 → 111,200.0
LOS 16 garble 5,575,350.6 → 5,416,948.7 13,181,603.3 → 12,864,797.4 648,000.0 → 331,200.0
LOS 16 evaluate 3,716,696.5 → 3,558,294.6 11,162,096.2 → 11,003,690.3 408,000.0 → 249,600.0
LOS 64 garble 17,304,128.6 → 16,828,926.7 41,043,410.0 → 40,251,404.1 1,448,000.0 → 656,000.0
LOS 64 evaluate 11,504,620.3 → 11,187,818.4 34,923,048.6 → 34,606,242.7 808,000.0 → 491,200.0
Equality8 garble 75,936.6 → 71,134.7 169,616.5 → 164,810.6 15,200.0 → 10,400.0
Equality8 evaluate 48,642.1 → 42,240.2 140,669.0 → 135,863.1 15,200.0 → 10,400.0
Synthetic selector garble 2,372,504.6 → 2,214,102.7 5,434,297.9 → 5,117,492.0 431,200.0 → 114,400.0
Synthetic selector evaluate 1,571,198.7 → 1,412,796.8 4,524,139.0 → 4,365,733.1 271,200.0 → 112,800.0

Observed committed capacity after each actual N100 garble call (initial → selected):

Program Committed 64KiB pages Committed capacity bytes
LOS 0 257 → 257 16,842,752 → 16,842,752
LOS 4 257 → 257 16,842,752 → 16,842,752
LOS 16 438 → 257 28,704,768 → 16,842,752
LOS 64 938 → 443 61,472,768 → 29,032,448
Equality8 938 → 443 61,472,768 → 29,032,448
Synthetic selector 938 → 443 61,472,768 → 29,032,448

These are page-authority committed capacities observed outside timing, including preceding allocations and runtime/Store/control ownership. They are not peak live heap. The reuse improvement changes scratch allocation/layout and page admission; it does not introduce a new gate kernel.

Fresh query randomness:

Program Actual N Body/query Whole/query Postcheck/query Page/query Prelude/query
LOS 0 1 2,828.0 431,284.0 97,300.0 400,000.0 161,383.0
LOS 0 10 2,585.0 61,668.0 25,070.9 40,000.0 16,152.8
LOS 0 100 4,160.7 26,340.9 17,847.6 5,600.0 1,623.0
LOS 4 1 8,137.0 5,595,989.0 5,256,013.0 560,000.0 161,564.0
LOS 4 10 47,894.0 5,179,084.2 5,089,145.6 152,000.0 24,156.5
LOS 4 100 63,069.7 5,139,188.8 5,070,973.6 112,800.0 2,422.8
LOS 16 1 8,137.0 13,668,475.0 13,328,410.0 1,120,000.0 161,600.0
LOS 16 10 7,894.0 12,941,807.3 12,899,893.6 400,000.0 16,145.5
LOS 16 100 10,269.7 12,872,629.9 12,857,217.2 331,200.0 2,425.1
LOS 64 1 8,137.0 41,528,791.0 41,188,734.0 1,920,000.0 161,600.0
LOS 64 10 7,894.0 40,370,779.7 40,328,893.3 768,000.0 16,145.5
LOS 64 100 10,269.7 40,259,236.6 40,243,824.3 656,000.0 2,425.1
Equality8 1 8,137.0 573,135.0 233,564.0 400,000.0 161,456.0
Equality8 10 7,894.0 203,225.5 161,345.3 40,000.0 16,143.7
Equality8 100 13,469.7 172,643.9 154,036.6 10,400.0 2,423.1
Synthetic selector 1 87,373.0 5,824,731.0 5,405,630.0 720,000.0 161,493.0
Synthetic selector 10 143,130.0 5,257,996.7 5,072,824.7 168,000.0 24,154.7
Synthetic selector 100 193,505.7 5,204,562.0 5,005,919.8 114,400.0 2,422.6

Garbling from prepared material:

Program Actual N Body/query Whole/query Postcheck/query Page/query Prelude/query
LOS 0 1 82,846.0 428,759.0 14,757.0 400,000.0 161,383.0
LOS 0 10 10,603.0 59,143.0 14,527.9 40,000.0 16,152.8
LOS 0 100 4,978.7 23,815.9 14,504.6 5,600.0 1,623.0
LOS 4 1 2,354,231.0 5,588,305.0 2,902,085.0 560,000.0 161,564.0
LOS 4 10 2,225,988.0 5,171,257.7 2,903,217.6 152,000.0 24,156.5
LOS 4 100 2,222,763.7 5,131,354.8 2,903,445.6 112,800.0 2,422.8
LOS 16 1 5,731,616.0 13,660,836.0 7,597,097.0 1,120,000.0 161,600.0
LOS 16 10 5,443,373.0 12,933,983.1 7,456,580.6 400,000.0 16,145.5
LOS 16 100 5,416,948.7 12,864,797.4 7,442,704.2 331,200.0 2,425.1
LOS 64 1 17,460,394.0 41,521,107.0 23,728,643.0 1,920,000.0 161,600.0
LOS 64 10 16,884,151.0 40,362,945.7 23,444,802.3 768,000.0 16,145.5
LOS 64 100 16,828,926.7 40,251,404.1 23,417,333.3 656,000.0 2,425.1
Equality8 1 145,002.0 565,376.0 88,865.0 400,000.0 161,456.0
Equality8 10 72,759.0 195,391.5 88,646.3 40,000.0 16,143.7
Equality8 100 71,134.7 164,810.6 88,537.6 10,400.0 2,423.1
Synthetic selector 1 2,345,570.0 5,737,736.0 3,060,363.0 720,000.0 161,493.0
Synthetic selector 10 2,217,327.0 5,170,934.2 2,911,557.7 168,000.0 24,154.7
Synthetic selector 100 2,214,102.7 5,117,492.0 2,898,252.8 114,400.0 2,422.6

Evaluation from prepared garbling:

Program Actual N Body/query Whole/query Postcheck/query Page/query Prelude/query
LOS 0 1 84,446.0 430,248.0 14,646.0 400,000.0 161,383.0
LOS 0 10 12,203.0 60,632.0 14,416.9 40,000.0 16,152.8
LOS 0 100 6,578.7 25,304.9 14,393.6 5,600.0 1,623.0
LOS 4 1 1,462,662.0 4,695,008.0 2,900,432.0 400,000.0 161,564.0
LOS 4 10 1,438,863.0 4,422,479.7 2,941,564.6 136,000.0 24,156.5
LOS 4 100 1,438,172.6 4,397,110.8 2,953,792.6 111,200.0 2,422.8
LOS 16 1 3,872,329.0 11,639,896.0 7,435,444.0 880,000.0 161,600.0
LOS 16 10 3,585,172.5 11,058,129.6 7,438,927.6 304,000.0 16,145.5
LOS 16 100 3,558,294.6 11,003,690.3 7,440,251.2 249,600.0 2,425.1
LOS 64 1 11,660,445.0 35,399,505.0 23,406,990.0 1,280,000.0 161,600.0
LOS 64 10 11,228,503.0 34,673,644.7 23,411,149.3 560,000.0 16,145.5
LOS 64 100 11,187,818.4 34,606,242.7 23,413,280.3 491,200.0 2,425.1
Equality8 1 117,743.0 536,464.0 87,212.0 400,000.0 161,456.0
Equality8 10 45,507.2 166,486.7 86,993.3 40,000.0 16,143.7
Equality8 100 42,240.2 135,863.1 88,484.6 10,400.0 2,423.1
Synthetic selector 1 1,598,791.0 4,829,229.0 2,898,710.0 560,000.0 161,493.0
Synthetic selector 10 1,428,261.9 4,404,216.1 2,933,904.7 152,000.0 24,154.7
Synthetic selector 100 1,412,796.8 4,365,733.1 2,947,799.8 112,800.0 2,422.6

Serialize request and reply frames:

Program Actual N Body/query Whole/query Postcheck/query Page/query Prelude/query
LOS 0 1 81,591.0 421,958.0 9,211.0 400,000.0 161,383.0
LOS 0 10 9,348.0 52,342.0 8,981.9 40,000.0 16,152.8
LOS 0 100 2,923.7 17,014.9 9,758.6 5,600.0 1,623.0
LOS 4 1 94,500.0 1,930,211.0 1,503,872.0 400,000.0 161,564.0
LOS 4 10 110,257.0 1,656,862.2 1,504,560.6 136,000.0 24,156.5
LOS 4 100 120,632.7 1,631,232.2 1,505,454.7 111,200.0 2,422.8
LOS 16 1 354,142.0 4,695,765.0 4,009,575.0 880,000.0 161,600.0
LOS 16 10 281,899.0 4,111,900.6 3,795,972.1 304,000.0 16,145.5
LOS 16 100 276,274.7 4,056,767.8 3,775,349.2 249,600.0 2,425.1
LOS 64 1 665,994.0 13,359,142.0 12,361,153.0 1,280,000.0 161,600.0
LOS 64 10 593,751.0 12,632,754.7 12,005,011.3 560,000.0 16,145.5
LOS 64 100 588,126.7 12,563,472.6 11,970,202.6 491,200.0 2,425.1
Equality8 1 2,126.0 461,505.0 127,945.0 400,000.0 161,456.0
Equality8 10 1,883.0 91,588.3 55,719.1 40,000.0 16,143.7
Equality8 100 6,658.7 61,049.4 49,253.1 10,400.0 2,423.1
Synthetic selector 1 99,486.0 2,112,174.0 1,681,035.0 560,000.0 161,493.0
Synthetic selector 10 115,243.0 1,691,800.8 1,534,515.8 152,000.0 24,154.7
Synthetic selector 100 125,618.7 1,652,206.2 1,521,451.7 112,800.0 2,422.6

Parse request and reply frames:

Program Actual N Body/query Whole/query Postcheck/query Page/query Prelude/query
LOS 0 1 81,474.0 421,841.0 9,211.0 400,000.0 161,383.0
LOS 0 10 9,231.0 52,225.0 8,981.9 40,000.0 16,152.8
LOS 0 100 2,806.7 16,897.9 9,758.6 5,600.0 1,623.0
LOS 4 1 81,474.0 1,917,185.0 1,503,872.0 400,000.0 161,564.0
LOS 4 10 49,231.0 1,619,836.2 1,528,560.6 112,000.0 24,156.5
LOS 4 100 54,806.7 1,592,606.2 1,532,654.7 85,600.0 2,422.8
LOS 16 1 161,474.0 4,503,097.0 4,009,575.0 720,000.0 161,600.0
LOS 16 10 89,231.0 3,919,225.1 3,795,972.1 144,000.0 16,145.5
LOS 16 100 82,806.7 3,864,099.8 3,776,149.2 89,600.0 2,425.1
LOS 64 1 161,474.0 12,934,622.0 12,441,153.0 960,000.0 161,600.0
LOS 64 10 89,231.0 12,208,227.2 12,085,011.3 240,000.0 16,145.5
LOS 64 100 82,806.7 12,138,952.6 12,051,002.6 171,200.0 2,425.1
Equality8 1 1,474.0 460,853.0 127,945.0 400,000.0 161,456.0
Equality8 10 1,231.0 90,928.8 55,719.1 40,000.0 16,143.7
Equality8 100 3,606.7 60,397.4 51,653.1 10,400.0 2,423.1
Synthetic selector 1 81,474.0 2,094,162.0 1,681,035.0 560,000.0 161,493.0
Synthetic selector 10 49,231.0 1,657,788.8 1,566,515.8 136,000.0 24,154.7
Synthetic selector 100 54,806.7 1,608,594.2 1,548,651.7 87,200.0 2,422.6

The same-runtime Equality8 rows above are the phase comparison. The retained specialized Equality8 reference reports 65,817.3 garble and 29,043.1 evaluate body instructions per query at actual N1000. That older garble body includes fresh per-query PRG construction/fill; this garble phase uses staged RandomMaterial. The specialized evaluator also uses a different fixed circuit adapter. Those older values are source-scope context, not a matched direct speed ratio or a combined LOS cost.

Qualification: native tests pass six runtime tests, eight independent integration tests including all 262,144 plaintext position pairs across the four maps, and three benchmark tests. The optimized installed image checks all 48 complete request/reply frame records against portable native bytes and independent geometry. A separate instrumented image checks exact compiled gates and four Alice/two Bob hashes per AND; it produces no performance rows. The ordinary native/target differential shares runtime source. The independent audit separately reconstructs all 48 records (943,360 bytes) with Python integer Half-Gates, OpenSSL AES and Node noble BLAKE3. It reconciles 770 primary and 48 counter traces. The optional narrow AES constant-time claim retains its supported-engine hardware register-swizzle assumption; no universal-host timing guarantee is added.

The independent actual-IC audit passes for the exact primary/counter images and native-reference hashes. The only sample difference is 45 whole-update instructions when a fixture-ID Wire varint grows by one byte; bodies, postchecks, preludes and page fees remain identical.

The original 91-population GC matrix was rerun using its unchanged prepared artifact. All outputs and raw-body/whole/page cost fields match the frozen baseline exactly. This is a fresh execution regression, not a rebuild of a different original benchmark.

The pinned malicious-OT reference was also repeated at actual 8/80/800/8000 logical OTs, plus separate base128 and no-op controls, under wasm32 WASI. These are Wasmtime fuel for the entire standalone fixture, including setup, tests, output checks and stdout. Fuel includes both parties cold setup and checks; it is not IC instructions and is never subtracted or added to these circuit-stage costs. All six runs pass; IC integration remains blocked. The repeated WASI module has SHA256 61025a9915de9e562bb269d028970a461c74513fba1143ed93a8aae429dd0f9f; this is a fresh reproduction, distinct from the original a47b57b2 module and its frozen fuel receipts.

Standalone population Whole WASI fuel Fixture transport bytes Chosen-mask payload Base/internal OTs
chosen-8 1,449,215,057 14,225 256 128 / 128
chosen-80 1,454,553,118 17,553 2,560 128 / 256
chosen-800 1,488,124,455 45,721 25,600 128 / 896
chosen-8000 1,847,012,823 333,465 256,000 128 / 8064
base128 1,428,860,180 4,236 unreported 128 / —
noop 24,988 unreported unreported — / —

The original audit covered chosen 8/80/800; the selected-run audit also checks all six receipts separately. Chosen 8000, base128 and noop are additive WASI reproductions/controls and do not qualify an IC OT adapter.

Frozen image identity:

Image Prepared Wasm SHA256 Bytes Features
Primary ea319243b9b097815cf988a93682db35d1a4d5aced0cdd4ece313fb7382b4709 530,462 aes-narrow, aes-simd, prg-query-batch, prg-simd, prg-xof4
Counter 0472b9391a8bd27d995505b7264676347ad998f4ad0d1172b8744a5bcb3b7498 separate image aes-narrow, aes-simd, instrumentation, prg-query-batch, prg-simd, prg-xof4

SDK d0e53afc7b7fdc4b7cf4e2ccbe1e55a386133c4b; factory parent cbef3c8d3274651b3f83c6320b48b39610bda393. Exact archived source receipts identify local additions beyond the parent commit. PocketIC normal13 SHA256 6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6. The primary image has no instrumentation. Host invocation durations are diagnostics; runtime wall median/p95, peak live heap, IC OT costs and network metrics remain unmeasured. Out-of-window committed page capacity is not peak live heap.

The curated archive retains all results, byte proofs, exact introduced-source/generated-circuit snapshots, prepared modules, representative captures and full trace/source hash indexes. Raw evidence remains at /srv/shared/code/newstack/playground/private-los-20261031, with complete canonical artifacts/source archives, native-reference receipts, setup/body/control/noop traces, cycle snapshots and owned-session receipts. Canonical receipt absolute paths preserve their original build meaning; curation does not reinterpret them as fresh builds. Native binary mappings distinguish the saved original binary from the later binary at its reused absolute path.

This is a partial repository reproduction snapshot: full SDK/debug/source archives and most raw captures remain local at the indexed original paths. Compact source snapshots are not a standalone full build closure. Replaying those complete raw audits requires the local originals; rebuilding elsewhere requires the pinned SDK/compiler/dependencies and fresh canonical artifacts. Current API/documentation edits postdate measurement and do not constitute a rerun of an end-to-end packaging script.

Evidence: primary results, catalog, correctness, native receipt, source review.