2.0 KiB
2.0 KiB
Flip primitive to native
This PR changes one or more crypto.config.ts entries from 'noble' to
'native'. Landing a flip permanently swaps the repo's routing for the
primitive — every consumer picks up the in-house implementation on the
next build.
Do not merge this PR without every box checked. Dangerous-tier primitives (curves, AEADs, argon2id) additionally require a linked audit document.
Primitive(s) affected
<primitive-id>:noble→native
Gate 1 — KAT (known-answer tests)
- All vectors pass on the new impl.
- Link to the KAT run:
Gate 2 — Differential fuzz history
- At least 7 consecutive nightly
crypto:fuzzruns pass native-vs-noble with zero mismatches. - Link to the 7-day nightly history:
Gate 3 — Timing report
crypto:timingrun for this primitive reportsconstantTime: trueagainst the default threshold (t < 4.5).- Link to the timing report:
Audit document (dangerous tier only)
Required for: secp256k1, ed25519, x25519, p256, aes-256-gcm,
chacha20-poly1305, xchacha20-poly1305, argon2id.
- N/A — primitive is not dangerous tier.
- Audit document linked below. Include: reviewer name, scope, findings, sign-off date.
Rollback plan
- Reverting
crypto.config.tsand regenerating selects restoresnoblerouting with zero other changes. - Legacy noble impl at
impl/<id>.noble.tsis untouched by this PR.
Checklist
bun scripts/gen-crypto-selects.tshas been run and<id>.select.tshas been updated to re-export from./impl/<id>.native.js.bun scripts/check-crypto-selects.tsis green.bun scripts/ct-lint.tsis green.bunx turbo lint typecheck testis green across every crypto-* package.