Repository navigation
Add BinaryBAA and ChosenBAA30 with optimized encoding - #199
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.
This adds two explicit BAA profiles:
BinaryBAA<Word>for independent binary lanes (10% tier), andChosenBAA30<F>for large fields (30% tier). GF(2^128) Silent VOLE defaults toMultType::ChosenBAA30. BinaryBAA is available in binary Silent OT and is rejected by both Silent VOLE peers and the field-compression adapter. The former field-dependentChosenBaa10API is removed; legacy full-fieldChosenBaa16x8andChosenBaa16x4remain selectable.blockcarries 128 independent binary codewords. Silent OT supports packed and separate choice bits, with a joint commit/contribute/open seed exchange. Its existing noise convention selects 200 regular or 424 stationary positions at the default security setting.clear()releases both outputs and workspace. The reuse regression compares paired outputs with fresh workspaces while changing lengths and seeds.BinarySolver::solveOneretaining spans into expired stack parameters by awaitingsolvein the wrapper. The delayed-start regression reproduces the prior failure under Clang ASan.At k=2^20, n=2^21, the binary numerical distance procedure gives >10% with a 47.093-bit sampling margin; the q256 exact direct-rank certificate gives >30.524% with a 59.13394-bit margin. These are length-specific ideal-uniform-setup bounds, not protocol-security proofs or guarantees for AES-expanded randomness. The binary calculation uses the original floating-point procedure and its rounding allowance.
Latest setup/encoding optimization batches uniform-shuffle draws and destination prefetches, packs coefficient bytes from contiguous PRNG views, and uses four-element fully unrolled GF128 scan batches on x86 VPCLMUL builds. The exact seed-to-code mapping is preserved; ARM, portable, and other-field scan schedules remain unchanged.
Sequential Peach A/B measurements (same hardware/compiler below; three seeds, two warmups and eleven samples per seed; medians of per-seed medians):
k=2^20)Setup reuses capacity but generates fresh randomness each sample; encoding excludes setup. Metadata and output checksums match the previous implementation for all compared seeds. A scalar setup reference covers batch tails and rejection sampling. Focused BAA tests, all 28 enabled Silent tests, all 56 dependent PSI tests, and kernel ASan/UBSan checks pass. The dependent PSI warm elapsed time improves from 392.8 to 377.3 ms with one core per party. See reproduction details and benchmark source.
Previously recorded sequential Peach measurements (Ryzen 7950X, pinned CPU 2 at 4.5 GHz, GCC 15.2, AVX-512/VPCLMUL/GFNI, six seeds, two warmups, 31 samples per direction):
Setup/allocation are excluded. The optimized kernel maps and seed schedules are unchanged by the API split. Reproduction commands and backend-specific results are in
libOTe_Tests/benchmarks/ChosenBaaDirections.md.The RS addition-only, q2, and constant-mixing exploration is archived in gen-BAA commit
ad9f485, underfield-universality/libote-baa-exploration/2026-11-14; the RS addition-only 10% bound remains unproved. These experiments are not public profiles.Validation: all five focused code/seed/VOLE/BinaryBAA-OT/Tungsten-OT tests pass, and all 28 enabled Silent protocol regressions pass (the optional SPIN test is disabled). Portable code, seed, VOLE, and BinaryBAA OT checks pass. Packed/separate choices, regular/stationary noise, and semi-honest/malicious modes are covered. All 56 dependent volePSI tests pass. The fallback CI build exposed a missing explicit test include when Silent OT is disabled; the fix is included, and a compile check with Silent OT/VOLE/SoftSpoken/bitpolymul disabled passes. CI is tracked by this PR's current checks.