Files
2026-05-27 23:29:53 +01:00

2.0 KiB

Tasks — @suaveplan/crypto-curve — add P-384 + P-521

1. P-384 primitive

  • 1.1 src/primitives/p384/p384.ts (re-export barrel)
  • 1.2 src/primitives/p384/p384.select/p384.select.ts (generated forwarder)
  • 1.3 src/primitives/p384/impl/p384.noble/p384.noble.ts (noble-backed impl)
  • 1.4 src/primitives/p384/impl/p384.native/p384.native.ts (PrimitiveNotImplemented stubs)
  • 1.5 src/primitives/p384/p384.test.ts (noble round-trip + native stub coverage)
  • 1.6 Sibling .md for every .ts (≥200 words)

2. P-521 primitive

  • 2.1 src/primitives/p521/p521.ts
  • 2.2 src/primitives/p521/p521.select/p521.select.ts
  • 2.3 src/primitives/p521/impl/p521.noble/p521.noble.ts
  • 2.4 src/primitives/p521/impl/p521.native/p521.native.ts
  • 2.5 src/primitives/p521/p521.test.ts
  • 2.6 Sibling .md for every .ts

3. Barrel + exports

  • 3.1 src/index.ts — add export * as p384 / export * as p521
  • 3.2 package.json — add ./p384 and ./p521 subpath exports
  • 3.3 vite.config.ts — add new entry points

4. cbor wiring

  • 4.1 cose/sign1.ts — replace ES384/ES512 placeholder throws with real p384 / p521 verify paths
  • 4.2 cose/sign1.ts — generalise ec2ToCompressedPoint to accept coordinate length (32 / 48 / 66)
  • 4.3 cose/sign1.test.ts — replace not-implemented test with ES384 + ES512 end-to-end round-trips
  • 4.4 vite.config.ts — add @suaveplan/crypto-curve/p384 and /p521 to externals

5. Pre-archive verification

  • 5.1 bunx turbo lint typecheck test:coverage build --filter=@suaveplan/crypto-curve — green
  • 5.2 bunx turbo lint typecheck test:coverage build --filter=@suaveplan/cbor — green
  • 5.3 Coverage 100/100/100/100 on both packages
  • 5.4 681 cbor tests pass

6. Archive

  • 6.1 Fold spec delta into openspec/specs/crypto-curve/spec.md
  • 6.2 Move openspec/changes/crypto-curve-p384-p521/ → openspec/archive/2026-05-10-crypto-curve-p384-p521/