Skip to content

Fuse VAES hashing and packed choice extraction in the Silent OT receiver - #207

Merged
ladnir merged 1 commit into
masterfrom
codex/vaes-packed-receiver
Nov 25, 2026
Merged

ladnir merged 1 commit into
masterfrom
codex/vaes-packed-receiver

Conversation

@ladnir

@ladnir ladnir commented Nov 25, 2026

Copy link
Copy Markdown
Member

The packed-choice Silent OT receiver previously stored the masked 128-bit inputs and reloaded them through the generic batched AES path. With VAES enabled this made receiver hashing slower than the fallback on Peach. Fuse choice-bit extraction, masking and Davies–Meyer hashing across eight independent YMM chains (16 OTs) and write each finished message once. The scalar tail also captures the choice bit before an in-place output can overwrite it.

The regression test checks the packed bits and every hash against single-block AES for lengths 0 through 50. It exercises 32-byte-aligned, 16-byte-only-aligned and in-place output, with canaries around external output spans.

Peach results

Release, GCC 15.2, Ryzen 9 7950X, one pinned core. Each entry is the median across five runs of the paired SPIN OT benchmark, with 31 measured batches per run, alternating binaries. The benchmark checked every batch against the peer. Times are microseconds per receiver batch, including expansion, compression and output hashing.

Noise OTs VAES before VAES after VAES off
Stationary 32,768 332 232 261
Stationary 262,144 3,464 2,699 2,884
Regular 32,768 290 191 265
Regular 262,144 2,745 1,971 2,595

At 32,768 stationary OTs the receiver hash itself went from 120.1 to 20.5 µs. The VAES sender measured 234 µs on both revisions. The full test executable passed all 224 enabled tests in both VAES-on and VAES-off builds, with 94 configuration skips in each.

@ladnir
ladnir merged commit 8a5740d into master Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant