babelouest / rhonabwy

Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
https://babelouest.github.io/rhonabwy/
GNU Lesser General Public License v2.1
45 stars 21 forks source link

Bugfix/siva.cbces - Fixup the K for AxxxCBC + ECDH-ES based JWEs #30

Closed ksivask closed 1 year ago

ksivask commented 1 year ago
  1. fix the K - Please refer https://github.com/babelouest/rhonabwy/issues/28 for full details

  2. display nested jwt header (for jwe)

    {
    "alg": "ECDH-ES",
    "cty": "JWT",
    "enc": "A192CBC-HS384",
    "epk": {
    "crv": "P-256",
    "kty": "EC",
    "x": "UcL8hgW6OTkqFvKS-XEiO-zwQqdqdj8myxOkVJ9f_n8",
    "y": "yDaZ0U9XD6oGzkXRnFJVWenF8sthhcTBIzSdntLMxfU"
    },
    "kid": "ExUMY91J9atex-1Ai5vbu6qJ4aAGq0RMQxo__QyZV4k",
    "typ": "JWT"
    }
    {
    "alg": "ES512",
    "kid": "HSnBqAC6TJsmCntBQrgp_BpCWZSoxygedxeE7b2SBrA",
    "typ": "JWT"
    }
    {
    "iat": 1516239022,
    "name": "JohnDoe",
    "sub": "jdoe@example.com"
    }
babelouest commented 1 year ago

Thanks for this!

I'll make some further reviews in a couple of days.

I've seen some code style stuff and a question concerning the for loop but I do appreciate your contribution!

babelouest commented 1 year ago

Thanks a lot for the bugfix @ksivask !