# 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 - [ ] ``: `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:fuzz` runs pass native-vs-noble with zero mismatches. - [ ] Link to the 7-day nightly history: ## Gate 3 — Timing report - [ ] `crypto:timing` run for this primitive reports `constantTime: true` against 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.ts` and regenerating selects restores `noble` routing with zero other changes. - [ ] Legacy noble impl at `impl/.noble.ts` is untouched by this PR. ## Checklist - [ ] `bun scripts/gen-crypto-selects.ts` has been run and `.select.ts` has been updated to re-export from `./impl/.native.js`. - [ ] `bun scripts/check-crypto-selects.ts` is green. - [ ] `bun scripts/ct-lint.ts` is green. - [ ] `bunx turbo lint typecheck test` is green across every crypto-* package.