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

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

2 Answers 2


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? Feb 2, 2017 at 11:40
  • 1
    Anything you will, it's not the part of JWT scheme itself, hence the PKI remark.
    – pFarb
    Feb 9, 2017 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .