Repository navigation
Tags
Tags
fix(jwk): use ecdsa.ParseUncompressedPublicKey for EC key parsing Replace manual assignment of X and Y coordinates in `convertJWKToPublicKeyEC` with `ecdsa.ParseUncompressedPublicKey`. This addresses Go 1.26 deprecations of the `X` and `Y` fields and provides improved security by ensuring that parsed points are actually on the specified elliptic curve. The new implementation: - Rebuilds the SEC 1 uncompressed point (0x04 || X || Y). - Supports minimally encoded coordinates by left-padding them to the required curve width. - Rejects coordinates that are wider than the curve allows. - Rejects points that are not on the curve, preventing unpredictable behavior in downstream cryptographic operations. Added tests to verify off-curve point rejection and support for short coordinates. Updated CHANGELOG.md and book documentation.
feat(api): release v0.2.0 and fix blocklist concurrency issues This release addresses several critical defects and API inconsistencies identified during a full audit of the exported surface. Key changes include: - **Blocklist concurrency**: Replaced the exported `Clock` field with a `SetClock` method using `atomic.Pointer` to prevent data races with the background garbage collection goroutine. - **Blocklist lifecycle**: Added `Close` method to stop the background GC goroutine and prevent resource leaks. - **JWK coordinate handling**: Fixed an issue where EC JWKs could carry short `x` or `y` coordinates by reading from the SEC 1 uncompressed point to ensure proper padding. - **Algorithm naming**: Fixed `none` algorithm handling to use lowercase as required by RFC 7518, correcting previous non-conforming behavior. - **Documentation updates**: Updated the book, changelog, and references to reflect the transition to v0.2.0 and the corrected API surface. - **Tooling**: Added benchmark chart generation and updated CI to build benchmark assets.
PreviousNext