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

Hannes Tschofenig <> Wed, 27 June 2018 07:32 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 824A6130E87; Wed, 27 Jun 2018 00:32:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.91
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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id I_NDT7VWAdZ7; Wed, 27 Jun 2018 00:32:12 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 2FD76130DFA; Wed, 27 Jun 2018 00:32:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l1LA7lBqGox+6+jsWehONH/I53nR2EMgMLEdez3dpro=; b=TkfBu7ucJz//2HVhYbmQBQ8uDcAjFON2pop91H5hirIV3mlAXeagB0TJ1yO6QGU6zUCGCVE2anPJJFBDCmvtYeSVx+kl3p7AYv50MYBmxutb8X7kD6mvHlOwDRfS/ZxJSIKMShqNmRtYryzUoBg8wiOAHgOL12xKX9ZAc9I2xgc=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.23; Wed, 27 Jun 2018 07:32:08 +0000
Received: from ([fe80::3549:bcde:85fc:e3db]) by ([fe80::3549:bcde:85fc:e3db%9]) with mapi id 15.20.0884.024; Wed, 27 Jun 2018 07:32:08 +0000
From: Hannes Tschofenig <>
To: Samuel Erdtman <>, Jim Schaad <>
CC: Benjamin Kaduk <>, Mike Jones <>, "" <>, "" <>
Thread-Topic: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02
Thread-Index: AQHUCmm7VfkGifo3LEWkTqcB1vlZy6Rsv/OAgAGd44CAALQmgIADnybQgAAXh4CAAN+nAIAAERaA
Date: Wed, 27 Jun 2018 07:32:08 +0000
Message-ID: <>
References: <> <> <> <> <027401d40b93$6b73b470$425b1d50$> <> <00e701d40d6e$c09b3db0$41d1b910$> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: []
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0801MB1677; 7:yIKdRPm92005tZ9EGb7Fgd6CD5e2C4yHCRx9bCJ5LdIs06I9WnQki5mowUWow4qdml+jgf7j1IejtchJrm8j22+/m6H+gMw5q8sHQLfVwPG4bBoIlvvJEq+DDCkym1tRRv2bU90CH1U2FmM21EDmCMhdHmpMiUOO7tSqn7qp220QUzVXAMSXB3Mk5QiVTDZAm4pQK+q2KK5vtIkaYab99SlYBiHXpAaRYf4MMZrnHGRVGAUrDjcRkJ+2FGAJYfT/
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 14141c77-ac73-423e-0b68-08d5dc0016e5
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:(223705240517415); BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0801MB1677;
x-ms-traffictypediagnostic: VI1PR0801MB1677:
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(180628864354917)(89211679590171)(192374486261705)(223705240517415)(263433327382760)(21748063052155)(240460790083961);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR0801MB1677; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1677;
x-forefront-prvs: 0716E70AB6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(376002)(346002)(39860400002)(199004)(189003)(13464003)(40434004)(54906003)(97736004)(55016002)(9686003)(68736007)(236005)(6506007)(76176011)(2900100001)(45080400002)(54896002)(102836004)(53546011)(72206003)(790700001)(105586002)(186003)(7696005)(5024004)(14444005)(3846002)(6116002)(5660300001)(86362001)(5250100002)(26005)(478600001)(110136005)(14454004)(33656002)(229853002)(53936002)(25786009)(81166006)(8936002)(8676002)(4326008)(6306002)(316002)(106356001)(256004)(11346002)(476003)(66066001)(446003)(81156014)(99286004)(93886005)(74316002)(486006)(7736002)(6246003)(2906002)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1677;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: 4APldCE0q3AFiiD4V+YUkl92i+TJu3lehWkMD/uwCuiYBB4XTLa0zZYn8/FcaDP+MKRSA5I9xKkVhpbC0iehCa8aD690CkPHdHdiKGd3ABpSBNlLISu5MERE4v6Mcwb0vtjbbHELI5US2/AtR1YBNoAa7bPftZH7BnDs8+cvukEAnQSpQUuee6Xol2FABjYpMS2SGAvU0fxIPXV+FRNuNuYE7FGGWEIDZ0g8jAg9ZwRLB7N8yJZheoko070uvvp5t2v1KEgkLuzlC2MIIKHVbyeFEp8nbf6chXQMOqYXvzH2a+Eco2FTUgbypiCNFYgs8+717y3M8RCAGeR27O6MHJii95Fz6SrBylNjzvru0UE=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_VI1PR0801MB2112509D0220E8DA6A8AEDC2FA480VI1PR0801MB2112_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 14141c77-ac73-423e-0b68-08d5dc0016e5
X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2018 07:32:08.3763 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1677
Archived-At: <>
Subject: Re: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 27 Jun 2018 07:32:17 -0000

