Crypto implementation and qualification

Status belongs here; measured numbers belong to dated benchmark receipts. Native vectors and driver fixtures are tested separately from actual installed-Wasm qualification, which is tracked below. A checked implementation is not a claim that every listed variant is optimized.

Foundation

  • Inventory existing SDK, Showtime and Motoko implementations read-only.
  • Research specifications, source pins, licenses and IC measurement rules.
  • Record copied-source identities and licenses in each algorithm family.
  • Build reusable crates, shared known-answer tests and bounded Wire benchmark.
  • Separate fixture setup, cold/fresh contexts, reused contexts, kernel timing, complete endpoint instructions and heap/stable page charges.
  • Preserve before/after results; profile representative calls with PocketIC.

Garbled-circuit function foundation

  • Reusable label operations, portable AES/GF gate hash, Half-Gates and private BLAKE3 XOF.
  • Independent OpenSSL fixtures, all Boolean gate cases and fresh 65,536-pair equality checks.
  • Dedicated IC function benchmark and separately instrumented structural checks.
  • Compact seeded-session state, byte-equivalent SIMD XOF expansion and batched AES gate hashing.
  • Full-byte Wasm XOF checks across modes, tails, unaligned buffers and counter boundaries.
  • Two-word GF doubling, separately profiled AES32, and measured scalar/SIMD game PRGs.
  • Full-byte SIMD checks including the final four IETF counter blocks.
  • Paired garbler/evaluator levels, fused labels, reused AES scratch and exact-byte SIMD independent-secret batches.
  • Qualify narrow AES widths 1/2/4 on the supported engine and retain Boolean width 8.
  • Measure the BLAKE3 single-query/four-query scheduling cutoff and remove the single-secret batch regression.
  • Qualify the exact revised Chou–Orlandi/SoftSpoken papers and the Wasm64 IC OT bridge.

The function benchmark and OT profile distinguish runnable functions, reference-backend qualification and blocked full-protocol cases. Do not substitute simulated label selection for chosen-message OT.

Private LOS circuit functions

  • Reusable build-time 0/4/16/64-wall circuits with exact position/touch semantics.
  • Staged role-separated garbling/evaluation and caller-owned reusable scratch.
  • Exhaustive independent geometry over all 262,144 map/position pairs.
  • Actual N1/10/100 stage benchmarks, complete-frame byte oracle and separate structural image.
  • Same-runtime Equality8 and synthetic selector comparisons, with preprocessing unmeasured.
  • Integrate actual IC OT and an authenticated full private protocol before any protocol cost/privacy claim.

See the API guide and dated IC evidence. The original 91-case GC matrix and pinned WASI OT reference remain separate.

Private 2D proximity circuit functions

  • Qualify the R1/R2/R4 coordinate predicates against an independent exhaustive oracle.
  • Capture actual N1/N100 stage costs and same-image generic Equality8 controls.
  • Compare complete native/target frames and chosen Bob labels; verify a separate structural image.
  • Preserve raw rows and receipts with separate body/query, whole-update and page ledgers.
  • Integrate actual IC OT and an authenticated protocol before protocol cost/privacy claims.

The dedicated benchmark and maintained report tool keep the primary proximity matrix separate from frozen LOS and synthetic-selector references. The dated qualification links the independent audit and preserved measured data. Synthetic-mask preprocessing is unmeasured; actual IC OT remains blocked.

Core algorithms

  • SHA-256: whole hash, compression, rolling-schedule optimized/reference.
  • SHA-512: whole hash and compression; borrowed streaming blocks.
  • BLAKE3: hash, keyed MAC, derive-key; portable and wasm64 SIMD controls.
  • HMAC-SHA256: MAC, constant-time verification, prepared-key state.
  • HKDF-SHA256: Extract, Expand, complete derivation, reused PRK/context.
  • ChaCha20: block and in-place bulk; HChaCha20 subkey derivation.
  • Poly1305: tag and constant-time checking.
  • ChaCha20-Poly1305 and XChaCha20-Poly1305: seal/open, detached in-place.
  • X25519: public-key generation and shared secret, zero-output rejection.
  • DHKEM(X25519, HKDF-SHA256): encap/decap, cached recipient public key.
  • HPKE Base: setup sender/receiver, seal/open/export, established contexts.
  • ECDSA-secp256k1: key generation, sign, verify, SEC1 parsing/preparation.
  • Ed25519: key generation, sign, verify, explicit batch-validation policy.

Arithmetic and composition experiments

  • ECDSA ordinary, checked inverse hint, distinct inverse-encoded format.
  • Scalar batch inversion, safegcd versus existing inversion/addition chain.
  • Public projective final comparison, joint multiplication and GLV candidates.
  • Qualify Jacobian/window-eight/table candidates on fresh 100-signer calls.
  • Qualify wider-generator and Q-window challengers on the same incoming corpus.
  • Cached validated public keys and per-signer prepared tables.
  • Explicit 32/64-bit and Fiat/handwritten curve arithmetic controls.
  • X25519 batched final inversions with caller-owned scratch.
  • Fixed-generator precomputation: preparation, first use and reused use.
  • HPKE fresh-message versus session/exported independent-record protocol.
  • Allocation/in-place/workspace variants and bounded scratch reuse.
  • Exact-success verification cache, separately labeled repeated/distinct.

Alternative group

  • BIP340 Schnorr individual/direct/prepared verification.
  • BIP340 transcript-weighted batch implementation and native/vector checks.
  • Measure fresh 100-signer Pippenger against fresh individual verification.
  • Independent cryptographic review before treating experimental batching as production-ready.
  • Ed25519 batch verification with matching individual acceptance policy.
  • Explicit-R ECDSA experimental individual verification.
  • Classical explicit-R independent-weight batch construction and native checks.
  • IC qualification of explicit-R batching and failure fallback.
  • HSS-rand: resolve paper assumptions before promoting an implementation.
  • RSA-PSS-3072/e65537 verification, parse and prepared-key controls.
  • AES-128/256-GCM: key setup, seal/open and reused keys.
  • AES-128/256-GCM-SIV: key setup, seal/open and reused keys.
  • Final-standard Ascon-AEAD128 (not old Ascon v1.2).
  • BLAKE2s hash and keyed MAC, including short messages.
  • ML-KEM-512/768: keygen/encap/decap and encoded sizes.
  • FourQ research-only ECDH: explicit portability/security qualification.

Current workload priority

  • Fresh SEC1 parsing and checked hints measured for 100 different signers.
  • Full uncached Wire ingress: keys, signatures and hints in the same call.
  • Compare 33-byte compressed and 65-byte uncompressed SEC1 inputs.
  • Share temporary key preparation within that call; include its full cost.
  • Initial 100-operation IC screen and first optimization screen of all 383 cases.
  • Qualify fresh Wire Schnorr coordinate hints and live AEAD inputs.
  • Measure exact user-key32 derivation and qualify the standard BLAKE3 protocol.
  • Optimize BLAKE3 fixed secret32 + user-ID32 derivation and reduce its page fees. HKDF remains a compatibility primitive; further HKDF work is stopped.
  • Complete the remaining size, error-pattern and capacity sweeps.

Prior-call prepared keys and exact-batch reuse remain explicitly labeled controls. No verification-result cache contributes to the primary result.

SIMD128 qualification

