-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
Description
I notice that when generating a token using RS256 and a private key, I can verify that token with either the corresponding public key or the private key.
If I try to generate a token using RS256 and a public key, I get this error (which makes sense):
OpenSSL::PKey::ECError: Private EC key needed!
I want to be certain that either no one can possibly generate a token with RS256 and my public key, or that if they did it would fail verification. Is there a way someone could generate a token using RS256 with my public key? If they can, is there a way I can test that my code + JWT would refuse to verify it?
Thanks, and thank you for this very useful gem.