Subject: [jose] JWS in-object JS-signature sample

From: Anders Rundgren <[email-masked]>
Date: Mon, 9 Nov 2015 16:43:32 +0100

A two-minute patch in my JSON package generated the following:

var reading =
{
   device: "Pump2",
   value: 13000,
   jws:
     {
       alg: "ES256",
       jwk:
         {
           kty: "EC",
           crv: "P-256",
           x: "8dymopMICY76wfnqdpX0JDpCRYke0-Jp1p7lKPQIIRg",
           y: "MfJhj722qkWnNiljFqRrVj8WStZVKoYQikmi5GopZwQ"
         },
       signature: "gkL_ktVEqnD8uQ5EnXKiasMx0xX6WjuTgMgUopPbYBIJTQmSAPSiHKQPNFKvAnfgVaBBCD1oXaygiuyq39iJLg"
     }
};

which reuses quite a bit of the JOSE vocabulary and is 100% algorithm compatible.

I'm personally in favor of rather using "signature" as place-holder but it certainly isn't a big deal.

Anders