What is the message flow, or sequence that enables JWT encryption of the payload?

(opposed to OAuth / OpenIDConnect which doesn't encrypt the payload)


I downvoted your question due to the fact I believe it to be answered by the canonical resources on JWT, https://jwt.io/introduction/.

Happy to reverse that if I missed some aspect of your question, but I do think you just need to check that link - it seems to cover both your initial question and the follow up in comments


Short answer: RFC 7516

Longer answer:

  • it's sign then encrypt scheme
  • encryption is two-step:
    • encrypt the payload with random symmetric key
    • encrypt the key with RSA

Since it's public key crypto on the latter phase, you need some scheme of PKI to handle public key availability.

  • Do you mind expanding on how the public keys are exchanged? – goodguys_activate Feb 2 '17 at 11:40
  • 1
    Anything you will, it's not the part of JWT scheme itself, hence the PKI remark. – pFarb Feb 9 '17 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.