Re: [jose] How would x5u really be used with JWE?

Richard Barnes <> Fri, 25 January 2013 16:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6128121F8946 for <>; Fri, 25 Jan 2013 08:36:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -106.599
X-Spam-Status: No, score=-106.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id FeLYCchNbkrJ for <>; Fri, 25 Jan 2013 08:36:15 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id DCDE421F8940 for <>; Fri, 25 Jan 2013 08:36:14 -0800 (PST)
Received: from ([]:59704) by with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from <>) id 1TymGE-000Oe2-4T; Fri, 25 Jan 2013 11:36:14 -0500
Content-Type: text/plain; charset="iso-8859-1"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Richard Barnes <>
In-Reply-To: <>
Date: Fri, 25 Jan 2013 11:36:13 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <>
To: Brian Campbell <>
X-Mailer: Apple Mail (2.1499)
Cc: "" <>
Subject: Re: [jose] How would x5u really be used with JWE?
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 25 Jan 2013 16:36:15 -0000

AFAICT, the X.509 fields in JWE are pretty useless.

If you're using key transport (i.e., wrapping the symmetric key in a public key), then you would use the "jwk" or "jku" fields to reference the key pair you used to do the wrapping.  The only function of the public key crypto fields in a JWE is to let the recipient know which private key to use for decryption.  The recipient already needs to have the private key, since it obviously won't be in the message.

The question of how the encrypting party figures out which public key to use for a given recipient (and in particular, roll-over), is an application-layer question, not something that JWE would address.  See the XMPP end-to-end security doc for an example; they use a separate exchange to associate a JWK with an XMPP ID.


On Jan 22, 2013, at 1:10 PM, Brian Campbell <> wrote:

> Is there a concrete use case for this that someone could explain to me?
> How does an encrypting party know what URL to use to get the key to encrypt? I assume some out-of-band exchange. How would key rolling work then? An an encrypting party would need to a priori know all potential x5u's of the decrypting party? Which seems dubious. And how would the decrypting party signal a desired change of keys?  
> Am I missing something obvious here?  
> _______________________________________________
> jose mailing list