Repository navigation
Fuse VAES hashing and packed choice extraction in the Silent OT receiver - #207
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.