Skip to content

Add ES256K algorithm #391

Open
Open

Description

@daniel-mader

Are you planning to add more ECDSA algorithms such as ES256K (curve secp256k1)? I looked into ring which currently only seems to support ES256 and ES384. Seems like RustCrypto/elliptic-curves would support it, but I reckon that you would not consider adding the additional k256 crate at this point.

Activity

  1. Keats commented on Jun 5, 2024

    @Keats
    Owner

    Not for now, there are a few PRs to change the backend already:

    1. Add feature based on aws-lc-rs cryptographic library instead of ring #377
    2. remove ring #318
  2. ThisIsMissEm commented on Nov 9, 2025

    @ThisIsMissEm

    @Keats is there any updates on this? looks like both PRs mentioned above are either merged or closed?

    I'd love to get this implemented as it makes using the jwt-cli to debug the Bluesky / AT Protocol access tokens possible. (they use ES256K)

  3. ThisIsMissEm commented on Nov 9, 2025

    @ThisIsMissEm

    Actually, I think I might even be able to do a PR to implement this, using the RustCrypto implementation of k265

    The majority of the code looks like it'd actually be in the tests.

  4. Keats commented on Nov 9, 2025

    @Keats
    Owner

    It should be fine to add yes

  5. ThisIsMissEm commented on Nov 9, 2025

    @ThisIsMissEm

    Okay, well, I tried but I'm probably too inexperienced to get this right: https://github.com/Keats/jsonwebtoken/compare/master...ThisIsMissEm:jsonwebtoken-rs:feat/implement-secp256k1-ES256K?expand=1

    There's currently an error in the test to do with the private key being in an invalid format, this was a key that was exported from Node.js via the @atproto/crypto package, and the public key is the public key exported as jwk.

    Maybe it's a starting point for someone else though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions