Re: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02

Hannes Tschofenig <Hannes.Tschofenig@arm.com> Tue, 26 June 2018 16:08 UTC

Return-Path: <Hannes.Tschofenig@arm.com>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3F225131059; Tue, 26 Jun 2018 09:08:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.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 i2ZUbTqLRuPm; Tue, 26 Jun 2018 09:08:50 -0700 (PDT)
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03on0601.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0a::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EDC75131053; Tue, 26 Jun 2018 09:08:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5ND6n+ci5YbkqNYfCwZizt1vqdZxh6DvLX8fYBsTEck=; b=OjmBWoOrLanvNdXcT9whVDjcYa9PjvVeuql0OWk0aAGFiLvlMNhoJZCi8qfMln8L8fo2uP6lawYigjWH3D99yrwimXOYuYYZckl59IR2yr09taLLWw3GHlj+e0wUujpe7q98DRYImjUg8JdJC1YqPvXZPaCq02c5Mkx/VpXQASg=
Received: from VI1PR0801MB2112.eurprd08.prod.outlook.com (10.173.75.16) by VI1PR0801MB1920.eurprd08.prod.outlook.com (10.173.73.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.20; Tue, 26 Jun 2018 16:08:45 +0000
Received: from VI1PR0801MB2112.eurprd08.prod.outlook.com ([fe80::3549:bcde:85fc:e3db]) by VI1PR0801MB2112.eurprd08.prod.outlook.com ([fe80::3549:bcde:85fc:e3db%9]) with mapi id 15.20.0884.024; Tue, 26 Jun 2018 16:08:45 +0000
From: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
To: Jim Schaad <ietf@augustcellars.com>, 'Benjamin Kaduk' <kaduk@mit.edu>, 'Mike Jones' <Michael.Jones@microsoft.com>
CC: "draft-ietf-ace-cwt-proof-of-possession@ietf.org" <draft-ietf-ace-cwt-proof-of-possession@ietf.org>, "ace@ietf.org" <ace@ietf.org>
Thread-Topic: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02
Thread-Index: AQHUCmm7VfkGifo3LEWkTqcB1vlZy6Rsv/OAgAGd44CAALQmgIADnybQ
Date: Tue, 26 Jun 2018 16:08:43 +0000
Message-ID: <VI1PR0801MB2112611C298A9E68AC9B2402FA490@VI1PR0801MB2112.eurprd08.prod.outlook.com>
References: <VI1PR0801MB2112C4D6D3CED7C15D9AE886FA750@VI1PR0801MB2112.eurprd08.prod.outlook.com> <20180622204344.GP64617@kduck.kaduk.org> <MW2PR00MB02986BC1E87754046C8CDC6AF5750@MW2PR00MB0298.namprd00.prod.outlook.com> <20180623212956.GE99689@kduck.kaduk.org> <027401d40b93$6b73b470$425b1d50$@augustcellars.com>
In-Reply-To: <027401d40b93$6b73b470$425b1d50$@augustcellars.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hannes.Tschofenig@arm.com;
x-originating-ip: [80.92.118.234]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0801MB1920; 7:E75Go6Mqb8R7TXJKbuF+70dH3cBR56duqytR6vGi97ohCw9G4L+QtE2q7Q++Wzc20bw+FP8K473PJ1GdTYZGHHj0VHDfZ0JeENU1H7MArfsJPI+B4v9fr3BBNlEg5/oXo40Xdk4HM1qOX5skr/BT7sFxxHm2aELZEH3yf3PTiZPCQQQXDnUPwgyS7YAWiCsZwNi6oNyGe1JzBOmeEA77Mk9uMEOxNlOvQDJAvxspz2z912wk7sSywtMl9FeG19dA
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 4573c565-4ac0-4ead-1662-08d5db7f17f3
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0801MB1920;
x-ms-traffictypediagnostic: VI1PR0801MB1920:
x-microsoft-antispam-prvs: <VI1PR0801MB1920296F025A3BD3CB7E4F67FA490@VI1PR0801MB1920.eurprd08.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(180628864354917)(89211679590171)(223705240517415)(240460790083961);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR0801MB1920; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1920;
x-forefront-prvs: 071518EF63
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(39860400002)(376002)(366004)(346002)(199004)(189003)(13464003)(40434004)(105586002)(97736004)(81166006)(81156014)(229853002)(99286004)(6436002)(2900100001)(66066001)(14454004)(54906003)(1511001)(93886005)(72206003)(106356001)(68736007)(316002)(86362001)(14444005)(256004)(110136005)(478600001)(8676002)(4326008)(7696005)(8936002)(74316002)(305945005)(5024004)(7736002)(5660300001)(26005)(33656002)(53936002)(25786009)(6116002)(186003)(5250100002)(11346002)(76176011)(486006)(446003)(102836004)(476003)(53546011)(6506007)(6246003)(2171002)(2906002)(3846002)(9686003)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1920; H:VI1PR0801MB2112.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: F4LqiMrhdD92j0Le834dTOiwAWdZepbqvx2RPuDPSZxHKuU1ivYrlcNgUau410c2XzVG5eva8iqlIf2UtZcUWblbEB82mBX2HGXBeA/kfxXMXMeKH+j8JyDdcITXt3iYqS7EHzFiHnt64XqwTWRIg2CBJcSoY6OznOMkq5tlrL8zYUAjyPU13AJdSzvEuJeKnQXlEY7fW4snADJjTF9FCHBkbUhlEnTUthGurxEFOAz+yhwe9J0gKVIlC/tNKI6gh/9C0fv52bWda+pAcxWfAdaDOIvwYgFOVaoK3f+FX2/fOYQPEgw4NdVIUmZwr2fwiPZ/C6lhefG+bZVzN+Q7Sd2zory2lJjJa+F9WkIczd4=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4573c565-4ac0-4ead-1662-08d5db7f17f3
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2018 16:08:43.6304 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1920
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/lDtQvc8QeymeOezd44BzmytaqRs>
Subject: Re: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jun 2018 16:08:53 -0000

Hi Jim,

you are essentially proposing that we should not directly use the key id that is in the CWT-PoP but rather use it as input in a key derivation function. The details of that key derivation function are specified outside the CWT-POP document and most likely in the context of the various profiles.
Your proposals below suggest to use, among other things, the session key as input to that function. That sounds pretty straight forward but raises the question why we fail to trust the implementer to create random key ids but then still trust them to create random keys.

That's fine for me nevertheless.

Ciao
Hannes

-----Original Message-----
From: Jim Schaad [mailto:ietf@augustcellars.com]
Sent: 24 June 2018 10:15
To: 'Benjamin Kaduk'; 'Mike Jones'
Cc: Hannes Tschofenig; draft-ietf-ace-cwt-proof-of-possession@ietf.org; ace@ietf.org
Subject: RE: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02

Thinking things through, I would be more comfortable with something like the
following:

1.  Create a confirmation called 'computed key id'.  This has two basic
values:  What is the computation method?  What is the proof value?  You can
optionally have an unprotected KID value used to filter the set of keys on
the RS down to a reasonable set to enumerate (hopefully one).

2.  For RPK and TLS:  Define a method called hash of SPKI which has a hash
method as a parameter.  Given that this can be computed independently by all
entities based on a Public Key value and it will be unique then you have a
key identifier that will not have collisions independent of who issues the
CWT.

3.  For PSK and TLS:  Define a method which takes some parameters including
the key value, the CWT issuer identity and perhaps some random string and
compute a proof of possession value on the PSK.

4.  For PSK and OSCORE: Define a similar method the question would be what
the key value is to be used but that can be defined as part of OSCORE

When using the keys for TLS

For RPK the key is carried in the handshake and the server/client can
generate the computed key id and compare it to what the AS distributed.  The
server can identify which CWTs are applicable by either comparison of the
RPKs or the computed key id.  This means you have a high probability that
you will not make a mistake and match to the wrong key.

For PSK the identifier is carried in the handshake which is used to look up
a key value and the handshake is performed.  By matching computed key ids
with the secret value one can ensure to a high probably that only CWTs that
reference the same secret are going to be used for permissions even if they
come from different AS entities.

For OSCORE it is similar, the identifier is used to look up a key value and
by decrypting the CWT the key value is proofed.  You then match computed key
ids in the same manner.

If you really want to have something that is not cryptographically computed
and point to something else, then it makes more sense to me to reference a
CWT issued by the same entity and say "use the same conformation method as
this CWT does".

jim

> -----Original Message-----
> From: Benjamin Kaduk <kaduk@mit.edu>
> Sent: Saturday, June 23, 2018 11:30 PM
> To: Mike Jones <Michael.Jones@microsoft.com>
> Cc: Hannes Tschofenig <Hannes.Tschofenig@arm.com>; Jim Schaad
> <ietf@augustcellars.com>; draft-ietf-ace-cwt-proof-of-possession@ietf.org;
> ace@ietf.org
> Subject: Re: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-
> possession-02
>
> On Fri, Jun 22, 2018 at 08:48:35PM +0000, Mike Jones wrote:
> > See my note just now proposing this text to Jim:
> >
> > "Likewise, if PoP keys are used for multiple different kinds of CWTs in
an
> application and the PoP keys are identified by Key IDs, care must be taken
to
> keep the keys for the different kinds of CWTs segregated so that an
attacker
> cannot cause the wrong PoP key to be used by using a valid Key ID for the
> wrong kind of CWT."
> >
> > As long as the PoP keys for different contexts are kept segregated, Key
ID
> collisions or reuse cause no problems.
>
> If we trust everyone to implement things properly.  We should probably
only
> take that risk if we get some other benefit from it, though.  Jim
mentioned
> (off-list?) a scenario involving giving the same client additional
privileges, and
> of course we can gain some simplicity savings if we don't need to enforce
> global key-id uniqueness (for appropriate values of "global").  So this
may
> well be the right thing to do; I just don't think it's without tradeoffs
as your
> text seems to imply.
>
> -Ben

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.