Maybe section 5 could have subsections like

5.1 Preparing Algorithm Parameters
determine the CEK, generate random values like IVs and epks
5.2  Building the jweHeaderSegment
 e.g put the IV randomly generated in 5.1 there
5.3 Building the jweKeySegment 
e.g. key wrapping
5.4 Building the jweCryptoSegment 
5.5 Building the jweIntegritySegment
5.6 Putting it all together
base64url encode and concatenate the segments

The subsections then could have list of steps or alternative lists of steps 
depending on header values

Axel

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mike 
Jones
Sent: Sunday, August 05, 2012 2:20 PM
To: Nennker, Axel; [email protected]
Subject: Re: [jose] order of step for encryption. JWE section 5

Thanks for the careful read, Axel.  I'll work to make the write-up of the steps 
clearer, using your input.  In particular, I'll look for ways to better 
structure the steps.  (Unfortunately, the xml2rfc tool doesn't do a 
particularly good job of structuring lists with sub-lists.)

Answering your point 2c, a random CMK is not used in this case.  Instead, the 
agreed-upon key is used directly to perform the encryption.  I also plan to add 
a key agreement example in the next draft.  I expect that this will help make 
this case clearer.

                                Thanks again,
                                -- Mike
 
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Saturday, August 04, 2012 11:55 PM
To: [email protected]
Subject: [jose] order of step for encryption. JWE section 5

Hi,

I have two issues with section 5 of
http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-05.html

1)
I would prefer it if the order of the steps 1 and 2 were reversed in section 5.

Currently we have:
Message Encryption


   The message encryption process is as follows.  The order of the steps
   is not significant in cases where there are no dependencies between
   the inputs and outputs of the steps.

   1.   When key agreement is employed, use the key agreement algorithm
        to compute the value of the agreed upon key.  When key agreement
        without key wrapping is employed, let the Content Master Key
        (CMK) be the agreed upon key.  When key agreement with key
        wrapping is employed, the agreed upon key will be used to wrap
        the CMK.

   2.   When key wrapping, key encryption, or key agreement with key
        wrapping are employed, generate a random Content Master Key
        (CMK).  See RFC 4086 [RFC4086] for considerations on generating
        random values.  The CMK MUST have a length equal to that of the
        larger of the required encryption and integrity keys.

Step 1 refers to the CMK that might be randomly created in step 2. I think it 
is better to have the CMK generation .

2) I find the text of the current step 1 confusing.
 2a) The first sentence is nearly a tautology
 2b) All sentences begin with When but the sentences two and three are 
alternative choices and the first is not.
 2c) Does "When key agreement without key wrapping is employed, let the Content 
Master Key
        (CMK) be the agreed upon key." make sense?
       What is the key agreement good for then?
       Should this read: "When key agreement without key wrapping is employed, 
let the agreed upon key be the CMK" ? There SHOULD be some randomness e.g. 
through the epk.

Could we structure these steps more? I) determine the CEK, generate random 
values like IVs and epks II) build the jweHeaderSegment (e.g.
put the IV there) III) build the jweKeySegment (e.g. key wrapping) IV) build 
the jweCryptoSegment V) build the jweIntegritySegment VI) base64url encode and 
concatenate the segments _______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose


_______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose
_______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose

Reply via email to