question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ES256 not supported?

See original GitHub issue

Hey guys!

For some reason I’m no longer able to get ES256 to work, but it was working for me earlier.

Here’s the code:

import jwt, ecdsa

signing_pem = ecdsa.SigningKey.generate().to_pem()
payload = {"some": "example"}
signed_token = jwt.encode(payload, signing_pem, algorithm='ES256')

And it yields the following error:

raise NotImplementedError(‘Algorithm not supported’)

(for reference, I have version 1.1.0 installed)

Was support for ES256 discontinued? Am I doing something wrong?

Thanks!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
dukedougalcommented, Feb 17, 2016

It would be good if the error suggested that the problem might be that “cryptography” is now needed instead of PyCrypto.

3reactions
mark-adamscommented, Apr 24, 2015

Previously, PyCrypto was required for RSA and ecdsa was required for EC algorithms. Back in December, we switched to using cryptography instead of those libraries because it provided both sets of algorithms (RSA and EC) in a single library and also had better performance.

Please make sure you have installed cryptography by running pip install cryptography and you should be also set. (You also can safely uninstall ecdsa as well). Let me know if that doesn’t get you fixed up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decoding jwt token with PyJWT in python giving error ...
Decoding jwt token with PyJWT in python giving error Algorithm not supported · 1. Old version of PyJWT ? cryptography not installed? ·...
Read more >
API Reference — PyJWT 2.6.0 documentation - Read the Docs
algorithm (str) – algorithm to sign the token with, e.g. "ES256" . ... Do not compute the algorithms parameter based on the alg...
Read more >
sign in with apple - (ES256 using … | Apple Developer Forums
Apple Push Service succeeded using the same OpenSSL, but it doesn't seem to be available for Sign in with Apple yet. The best...
Read more >
Key types, algorithms, and operations - Azure Key Vault
Key Vault supports two resource types: vaults and managed HSMs. ... ES256 - ECDSA for SHA-256 digests and keys created with curve P-256....
Read more >
How to select a JOSE / JWT cryptographic algorithm for your ...
Objective: Verify data has not been tampered with ... 198 and 256), JOSE supports two modes for content encryption: AxxxCBC-HSxxx and AxxxGCM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found