60 lines
2.0 KiB
Markdown
60 lines
2.0 KiB
Markdown
# 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
|
|
|
|
<!-- List each flipped primitive and its new flavour. -->
|
|
- [ ] `<primitive-id>`: `noble` → `native`
|
|
|
|
## Gate 1 — KAT (known-answer tests)
|
|
|
|
- [ ] All vectors pass on the new impl.
|
|
- [ ] Link to the KAT run:
|
|
<!-- paste CI link for `bunx turbo crypto:kat` -->
|
|
|
|
## 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:
|
|
<!-- paste CI dashboard link -->
|
|
|
|
## 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:
|
|
<!-- paste artifact link -->
|
|
|
|
## 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.
|
|
<!-- link to audit doc -->
|
|
|
|
## Rollback plan
|
|
|
|
- [ ] Reverting `crypto.config.ts` and regenerating selects restores `noble`
|
|
routing with zero other changes.
|
|
- [ ] Legacy noble impl at `impl/<id>.noble.ts` is untouched by this PR.
|
|
|
|
## Checklist
|
|
|
|
- [ ] `bun scripts/gen-crypto-selects.ts` has been run and `<id>.select.ts`
|
|
has been updated to re-export from `./impl/<id>.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.
|