I am trying to implement JWE for my Rest API. I came across following NODE library that implements JWE. However the library lack the documentation around how JSON Web Key(JWK) should be used(JSON object) that help in Key Management Mode. The JWE documentation reads as follows:
A method of determining the Content Encryption Key value to use. Each algorithm used for determining the CEK value uses a specific Key Management Mode. Key Management Modes employed by this specification are Key Encryption, Key Wrapping, Direct Key Agreement, Key Agreement with Key Wrapping, and Direct Encryption.
So I want to know how I should feed the JWK to this library inorder to implement JWE ? I want to know how my JSON format will dictate the Key Managemnet Mode ? Can any one provide mi such JSON format for JWK and tell how that provide the Key Management Mode ?