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