Subject: Re: [jose] Draft describing encrypting JWK key representations, with JWE

From: Mike Jones <[email-masked]>
Date: Fri, 15 Mar 2013 17:14:36 +0000

Thanks for the pointer to the NIST draft, Mike.

I agree that having PBKDF2 would give applications additional choices, as you suggest.

As background for those of you who weren't at the JOSE WG meeting, I took an action item there to produce a security analysis of the direct encryption mode.  (I intend to consult experts on Microsoft's crypto board, among others.  And CFRG input on that would obviously be great too!)  I suspect that the Security Considerations text arising from that will contain statements about appropriately limiting the number of times a shared symmetric key is used.  Single use is clearly fine.  Using a key forever certainly isn't in most contexts.

Are there references on appropriate limits on reuse of symmetric keys that experts on this thread could point me to, since the direct encryption topic came up?

                                                            Thanks all,
                                                            -- Mike

From: Peck, Michael A [mailto:[email-masked]]
Sent: Friday, March 15, 2013 9:59 AM
To: Richard Barnes; Mike Jones
Cc: Yaron Sheffer; [email-masked]; [email-masked]
Subject: RE: [jose] Draft describing encrypting JWK key representations, with JWE

+1

NIST Special Publication 800-132 provides recommendations for the parameters that the group may find useful.
http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf

It may also be worth thinking about using PBKDF2 instead of the "dir" (Direct Encryption with a Shared Symmetric Key) mechanism described in draft-ietf-jose-json-web-algorithms-08 section 4.6.  The shared symmetric key would be used as the PBKDF2 "password", and this would force a new key to be used for each encryption, rather than the current "dir" approach of using the same encryption key repeatedly.

Mike

From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]] On Behalf Of Richard Barnes
Sent: Friday, March 15, 2013 12:53 PM
To: Mike Jones
Cc: Yaron Sheffer; [email-masked]<mailto:[email-masked]>; [email-masked]<mailto:[email-masked]>
Subject: Re: [jose] Draft describing encrypting JWK key representations, with JWE

Do I count as an expert?  :)

As I understand it, PBDKF2 is completely fine for key protection.  PBKDF2 has mechanisms to mitigate the dictionary attack risks, e.g., having a high number of iterations. We might want to make some recommendations as to how you set those parameters. And the actual key wrapping is done with something like AES-KW, so that step is fine.

So I would be completely fine with adding this to JWE / JWA.  We should do this.

--Richard

On Fri, Mar 15, 2013 at 12:48 PM, Mike Jones <[email-masked]<mailto:[email-masked]>> wrote:
That's up to the working group.  I'm actually hoping that experts on the lists will respond to Yaron's comments before we make a decision on whether PBKDF2 as specified is an appropriate key wrapping algorithm or not.

Assuming that the content in Matt's draft eventually becomes an RFC or part of one, the PBKDF2 definition would end up in the algorithms registry either way, even if it's not part of the JWA spec itself.

                                                            Cheers,
                                                            -- Mike

From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]<mailto:[email-masked]>] On Behalf Of Richard Barnes
Sent: Friday, March 15, 2013 9:43 AM
To: Mike Jones
Cc: Yaron Sheffer; [email-masked]<mailto:[email-masked]>; [email-masked]<mailto:[email-masked]>
Subject: Re: [jose] Draft describing encrypting JWK key representations, with JWE

So, Mike, would you be OK with adding PBE to JWE / JWA, as a new key wrapping algorithm?

--Richard

On Fri, Mar 15, 2013 at 12:14 PM, Mike Jones <[email-masked]<mailto:[email-masked]>> wrote:
[Adding JOSE mailing list to the thread]

For clarification, PBKDF2 is not the only algorithm that could be used to wrap keys in this scheme.  This draft *adds* PBKDF2 to the set of algorithms already specified for use with encryption in the JSON Web Algorithms (JWA) specification (http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-08).  In particular, other algorithms such as AES Key Wrap and AES GCM are also present there.

I'll let others who are experts in PBKDF2 and password-based encryption respond to Yaron's specific comment.

                                -- Mike

-----Original Message-----
From: Yaron Sheffer [mailto:[email-masked]<mailto:[email-masked]>]
Sent: Friday, March 15, 2013 8:16 AM
To: [email-masked]<mailto:[email-masked]>; Mike Jones
Subject: Re: Draft describing encrypting JWK key representations, with JWE

Hi Mike,

I'm probably missing something, but I'm worried about the security of this scheme (though I do appreciate the usability/convenience of passwords).

PBKDF2 is meant to make dictionary attacks on stored passwords harder, as a second line defense, once the server has been breached. Using it to encrypt data and then sending the data on the wire, makes the data vulnerable to this same dictionary attack (in this case the effort comes to the space of all possible passwords - say 1 million - times 1000).
Moreover, this also puts the password itself in danger.

Thanks,
        Yaron

>
> ------------------------------
>
> Message: 5
> Date: Fri, 15 Mar 2013 14:10:32 +0000
> From: Mike Jones <[email-masked]<mailto:[email-masked]>>
> To: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
> Subject: [Cfrg] Draft describing encrypting JWK key representations
>       with JWE
> Message-ID:
>
> <[email-masked].
<mailto:[email-masked].%0b>> microsoft.com<http://microsoft.com>>
>
> Content-Type: text/plain; charset="us-ascii"
>
> http://tools.ietf.org/html/draft-miller-jose-jwe-protected-jwk-01
>
> This also adds password-based encryption to the algorithm registry.
>
>                                                              -- Mike
>
> -------------- next part -------------- An HTML attachment was
> scrubbed...
> URL:
> <http://www.irtf.org/mail-archive/web/cfrg/attachments/20130315/02e36b
> 24/attachment.htm>
>
> ------------------------------
>
> _______________________________________________
> Cfrg mailing list
> [email-masked]<mailto:[email-masked]>
> http://www.irtf.org/mailman/listinfo/cfrg
>
>
> End of Cfrg Digest, Vol 95, Issue 3
> ***********************************
>
_______________________________________________
jose mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/jose