ES256 not supported?
See original GitHub issueHey 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:
- Created 8 years ago
- Comments:9 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be good if the error suggested that the problem might be that “cryptography” is now needed instead of PyCrypto.
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 runningpip install cryptography
and you should be also set. (You also can safely uninstallecdsa
as well). Let me know if that doesn’t get you fixed up.