Re: [jose] JWK Thumbprint in JWS/JWE Header

Brian Campbell <bcampbell@pingidentity.com> Fri, 22 July 2016 05:47 UTC

Return-Path: <bcampbell@pingidentity.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4C3B712B04B for <jose@ietfa.amsl.com>; Thu, 21 Jul 2016 22:47:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x6ZvE4KLiJoa for <jose@ietfa.amsl.com>; Thu, 21 Jul 2016 22:47:15 -0700 (PDT)
Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0B09C12B03D for <jose@ietf.org>; Thu, 21 Jul 2016 22:47:14 -0700 (PDT)
Received: by mail-io0-x22e.google.com with SMTP id 38so96604433iol.0 for <jose@ietf.org>; Thu, 21 Jul 2016 22:47:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CzBzOaeTxupXFZP2mpd0eRfz0zanhJNJ5BAGA2VQU24=; b=FG3V9ROSFPGARV2gSfUd+Nm8sveFnwD4JNp7V3Vl9nf2aIEjv5MMk8jRhRrd62VO4T YWUjEy6TAtAofeWMJKglQvKpDw7R7rYn9QQgZ20Vi9+I4IOPCPQ6MWeDtbqbDMecgdTi ybiUrcgtEyYRMUu8pmiEIhbBAr5B4vT2MXtp4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CzBzOaeTxupXFZP2mpd0eRfz0zanhJNJ5BAGA2VQU24=; b=OJQQTy+SoEqCNsTF/AIMRWGvEZnMhf5p7yrCfebbyF52Warddda/MwE8O2ymO0IVpV N8tR5Br8sWk/FlHMh7wVJUgFeOX7E3wQ8CeimrYzXiEojgcSHvazEuegWDYKuwO5m/X8 gGAppQMyw3MNVgURG3BoZLQ3b8IcrU1XIpB0scA6sbi/qZ3pIZ5JD30VF50zGULMbwQo X292gE5tub8n9pmW5WkolW2FisAXAwmmWiv/D8upo0qIs7PKBgWhjFvOFvtzK/2OrmQ6 HDTlAUF0qbN+iAOF/Tl5YMYPieeS7y4p5IW97Ya8yzW8GJcHFdm+Yb9vxJRZzgg+5lgy 1ZCA==
X-Gm-Message-State: AEkoouvag0zV+ijjQWLbplGPMWoSHveYex1pfILMXDZrz3+78V6zehz2OnOu0UjETLUpiGPtx14rRaohVqF/L4ku
X-Received: by 10.107.50.19 with SMTP id y19mr2578102ioy.174.1469166434255; Thu, 21 Jul 2016 22:47:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.79.28.149 with HTTP; Thu, 21 Jul 2016 22:46:44 -0700 (PDT)
In-Reply-To: <1469120446.3182.50.camel@redhat.com>
References: <1468939736.8067.91.camel@redhat.com> <F817D984-D424-4335-BBC4-3CC88B1C8223@mit.edu> <1468944564.8067.95.camel@redhat.com> <1469120446.3182.50.camel@redhat.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Fri, 22 Jul 2016 07:46:44 +0200
Message-ID: <CA+k3eCRJxTb=PxSKUxkuqm9et_4FyB3DDrr6wRPFAzOrjahzEQ@mail.gmail.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Content-Type: multipart/alternative; boundary="001a114469c46e2627053832f7b1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/kT14C7Gtg0qWFh-9RS0OFw6vHnE>
Cc: "jose@ietf.org" <jose@ietf.org>, Justin Richer <jricher@mit.edu>
Subject: Re: [jose] JWK Thumbprint in JWS/JWE Header
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Jul 2016 05:47:17 -0000

There was more or less such a thing in an earlier draft (
https://tools.ietf.org/html/draft-ietf-jose-jwk-thumbprint-01#section-4) of
what would become RFC 7638: There was some disagreement about it that I
don't quite remember the details of and it was pulled out. I think what
Justin said did come up as justification for not needing something more
explicit. If a thumbprint is used as a kid, then the parties involved need
to know that and also know the hash alg. I realize that doesn't really
answer the question but is a little background/context.



On Thu, Jul 21, 2016 at 7:00 PM, Nathaniel McCallum <npmccallum@redhat.com>
wrote:

> Specifically, I'm thinking of the problem of validating a thumbprint.
>
> The RFC does not define a hash function. Nor does the output format
> contain a hash function name.
>
> So if I hand JWK to an entity, how does that entity validate that the
> thumbprint in the kid is actually a valid thumbprint and wasn't
> modified? I supose the entity could try all its supported hash
> functions; but that seems a little heavy handed.
>
> The existing kid could be used with contents like: <hash>.<thumbprint>
>
> Alternatively, RFC 7517 uses the x5t and x5t#S256 variants. This is
> precisely why I wondered about a thumbprint specific attribute.
> Something like thp and thp#S256 would make this explicit.
>
> Thoughts?
>
> On Tue, 2016-07-19 at 12:09 -0400, Nathaniel McCallum wrote:
> > Has there been any talk about using a prefix to specify the hash
> > algo?
> >
> > On Tue, 2016-07-19 at 11:24 -0400, Justin Richer wrote:
> > >
> > > This was discussed on the list a while ago, and the thought was
> > > that
> > > you could easily use the JWK thumbprint *as* the “kid” value
> > > instead
> > > of defining a new field for this use case. The header values are
> > > protected by the signature in the normal (compact) JWS/JWE formats,
> > > and ought to be protected in the JSON representations too for
> > > exactly
> > > the reasons you’re talking about.
> > >
> > >  — Justin
> > >
> > > >
> > > >
> > > > On Jul 19, 2016, at 10:48 AM, Nathaniel McCallum <npmccallum@redh
> > > > at
> > > > .com> wrote:
> > > >
> > > > The JWS and JWE specs defined the "kid" header value that can be
> > > > used
> > > > to identify the key used for signing or encryption. Subsequently,
> > > > the
> > > > JWK thumbprint method was defined.
> > > >
> > > > Has anyone put any thought into registering a header value for
> > > > JWS
> > > > and
> > > > JWE headers that indicates the thumbprint of the key used for
> > > > signing
> > > > or encryption? This would be very helpful for key indexes
> > > > especially
> > > > when using unprotected headers since the value of "kid" might be
> > > > modified.
> > > >
> > > > _______________________________________________
> > > > jose mailing list
> > > > jose@ietf.org
> > > > https://www.ietf.org/mailman/listinfo/jose
> > >
> >
> > _______________________________________________
> > jose mailing list
> > jose@ietf.org
> > https://www.ietf.org/mailman/listinfo/jose
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>