Add ES256K support
Unfortunately it doesn't seem like RFC 8812 provides any "worked" examples, unlike some of the other RFCs. This roundtrips successfully with the implementation I recently added to github.com/lestrrat-go/jwx.
There's also a libsecp256k1 library from the bitcoin project (https://github.com/bitcoin-core/secp256k1). However it doesn't seem to have a stable release, and it's unclear that the extra dependency would be worth it over openssl for this usage.
If this is accepted, I'd be happy to add EdDSA and x25519/x448 curve support.
Hello @imirkin. Could you please try to rebase master branch to this one? This would allow to retrieve changes with the newest CI strategy (based on Github action), so that it could be checked if checks pass on your PR?
Codecov Report
Merging #90 (63d28ab) into master (4248b93) will decrease coverage by
1.16%. The diff coverage is94.11%.
:exclamation: Current head 63d28ab differs from pull request most recent head c43d553. Consider uploading reports for the commit c43d553 to get more accurate results
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
- Coverage 77.58% 76.41% -1.17%
==========================================
Files 60 57 -3
Lines 5648 5322 -326
==========================================
- Hits 4382 4067 -315
+ Misses 1266 1255 -11
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/openssl/ecdsa.c | 80.89% <91.66%> (-0.69%) |
:arrow_down: |
| lib/openssl/ec.c | 80.64% <100.00%> (ø) |
|
| lib/openssl/jwk.c | 69.10% <100.00%> (-1.10%) |
:arrow_down: |
| cmd/jws/jws.h | 76.47% <0.00%> (-11.41%) |
:arrow_down: |
| tests/api_jwe.c | 92.85% <0.00%> (-3.92%) |
:arrow_down: |
| cmd/jwe/enc.c | 41.42% <0.00%> (-2.41%) |
:arrow_down: |
| cmd/jws/sig.c | 65.85% <0.00%> (-2.33%) |
:arrow_down: |
| cmd/jwe/dec.c | 51.85% <0.00%> (-2.27%) |
:arrow_down: |
| lib/openssl/ecmr.c | 75.43% <0.00%> (-1.62%) |
:arrow_down: |
| lib/cfg.c | 39.47% <0.00%> (-1.56%) |
:arrow_down: |
| ... and 37 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a091f56...c43d553. Read the comment docs.
@sergio-correia : In my opinion, this looks good. Please, provide your feedback when possible
Looks good to me, thanks.