Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7a4a891
fix(bit2): refuse malformed lengths in the legacy raw comparator
coderdan Oct 8, 2026
b0fe75e
test(fuzz): libFuzzer targets for the ciphertext parsers and comparators
coderdan Oct 8, 2026
b3ecff2
test(ct-taint): Valgrind taint harness for the v2 encryptors
coderdan Oct 8, 2026
b53d30c
test(ct-dudect): dudect timing benches for the comparators and encryp…
coderdan Oct 8, 2026
89cc8ed
ci: verify workflow — Valgrind taint, fuzz targets, Kani harnesses
coderdan Oct 8, 2026
add3f0f
test(ore-rs): kani harnesses for the pure building blocks
coderdan Oct 9, 2026
f4d5a1c
test(ore-rs): run the two exhaustive-length Kani harnesses only with …
coderdan Oct 9, 2026
a1f3a91
test(ct-dudect): make the input pool size configurable
coderdan Oct 9, 2026
eec298b
docs(review): dynamic and formal verification results for ORE v2
coderdan Oct 9, 2026
1b5f668
bench(prp): criterion bench for the Bit6 PRP builder alone
coderdan Oct 9, 2026
7a4afd5
docs(bench): oblivious PRP builder results
coderdan Oct 9, 2026
784bdee
harden(compare): latch first differing block in legacy and Bit6 typed…
coderdan Oct 9, 2026
71a1a19
harden(compare): zeroize the latched first-difference copies
coderdan Oct 9, 2026
9af04d3
harden(prp): typed in-domain Symbol; infallible permute; drop taint s…
coderdan Oct 9, 2026
68ac5ba
ci(verify): run the taint gate on x86_64 and aarch64
coderdan Oct 9, 2026
c906e15
fix(ct-dudect): apply DIT in every bench, portably; correct the dudec…
coderdan Oct 9, 2026
9c848ef
refactor(prp): from_stream delegates to one from_stream_with
coderdan Oct 9, 2026
b47add1
refactor(ct-bench): reuse lemire_draw and the reference builder in th…
coderdan Oct 9, 2026
451dbec
test(decompose): prove order preservation across different lengths
coderdan Oct 9, 2026
eda3f20
test(fuzz): round-trip Right::from_slice for Bit6 and legacy
coderdan Oct 9, 2026
4b11458
fix(fuzz.sh): build only the targets being run; run every target even…
coderdan Oct 9, 2026
ffb574b
test(prp): prove lemire_draw itself; test every swap of the shipped b…
coderdan Oct 9, 2026
3c5f285
docs(review): Kani row for cross-length order preservation
coderdan Oct 9, 2026
25f327a
ci(kani): make the default harness set fit CI; time-limit the job
coderdan Oct 9, 2026
86fcf47
docs(dudect): DIT does not remove the prp_build_const_vs_random residual
coderdan Oct 9, 2026
d774929
fix(ct-dudect): remove the layout and timer artifacts from the PRP bu…
coderdan Oct 10, 2026
3edeb5f
docs(dudect): the const-vs-random residual was the harness
coderdan Oct 10, 2026
ba9d03c
docs(dudect): the corrected const-vs-random bench is clean on the M4
coderdan Oct 10, 2026
1e9100f
fix(chained): refuse oversized raw symbols before scanning them
coderdan Oct 11, 2026
24e55a5
ci(test): run the ct_bench tests
coderdan Oct 11, 2026
70039d3
ct-taint: refuse a vacuous pass; cover more types and the raw entry p…
coderdan Oct 12, 2026
9fc1a08
ci(test): run the full test suite on aarch64 too
coderdan Oct 12, 2026
9569719
fuzz: check that the raw comparator and the typed Ord agree
coderdan Oct 12, 2026
09d50ad
chore: update the detached lockfiles to orderable-bytes 0.2
coderdan Oct 12, 2026
2ca0ecc
docs(dudect): name the measured commit by subject, not SHA
coderdan Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,19 @@ defaults:

jobs:
test:
runs-on: ubuntu-latest
name: "🧪 Test"
# Both architectures: aarch64 runs hardware AES (`--cfg aes_armv8`), the
# NEON kernels and the NEON PRP builder, which x86_64 never reaches, against
# the same pinned vectors.
runs-on: ${{ matrix.os }}
name: "🧪 Test (${{ matrix.arch }})"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-24.04-arm
arch: aarch64

steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +40,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: setup rust 1.78
uses: dtolnay/rust-toolchain@1.78.0
Expand All @@ -45,6 +56,11 @@ jobs:
- name: test
run: cargo test --all-features

# `ct_bench` and its tests compile only with this feature; the clippy
# step above builds them but never runs them.
- name: test (ct-bench)
run: cargo test -p ore-rs --features ct-bench --lib ct_bench

bench:
runs-on: ubuntu-latest
name: "⏱ Benchmark"
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: "Verify"
# Dynamic and formal evidence for the v2 ORE implementation, beyond the unit
# and property tests in `test.yml`:
#
# * ct-taint: the ctgrind-style Valgrind run (packages/ct-taint) over the v2
# encryptors; the legacy OreAes128 encryptor is out of scope (its PRP
# swaps at secret indices by design, and its wire format is frozen). Key
# and plaintext are marked undefined; every secret-dependent branch or
# secret-indexed access memcheck reports fails the job unless it is one of
# the documented exceptions in packages/ct-taint/valgrind.supp. The run
# fails if the taint never reaches a mode's output, and a canary mode
# that branches on a tainted byte must fail.
# * fuzz: the libFuzzer targets (packages/ore-rs/fuzz) for the ciphertext
# parsers and raw comparators, time-boxed per pull request.
# * kani: the bounded model-checking harnesses (`#[cfg(kani)]`) for the pure
# building blocks. The two heaviest, behind the `kani-full` feature, are
# not run here: the exhaustive-length `ct_select_byte` harness (about 9
# minutes) and the SWAR-builder equivalence harness (about 15 minutes on
# an M4, and cancelled on GitHub's runners); run
# `cargo kani -p ore-rs --features kani-full` by hand for the full set.
#
# Like test.yml, this runs on every pull request regardless of base branch, so
# the stacked PRs get it too.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash -l {0}

jobs:
ct-taint:
# Both legs matter: `oblivious::build` dispatches to the SSSE3 builder on
# x86_64 and the NEON builder on aarch64, so each target's shipping
# builder is only taint-checked on its own runner.
runs-on: ${{ matrix.os }}
name: "🔍 Valgrind taint (${{ matrix.arch }})"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-24.04-arm
arch: aarch64
steps:
- uses: actions/checkout@v4

- name: setup rust
uses: dtolnay/rust-toolchain@stable

- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
packages/ct-taint/target/
key: ${{ runner.os }}-${{ runner.arch }}-ct-taint-${{ hashFiles('packages/ct-taint/Cargo.lock', 'packages/ore-rs/src/**') }}

# crabgrind binds the Valgrind client-request header at build time.
- name: install valgrind
run: sudo apt-get update -qq && sudo apt-get install -y -qq valgrind clang libclang-dev

- name: taint run
run: scripts/ct-taint.sh

fuzz:
runs-on: ubuntu-latest
name: "🧬 fuzz (${{ matrix.target }})"
strategy:
fail-fast: false
matrix:
target: [chained_parse, chained_compare, bit6_parse, bit8_parse]
steps:
- uses: actions/checkout@v4

- name: setup nightly (cargo-fuzz requires it)
uses: dtolnay/rust-toolchain@nightly

- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/bin/cargo-fuzz
packages/ore-rs/fuzz/target/
key: ${{ runner.os }}-fuzz-${{ hashFiles('packages/ore-rs/fuzz/Cargo.lock', 'packages/ore-rs/src/**') }}

- name: install cargo-fuzz
run: command -v cargo-fuzz >/dev/null || cargo install cargo-fuzz --locked

- name: fuzz
run: scripts/fuzz.sh 120 ${{ matrix.target }}

- name: keep any crashing input
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts-${{ matrix.target }}
path: packages/ore-rs/fuzz/artifacts/
if-no-files-found: ignore

kani:
runs-on: ubuntu-latest
name: "✅ Kani"
# A hung or runaway CBMC run should fail the job rather than hold a
# runner for GitHub's six-hour default.
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- uses: model-checking/kani-github-action@v1.1
with:
args: -p ore-rs
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
.DS_Store
.env
*.pem

# Detached verification crates (packages/ct-taint, packages/ct-dudect,
# packages/ore-rs/fuzz) build into their own target dirs; the taint harness
# also builds into target-linux from a container on a macOS host. libFuzzer
# crash artefacts are per-run output, not seeds (the seeds are in corpus/).
target/
packages/ct-taint/target-linux/
packages/ore-rs/fuzz/artifacts/
Loading
Loading