Skip to content

Add hybrid post-quantum PKE scheme - #137

Open
zjma wants to merge 3 commits into
mainfrom
codex/pq-hybrid-pke-scheme-2
Open

Add hybrid post-quantum PKE scheme#137
zjma wants to merge 3 commits into
mainfrom
codex/pq-hybrid-pke-scheme-2

Conversation

@zjma

@zjma zjma commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a dedicated Rust PKE crate, worker-components/pke / ace-pke, and keeps compatibility re-exports from vss-common for existing worker call sites.
  • Adds PKE scheme 0x02: nested hybrid X25519 HPKE + ML-KEM-768 + HKDF-SHA256 + ChaCha20-Poly1305.
  • Wires scheme 0x02 through Rust and TypeScript PKE dispatch, and adds Move-side decoder support.
  • Adds Rust/TS tests and microbenchmarks for the hybrid scheme.
  • Updates auditor docs and wire-format docs to mark scheme 0x02 as prototype/unaudited, with security-model notes, standards references, and ciphertext sizing. Scheme 0x01 remains the production default.

Benchmark Results

Local microbenchmarks; mean latency in milliseconds. These are kept in the PR description rather than committed docs because they are one-off local numbers and depend on host/runtime versions.

impl keygen enc 32B dec 32B enc 1KB dec 1KB enc 64KB dec 64KB
Rust hybrid 0.032 0.069 0.089 0.072 0.096 0.276 0.396
Rust HPKE baseline 0.010 0.044 0.034 0.044 0.034 0.139 0.128
TS hybrid 0.294 0.557 0.734 0.542 0.732 1.081 1.286
TS HPKE baseline 0.058 0.245 0.222 0.241 0.235 0.525 0.513

Benchmark commands used:

cargo test -p ace-pke --release bench_hybrid_x25519_mlkem768 -- --ignored --nocapture
cargo test -p ace-pke --release bench_hpke -- --ignored --nocapture
pnpm --filter @aptos-labs/ace-sdk exec vitest bench --run hybrid_x25519_mlkem768_chacha20poly1305.bench.ts
pnpm --filter @aptos-labs/ace-sdk exec vitest bench --run hpke_x25519_chacha20poly1305.bench.ts

Validation

pnpm --filter @aptos-labs/ace-sdk typecheck
pnpm --filter @aptos-labs/ace-sdk test -- --run hybrid_x25519_mlkem768_chacha20poly1305.test.ts pke.test.ts
cargo test --workspace
aptos move test --package-dir contracts/pke

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