- Encode EC coordinates and private d with curve-width (32/48/66 bytes) to satisfy RFC 7518,
preserving leading zero octets.
- Restrict JWK values to registered JOSE names: P-256, P-384, P-521, secp256k1.
Raise ValueError for unregistered curves (P-192, P-224, Brainpool).
- Add regression tests: deterministic coordinate/private-value widths, leading-zero
preservation, supported curve names, and rejection of unsupported curves.
- Mypy clean; all core and backend tests pass.
Replace the backtracking _PEM_BLOCK regex with a forward-only scanner
that indexes END markers by label, so repeated unterminated headers do
not cause the regex to rescan the remaining input.
Impact: 80 KiB payload went from 8.34 s to 0.001 s.