These are algorithm implementations using existing IC Wasm SIMD128, not changes to the runtime. Native scalar-lane emulation establishes correctness separately from installed-Wasm instruction measurements. Compare matched controls in the same artifact; page fees remain included.

  • Standard ECDSA with checked inverse hints: fixed and dense four-record public equations; actual fresh 100-signer comparison.
  • BIP340: SIMD public Jacobian MSM, with unchanged transcript and complete individual fallback; actual fresh 100-signer comparison.
  • Ed25519: fixed/dense SIMD strict independent verification, matching the scalar acceptance policy; actual 100-signer comparison.
  • X25519: constant-time four-ladder implementation and native RFC/differential checks, shared fixed-schedule field arithmetic.
  • X25519: canonical Wasm execution, constant-time source/compiled review and actual 100-agreement comparison.
  • ML-KEM-512/768: qualify widening and Q15 SIMD NTT arithmetic on IC against scalar controls, preserving FIPS 203 implicit rejection.
  • LightSABER/SABER: integrate and qualify complete scalar/SIMD schoolbook, Karatsuba and Toom-Cook KEMs; retain official-vector/reference evidence.
  • Modified ECDSA HSS/NMVR: measure SIMD positive-equation research prototype; this does not resolve the separate construction/soundness questions.

Further LightSABER and X25519 optimization

Keep before/after evidence for complete 100-operation calls, including imports, workspace allocation and erasure. Preserve all encodings, randomness consumption, validation and implicit-rejection behavior.

  • LightSABER round 1: register-resident polynomial convolution, then measure complete keygen/encapsulation/decapsulation against the frozen baseline.
  • LightSABER round 2: fixed-width packing and CBD sampling; combine measured winners and rerun the complete operations.
  • LightSABER round 3: lazy SHAKE squeezing and widened SIMD interpolation; measure the combined result and retain improvements that survive full calls.
  • X25519: remove measured ladder copies and test fused field/state updates, preserving constant-time control flow and explicit secret-buffer erasure.

Further Schnorr optimization

  • Reduce SIMD carry conversions and point copies without changing field bounds.
  • Prepare the exact public GLV split directly and share fixed challenge prefixes.
  • Improve bucket scheduling, retaining all terms and full-width coefficients.
  • Qualify density-based affine-pair selection on fresh incoming batches; keep full individual fallback and record the actual error-path costs.
  • Check the combined artifact against ECDSA, Ed25519, X25519 and LightSABER controls. Keep rejected alternatives and intermediate results as evidence.

Best-pick optimization round

  • Screen public secp256k1 arithmetic and strict Ed25519 verification.
  • Reuse selected X25519 kernels in fresh DHKEM/HPKE compositions.
  • Screen BLAKE3 and authenticated-encryption computation and copying; retain the measured hash changes and restore the faster AEAD control.
  • Screen the selected ML-KEM and LightSABER/SABER implementations.
  • Measure matching before/after calls, review the combined winners and update the preferred choices; retain unsuccessful experiments separately.

Schnorr and X25519 round

  • Profile the current N100 calls with complete charge accounting.
  • Screen fewer-product field convolutions with closed limb/carry bounds.
  • Specialize X25519's fixed clamped bits without changing any input policy.
  • Reduce Schnorr bucket marshalling and repeated eligibility reads.
  • Qualify combined winners on fresh N100/N500 calls and dependent controls.

Next bulk-crypto round (R10)

  • Profile the selected R9 artifact and confirm current IC instruction pricing.
  • Screen bounded square, carry, scalar-mask and bucket-local candidates natively.
  • Measure the combined candidates and retain actual IC winners.
  • Review compiled secret paths and qualify fresh N100/N500/error controls.

Bidirectional interoperability and R11

  • Measure actual individual P/R-hinted Schnorr calls at N1 and N100.
  • Implement independent reference producers/checkers and bounded lab endpoints.
  • Run live bidirectional matrix on matched baseline and selected Wasm.
  • Optimize individual verification, aggregate preparation and X field paths.
  • Qualify actual before/after instructions and update preferred choices.

Independent Schnorr round (R12)

  • Profile current exact singles at N1 and N100.
  • Screen fresh Q preparation/recoding and independent SIMD equations.
  • Select actual whole-call wins with unchanged per-record validation.
  • Qualify separate-call means, full errors/interop and dependent controls.

Independent Schnorr round (R13)

  • Profile remaining scalar/SIMD costs and validate IC-specific assumptions.
  • Screen transposed accumulators, public scalar preparation and scalar windows.
  • Select measured full-call wins with every independent check preserved.
  • Qualify matched calls/errors/interop, document tradeoffs and commit.

