Independent private LOS review
Review date: 2026-10-31. This reviewer owns crypto/algo/private-los/tests/reference.rs
and this directory only. Root owns Cargo, builds, caches, artifacts and PocketIC.
No Rust build, target execution or server was started by this reviewer.
Independent reference and arithmetic
The reference converts byte positions into odd doubled tile-centre coordinates
(2*x+1, 2*y+1) and public vertices into even coordinates. It uses an ordinary
four-orientation signed i64 segment intersection with inclusive bounding-box
on-segment checks. It shares no reduced-orientation or straddle code with the
compiler. A closed-segment intersection, including just one shared endpoint,
blocks visibility. The mathematical predicate handles degenerate and collinear
segments even though legal nondegenerate axis-aligned public walls cannot
contain an odd/odd tile centre. Identical positions are therefore visible
without an oracle special case.
The fixtures cover proper crossing, shared endpoint, collinear overlap, disjoint collinearity, degenerate point segments, parallel lines, coordinate extremes, both wall orientations and every identical byte position. Every public map is required to have exactly 0/4/16/64 nonduplicate, nondegenerate, axis-aligned interior segments. The plaintext circuit comparison covers all 65,536 ordered byte pairs per map. Gate tests check topological ordering, AND depth scheduling, exact counts, complete gate liveness and live input metadata. The empty map must have no gates or live Alice/Bob inputs, use the complemented false literal, and require one constant label.
arithmetic-bounds.json is a separate Python integer enumeration of all 65,536
input pairs. Each endpoint expression is affine in public vertex coordinates,
so testing the four grid corners proves its extrema throughout [0,16]^2.
The exact ranges are dx,dy in [-15,15], unsigned products in [0,225],
product difference in [-225,225], doubled difference in [-450,450], and
T in [-480,480]. The complete reduced endpoint orientation is also in
[-480,480]. Signed 5-bit differences and signed 10-bit T are safe. A
10-bit modular endpoint implementation is also valid: all arithmetic is
modulo 1024, while the exact final value is always in [-480,480], inside
the signed 10-bit interpretation range [-512,511]. Intermediate modular
wrap therefore does not change the final sign. Conservative signed 12-bit
endpoint arithmetic would also be safe, but is unnecessary. Unsigned products
must be zero-extended before signed subtraction; interpreting their 8-bit
representations as signed would be wrong. The independent conservative sum of
absolute term bounds is 1440, below the signed 12-bit maximum 2047.
An independent semantic argument for the narrower implementation is as follows.
Write the endpoint expression as
P = 2(ax*by-bx*ay)+(by-ay)-(bx-ax)+2*(bx-ax)*l-2*(by-ay)*k.
It is affine in each of its six variables when the others are fixed. Repeated
linear interpolation therefore expresses every value on the box
[0,15]^4 x [0,16]^2 as a convex combination of its 64 corner values.
Those corner values have minimum -480 and maximum 480. Add, subtract, multiply
and shift operations entirely in the ring modulo 1024 compute P mod 1024.
The unique signed 10-bit representative is exactly P, since the proved range
lies within [-512,511]. Sign and zero tests on this final result are exact.
This argument does not permit sign, zero or overflow decisions on a wrapped
intermediate; each such decision would need its own independent bound. The
implementation was inspected for that condition. The 8-bit products are
zero-extended before 9-bit determinant subtraction; that signed result and
5-bit differences are sign-extended before shifts/scales. Endpoint operations
remain 10-bit modular vectors, and only the final endpoint vectors feed
sign-bit and all-bits-zero tests. Public coefficients 2*k and 2*l are at
most 32. The current compiler satisfies the narrower-width proof.
These are source/arithmetic checks. Passing generated Rust tests and actual garbled execution remain separate evidence owned by root.
Security boundary
The intended inversion convention is edge-complement NOT: the garbler swaps a wire's logical meanings and the evaluator keeps the same active label. The constant-true output is the complemented constant-false pair; Bob receives only the false active label and returns one opaque label. Neither a zero label nor delta may stand in for that randomized active constant. Alice alone holds the final label-to-Boolean map. Both labels of any input pair, delta, and output map must remain outside Bob requests and Bob-owned state. Owned private state must remain non-Clone/non-Debug/non-Serialize and explicitly best-effort wiped.
The static trusted program is public; public-map geometry, gate schedule, declared/live input counts and table sizes are not hidden. Runtime choices may depend on this static structure, never secret positions. Free-XOR needs one fresh global delta per garbling, with odd permutation bit, and half-gate tweaks must be unique by AND ordinal within that garbling. Fresh query material is a caller responsibility. This is honest-execution garbling; malicious OT alone does not provide malicious-garbler or selective-failure security.
The current runtime source satisfies this separation. Private owner fields are
not public and carry no cloning, printing or serialization derives. Request
payloads contain only live Alice labels, an optional active constant-false
label, and the two-block AND tables. Bob labels and workspace contain active
labels only. The external OT sender boundary borrows Alice-owned Bob pairs;
it implements no label delivery protocol. pair_input applies inversion by
swapping pairs only on Alice's side; Bob reads each literal's wire index and
ignores its inversion. The output map applies the final inversion before Alice
retains it. AND IDs advance by one per actual AND for both paired and scalar
execution, with identical order on both parties. No secret position controls
the runtime schedule. Query decoding compares both complete candidate labels
in constant time and consumes the map, including rejection. Secret buffers and
wire owners have explicit wiping/drop paths, subject to the stated best-effort
limits.
OT evidence preserved
The existing crypto/algo/garbled-circuit/crypto-profile.json and
crypto/bench/garbled-circuit/ot-reference/README.md describe actual pinned
SimplestOT + SoftSpoken malicious chosen-message work in native C++ and
standalone Wasm32-WASI. They do not expose a qualified Rust Wasm64 IC adapter.
The memory64 C++ standard library/runtime, IC transport and Rust ABI boundary
remain absent. Exact revised-paper access, portable secret-indexed AES
constant-time qualification and complete macoro redistribution coverage remain
open. No reference source or baseline evidence was modified in this review.
Local fixture label selection is circuit testing, never OT. Unmeasured IC OT instructions, generated/check/base counts, communication and rounds stay null and blocked. Logical chosen-OT demand is the number of live Bob inputs, with the declared 8 bits reported separately: the zero-wall constant has zero logical chosen OTs. An absent full protocol remains absent even for that constant-output fixture.
Measurement assumptions
Read-only SHA-256 checks of the following local /srv/shared/ic files exactly
match the four hashes in crypto/research/measurement.md:
rs/memory_tracker/src/deterministic.rsrs/config/src/subnet_config.rsrs/embedders/src/wasmtime_embedder/linker.rsrs/embedders/src/wasm_utils/system_api_replacements.rs
The current IC source HEAD is 49a94778d9aff90139cadc4f9c14b98b2aae42a4;
the matching individual file hashes, rather than that newer HEAD, establish
the reviewed excerpts. DEFAULT_PAGE_OVERHEAD is 5000 instructions per native
OS page. The tracker charges access and dirtying separately for each aligned
64 KiB Wasm region. Under 4 KiB OS pages, first update write can cost
80,000 access plus 80,000 dirty instructions. DirtyPageTracking::Ignore
charges access only. These are physical execution epochs, so staging in a
previous message does not prepay the next message's page fees.
The performance-counter linker charges PERFORMANCE_COUNTER before reading
the instruction counter; the local complexity source defines it as 200.
Raw counter differences include the ending probe and any in-window page
faults, and retain metering block-boundary effects. Whole checked-update
traces, including verification/serialization/cleanup, decide instruction-limit
success. Body intervals and controls are reported separately, with no page or
no-op subtraction used to claim performance.
These source checks do not establish the identity or configuration of the binary root will run. Each measurement still needs its exact prepared Wasm, matching source/debug receipt, PocketIC binary hash/catalog, actual subnet configuration, complete trace and actual successful requested batch. No Wasmtime fuel-to-IC conversion or extrapolated N1000 value is valid.
Synthetic selector comparator
The 255-AND/510-XOR selector is a generic 256:1 Boolean multiplexer. Its fixture
tests use arbitrary all-zero/all-one/mod-3/parity patterns, never a visibility
mask. Its 256 Alice bits and 8 Bob bits are a different private-input population
from LOS's two position bytes. Mask construction and preprocessing are
unmeasured, so it may compare circuit kernels only and cannot establish a
full LOS mask protocol or a complete protocol speedup. The new benchmark matrix
currently labels it synthetic-selector-comparator and keeps full protocol
rows blocked.
Primary sources consulted
- CGAL, Segment_2: segments include their endpoints; on-segment includes source, target and interior. The intersection contract defines intersection through any common point. Consulted 2026-10-31.
- Zahur, Rosulek and Evans, Two Halves Make a Whole: two ciphertexts per AND compatible with zero-ciphertext XOR, and two evaluator cryptographic operations per AND. Metadata consulted 2026-10-31. The direct author-hosted PDF was inaccessible through the browsing tool; this review does not claim a new paper-level cryptographic audit.
- Existing pinned OT profile and reference documentation supply the retained qualification status; this review adds no new OT result.
Execution status
Root's retained native-core-002.log records all six runtime unit tests and
eight independent integration tests passing, including all 262,144 plaintext
map/input pairs and the sampled actual-GC tests. The feature-gated actual-GC test
uses fresh query domains within its run and covers deterministic samples,
extremes/identicals, first/last walls, both wall orientations, endpoint touches,
proper crossings and nearby parallel paths. Every answer is checked against
the independent geometry oracle after serializing and parsing the request.
With instrumentation, every garbling/evaluation must use exactly four/two
hashes per compiled AND and the exact compiled AND/XOR counts. The constant-map
fixture bypasses Bob label selection, checks that the active constant is
randomized, preserves its bytes through output inversion, and decodes true only
through Alice's consumed map. Actual request/reply frames must be 100 bytes
each: 16-byte payload plus the existing 84-byte header.
The benchmark source review finds the selector correctly named and staged as synthetic arbitrary bits, without LOS mask computation. Inputs, workspaces, randomness capacity, AES/session owners and frame buffers are staged before body counters. Poststage completion, geometry, decoded answers and full reply bytes are checked after the body; they remain inside the whole update. The fixture refuses a second timed run, and its README explicitly describes the deterministic public domains reconstructed for matched samples. This does not claim production entropy or cryptographic freshness across benchmark replays.
The completed independent saved-evidence audit is
actual-audit.json, reproduced by
audit_actual.py. It verifies the exact compiled circuit
archived with the selected artifact independently of the live checkout:
- 10,700 archived source files, 21 canonical outputs and all archived debug source bytes verify against their receipts. Native source, host codec, transport and installed/canonical Wasm identities agree.
- The independently parsed circuit is topological, depth-scheduled and wholly live. It matches ordinary closed-segment geometry for all 262,144 ordered position pairs. Visible pair totals are 65,536 / 60,020 / 43,252 / 14,160 for the 0 / 4 / 16 / 64 wall maps.
- A separate Python integer Free-XOR/Half-Gates garbler and evaluator, OpenSSL 3.4.3 AES and Noble BLAKE3 reproduce every byte of the 48 native request/reply records: 943,360 bytes. The actual primary and structural target probes match those records. This extends the shared-Rust target differential with an independent full-byte cryptographic oracle.
- All 770 primary and 48 structural traces have complete reconciled instruction, page, cycle and scheduling ledgers. All 90 primary populations at actual N1/N10/N100, 180 measured rows including controls, 36 explicitly blocked protocol rows and 6,660 native checksum items verify. The highest primary whole-update cost is 4,105,124,247 instructions.
- One sample pair differs by 45 whole-update instructions because its fixture ID changes the request's Wire varint from two bytes to three. Body, prelude, postcheck and page costs are identical. Raw costs are not adjusted to hide it.
- The separate instrumented artifact has 48 checked probes and zero performance rows. Across its probes it records exactly 112,192 Alice hashes, 56,096 Bob hashes, 28,048 ANDs per party and 46,496 XORs per party. Its SDK source closure equals the primary image's.
- The retained old 91-population algorithm regression has all 182 measured rows' raw, whole-update and page values identical to the prior run of the same artifact. It is a same-artifact rerun, not a new build qualification.
- The 8/80/800 chosen-OT reruns pass saved output/parameter checks on the
retained reproduction module
61025a99..., distinct from the original profile modulea47b57b2.... Fuel is 1,449,215,057 / 1,454,553,118 / 1,488,124,455 in standalone Wasmtime units, never IC instructions. Their imports remain WASI only; no IC OT adapter is qualified.
Final audit SHA-256:
6377fef22ad19fc11f7d5c24fc6df374beba47fbbafa33164034638e19dd83c7.
Primary results SHA-256:
6470f325cf3d7c1b1f26c444b015cdcde594256c282b68e36c5cd18e026fa691.
No source defect or evidence discrepancy remains open from this review.