Samuel, Jim,

We have two cases in ACE-OAuth:

1)      Client provides a key (or a reference to a key) to the AS. It wants the AS to include that key into the PoP token. The key is the long version of the key id*.

2)      Client asks the AS to get a token. In this case the AS creates a key and places that key or key id in the PoP token.

We seem to be worried that these keys / key ids are not unique over the lifetime of the tokens.
The ACE-OAuth document should say that the AS has to make sure that keys and key ids are not re-used over the lifetime of a PoP token, unless this is a desired behaviour.
I don’t think that the CWT PoP token is the right place to discuss this topic.


*: Here is what the draft says:

The proof-of-possession key can also be identified by the use of a
   Key ID instead of communicating the actual key, provided the
   recipient is able to obtain the identified key using the Key ID.

From: Samuel Erdtman []
Sent: 27 June 2018 08:18
To: Jim Schaad
Cc: Hannes Tschofenig; Benjamin Kaduk; Mike Jones;;
Subject: Re: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-possession-02

Jim, are you saying that if the client can pick the key identifier and if it has seen a key identifier of another client it could request a PoP token with the observed key-id and the observed subject but with an new key.
I guess this is a potential scenario that could be worth mentioning in security considerations.

If we look at ACE-OAuth there are as far as I can tell a few things that makes this a hard attack to do.

When the client makes the token request it is authenticated.

And with the subject being the authenticated client cannot control what goes into the cwt as subject

Since the cwt with the PoP key is signed there is no way for the attacking client to retro-fit the token to suit its needs e.g. change subject or key-id.

Finally I think it is preferable if the server selects key identifier.

Best regards

On Tue, 26 Jun 2018 at 18:57, Jim Schaad <<>> wrote:

My worry is not about implementers getting this correct and picking random
key ids.  My worry is about an attacker seeing the key id of somebody and
trying to use it either with the same or a different AS and getting a key
and then getting permissions associated with the initial key that they
should not be doing.

This is about an attack not about getting things to generally work right.


> -----Original Message-----
> From: Hannes Tschofenig <<>>
> Sent: Tuesday, June 26, 2018 6:09 PM
> To: Jim Schaad <<>>; 'Benjamin Kaduk'
> <<>>; 'Mike Jones' <<>>
> Cc:<>;<>
> Subject: RE: [Ace] Key IDs ... RE: WGLC on draft-ietf-ace-cwt-proof-of-
> possession-02
> Hi Jim,
> you are essentially proposing that we should not directly use the key id
> is in the CWT-PoP but rather use it as input in a key derivation function.
> 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
> 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 [<>]
> Sent: 24 June 2018 10:15
> To: 'Benjamin Kaduk'; 'Mike Jones'
> Cc: Hannes Tschofenig;<>;
> 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
> optionally have an unprotected KID value used to filter the set of keys on
> 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
> 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
> reference the same secret are going to be used for permissions even if
> 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
> 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 <<>>
> > Sent: Saturday, June 23, 2018 11:30 PM
> > To: Mike Jones <<>>
> > Cc: Hannes Tschofenig <<>>; Jim Schaad
> > <<>>;
> ><>;
> ><>
> > 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
> please notify the sender immediately and do not disclose the contents to
> other person, use it for any purpose, or store or copy the information in
> medium. Thank you.
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.