Radix Schnorr certificate experiment

  • Implement b=8/16/32, t=128/160 certificates with canonical proof points, exact bounded coefficients and separate reconstruction/relation checks.
  • Validate native vectors, independent proof bytes, adversarial statements, identity encodings and maximal-scalar carry boundaries.
  • Complete the installed-Wasm 42-cell W2 through W8 sweep and matched query105-to-update100 qualification; retain whole/body/page and workspace receipts in the radix report.
  • Select four-column SIMD production as prove, retain prove_reference_columns as a scientific control and use scalar Horner reconstruction. Remove the slower streamed runtime candidate.
  • Verify an independently produced offchain packet on a fresh canister with zero prior queries and the same complete update cost; use no prior-call key, proof or verdict cache.
  • Complete independent cryptographic audit of the Fiat–Shamir composition, grinding/commitment assumptions and outer batch policy before production use. IC performance qualification does not close this security review.

Radix repeated-key and scheduling round

  • Qualify distinct keys, one key used ten times, ten groups of ten and an interleaved repeat cohort, preserving full messages/nonces and proof bytes.
  • Fold original radix digits and exact relation coefficients with checked wider bounds; retain the original transcript and all input checks.
  • Reuse fresh key tables only within bounded independent-check chunks.
  • Fix top-window scheduling from actual recoded magnitudes and compare arithmetic variants using complete calls.
  • Qualify exact SIMD checkpoint reconstruction, independent host proof bytes and zero-query fresh-canister updates; retain the smaller-proof choice.
  • Preserve matched before/after, rejected candidates and window selection in the second-round report.

Radix packed transport and coordinate round

  • Borrow fixed complete records from one bounded Wire byte buffer, preserving independent query filtering and fresh update validation.
  • Qualify inactive-lane reuse, longest-first bounded MSM scheduling and public XYZZ coordinates against matched controls.
  • Support partial top columns at b=8..32 without changing existing vectors, challenge widths, transcript domains or checked coefficient bounds.
  • Compare fixed configurations across nine independently seeded corpora; retain b16 after the smaller b20 proof lost its average update advantage.
  • Preserve native/vendor/host gates, independent proofs, fresh-canister updates, rejected candidates and function-level IC profiles in the third-round report.

Radix computation and copying round

  • Use exact bounded lazy coefficient carries and fitting byte recoding.
  • Update public XYZZ chain lanes in place; preserve masked and exceptional cases.
  • Batch fixed-message BIP340 challenge compression with unchanged bytes.
  • Reuse generated checkpoint columns within a call and preserve public decoding.
  • Compare fresh statements, producer costs, error paths and other signature controls; keep the losing field prescale as research rather than runtime code. See the fourth-round report.

Adversarial correctness and soundness checks

  • Add independent arithmetic differentials and targeted proof/encoding, statement-binding, scalar/field, mask, scratch and failure-reuse tests.
  • Exercise malicious producers and cancellation attacks directly against the installed Wasm, preserving strict rejection/recovery evidence.
  • Verify that new tests detect removal of either critical proof check.
  • Retain an independently reviewed finite-group model and conditional mathematical argument; keep full cryptographic audit open above. See security checks and the dated qualification.

Qualification matrix

  • Published vectors plus independent reference comparisons pass.
  • Lengths 32/128/512/2048 bytes and whole-block/boundary cases.
  • Batches 1/8/32/128/500, with per-case limit failures recorded honestly.
  • Valid, malformed, expensive invalid, mixed, repeated/distinct signers.
  • Counter/noop controls; every output observed and checked after timing.
  • Authoritative whole-call traces reconcile computation/API/page charges.
  • Report Wasm size, scratch/live/peak memory and exact source/binary pins.
  • Keep only measured winners as defaults; preserve rejected experiments.

Runtime changes to the shared SDK require matched RRT Heavy16 regression checks. Algorithm-local work must not silently change the SDK allocator or runtime.