erdtman / Cleartext-JOSE

Cleartext JOSE, Drafts specifying how to make cleartext versions of the JOSE specifications RFC7515 RFC7516 using ES6 canonicalization rather than base64url encoding of JSON data structures.
0 stars 2 forks source link

Signing JSON Arrays #31

Open cyberphone opened 6 years ago

cyberphone commented 6 years ago

After "liberating" the Signature Object from the property dogma, I couldn't resist trying to sign arrays as well. It turned out to be easier than I had imagined. Here is an authentic printout that validates in my reference implementation:

["Hi there!",2003,{
  "alg": "ES256",
  "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "censDzcMEkgiePz6DXB7cDuwFemshAFR90UNVQFCg8Q",
    "y": "xq8rze6ewG0-eVcSF72J77gKiD0IHnzpwHaU7t6nVeY"
  },
  "val": "gOIohCbkhQOftFjqHgqRuRG1qqROSzwTiW8C7FUAQzojtqtpVoOz7BOYYNRQ7e09EfDlejz7jHumAvlAlQ6txw"
}]
erdtman commented 6 years ago

I like it, but usually having many ways to do the same thing mostly creates confusion :)

selfissued commented 6 years ago

I think this is something to bring up as a possibility in the working group - once we have one. I agree with @erdtman that having multiple ways to do something (which increases code size) can be more of a minus than a plus. I think that the -00 versions that we submit should be as single-purpose and streamlined as possible, to increase their chance of acceptance at all.