Subject: [Ace] Keeping the same key identifier for groups

From: Jim Schaad <[email-masked]>
Date: Mon, 19 Aug 2019 13:40:58 -0700

As Ludwig pointed out during the F2F, it makes far more sense to try and
keep an entity using the same key identifier for as long as possible.  This
is in part to make sure that signing keys do not need to be retrieved if
they can be easily cached.  In looking at this deeper during my
implementation I ended up with the following question:

The way that I have set things up in my implementation it is simple to
ensure that the same kid value is going to be used with the same CWT,
however it might make more sense to use the signing key as the continuity
identifier instead.  The issue that arises in this case is that there might
be two different active CWT objects that are associated with the same
signing key.  That is there are two CWTs but the same signing key was used
while doing a join operation.   I already do some matching between different
CWTs by assuming that if the bearer key in the CWT is the same then they are
sufficiently equivalent to threat them as the same.  This lead to some
interesting discussions in Montreal about if this meant just the "secret" or
if it meant all of the elements provided by the AS which are used in the key
derivation process.  (I have gone back and forth on this and currently am
sitting on the "just the secret" side of the fence.)

Does anyone have any opinions?

Jim

---

From: Ludwig Seitz <[email-masked]>
Date: Tue, 20 Aug 2019 11:09:16 +0200

> Does anyone have any opinions?
Could you please expand the explanation of your use case a bit?

Are you thinking of a scenario where someone would be using the 
counter-signature key from group-OSCORE as a proof-of-possession (pop) 
key in serveral CWTs?

What would these CWT authorize?

Why would an entity hold several CWTs for the same audience?

Side-note:
My stance on multiple CWTs linked to the same pop-key and for the same 
audience is that the latter one should supersede the previous ones.
Example: If you have a CWT authorizing A for audience Z and you now also 
need authorization B for audience Z, you should request a CWT for A+B 
for audience Z, that replaces your previous one.

/Ludwig

-- 
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51

---

From: Peter van der Stok <[email-masked]>
Date: Tue, 20 Aug 2019 11:18:37 +0200

Do I understand?
two possibilities:
A and B are members of audience Z; no new CWT needed
B is a new member of audience Z; then audience Z becomes audience
Z-prime and a new CWT seems reasonable.

Peter

Ludwig Seitz schreef op 2019-08-20 11:09:

> Are you thinking of a scenario where someone would be using the counter-signature key from group-OSCORE as a proof-of-possession (pop) key in serveral CWTs?
> 
> My stance on multiple CWTs linked to the same pop-key and for the same audience is that the latter one should supersede the previous ones.
> Example: If you have a CWT authorizing A for audience Z and you now also need authorization B for audience Z, you should request a CWT for A+B for audience Z, that replaces your previous one.
> 
> /Ludwig
> 
> _______________________________________________
> Ace mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ace

---

From: Ludwig Seitz <[email-masked]>
Date: Tue, 20 Aug 2019 12:53:00 +0200

> Z-prime and a new CWT seems reasonable.

No Peter,

sorry for being unclear. In my example A and B were permissions. Let me 
clarify:

You have a CWT authorizing to "read" (that's my A) traffic in group Z, 
now you also want authorization to "write" messages to group Z (that's 
my B). What I'm saying is you should get a new CWT that says "read+write 
on Z" (and not a separate one that says "write on Z" to combine with the 
first one "read on Z").

/Ludwig

-- 
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51

---

From: Jim Schaad <[email-masked]>
Date: Tue, 20 Aug 2019 10:53:58 -0700

-----Original Message-----
From: Ace <[email-masked]> On Behalf Of Ludwig Seitz
Sent: Tuesday, August 20, 2019 2:09 AM
To: [email-masked]
Subject: Re: [Ace] Keeping the same key identifier for groups

On 19/08/2019 22:40, Jim Schaad wrote:
> As Ludwig pointed out during the F2F, it makes far more sense to try 
> and keep an entity using the same key identifier for as long as 
> possible.  This is in part to make sure that signing keys do not need 
> to be retrieved if they can be easily cached.  In looking at this 
> deeper during my implementation I ended up with the following question:
> 
> however it might make more sense to use the signing key as the 
> continuity identifier instead.  The issue that arises in this case is 
> that there might be two different active CWT objects that are 
> associated with the same signing key.  That is there are two CWTs but the same signing key was used
> CWTs by assuming that if the bearer key in the CWT is the same then 
> they are sufficiently equivalent to threat them as the same.  This 
> lead to some interesting discussions in Montreal about if this meant 
> just the "secret" or if it meant all of the elements provided by the 
> AS which are used in the key derivation process.  (I have gone back 
> and forth on this and currently am sitting on the "just the secret" 
> side of the fence.)
> 

[JLS]  Trying to get a bit more detailed on the situations that I am thinking about.   At the moment I am working on group key manager code so both of these are going to be couched in those terms and not in general terms.

I have a CWT that says group X is fine for this entity.  The CWT expires or is going to expire soon.  The AS does not use the same pop-key in a newly issued CWT.  The CWT is posted to the Group KDC and the entity performs a join under that new CWT, but with the same signing key for group messaging.   Should this operation preserve the group kid assigned to that entity based on the signing key or should it be a new group kid based on the new CWT pop key.  That is Entity E1 using CWT1 and public key S1 received a GK-kid value for group G1.  E1 then posts CWT2, with a different pop-key, does a join request for G1 using the new pop-key and S1.  Does the AS return GK-kid or GK-kid2?

This can happen in any number of different situations:  Adding or removing group Y from the token, token renewal, reboot of somebody so state is lost, key exhaustion or merely a requirement from the AS that symmetric pop keys be rotated based on duration.

Side-note:

[JLS]  I agree that this is the preferred way for these things to happen, that is either the request says use the same pop-key or the AS just uses the same pop-key because it knows that a similar CWT exists already.  However there are reasons why that cannot be done.  Easy example, my AS does not currently have any memory so it can never issue a new CWT with the same symmetric pop-key.  It can do it with the same asymmetric pop key.

jim

[JLS]  

/Ludwig

--
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51

---

From: Marco Tiloca <[email-masked]>
Date: Wed, 21 Aug 2019 08:53:43 +0200

Hi Jim, all,

I believe that the KDC should re-assign the same kid (OSCORE Sender ID) to the joining node, also upon its second join enabled by a CWT conveying a different PoP key than the first one.

This spares other group members from (re-)retrieving the same public key again, and to derive a new corresponding recipient context for the rejoined node (unless the KDC also performs a full group rekeying upon the node's joining).

Note that a group member configured only as "monitor" in Group OSCORE would not provide any public key to the KDC as paired to a signing key for group messages, since it never produces outgoing messages to sign as per its single role in the group. In this case, there may be no public key to use as a constant identifier across consequent joinings of a same node to the same group.

Best,
/Marco

On August 20, 2019 7:53:58 PM GMT+02:00, Jim Schaad <[email-masked]> wrote:
>[JLS]  Trying to get a bit more detailed on the situations that I am
>thinking about.   At the moment I am working on group key manager code
>so both of these are going to be couched in those terms and not in
>general terms.
>
>I have a CWT that says group X is fine for this entity.  The CWT
>expires or is going to expire soon.  The AS does not use the same
>pop-key in a newly issued CWT.  The CWT is posted to the Group KDC and
>the entity performs a join under that new CWT, but with the same
>signing key for group messaging.   Should this operation preserve the
>group kid assigned to that entity based on the signing key or should it
>be a new group kid based on the new CWT pop key.  That is Entity E1
>using CWT1 and public key S1 received a GK-kid value for group G1.  E1
>then posts CWT2, with a different pop-key, does a join request for G1
>using the new pop-key and S1.  Does the AS return GK-kid or GK-kid2?
>
>This can happen in any number of different situations:  Adding or
>removing group Y from the token, token renewal, reboot of somebody so
>state is lost, key exhaustion or merely a requirement from the AS that
>symmetric pop keys be rotated based on duration.
>
>
>
>Side-note:
>Example: If you have a CWT authorizing A for audience Z and you now
>also need authorization B for audience Z, you should request a CWT for
>A+B for audience Z, that replaces your previous one.
>
>[JLS]  I agree that this is the preferred way for these things to
>happen, that is either the request says use the same pop-key or the AS
>just uses the same pop-key because it knows that a similar CWT exists
>already.  However there are reasons why that cannot be done.  Easy
>example, my AS does not currently have any memory so it can never issue
>a new CWT with the same symmetric pop-key.  It can do it with the same
>asymmetric pop key.
>
>
>jim
>
>[JLS]  
>
>/Ludwig
>
>
>
>
>--
>Ludwig Seitz, PhD
>Security Lab, RISE
>Phone +46(0)70-349 92 51
>
>

-- 
Marco Tiloca
Ph.D., Senior Researcher

RISE Research Institutes of Sweden
Division ICT
Isafjordsgatan 22 / Kistagången 16
SE-164 40 Kista (Sweden)

Phone: +46 (0)70 60 46 501
https://www.ri.se

---

From: Jim Schaad <[email-masked]>
Date: Wed, 21 Aug 2019 07:37:12 -0700

Marco,

I was not planning to give a kid to a “monitor” entity.  Since they are not supposed to be sending any messages, they don’t need anything to identify the messages they are not sending and thus don’t need a key id.

Jim

From: Marco Tiloca <[email-masked]> 
Sent: Tuesday, August 20, 2019 11:54 PM
To: Jim Schaad <[email-masked]>; 'Ludwig Seitz' <[email-masked]>; [email-masked]
Subject: Re: [Ace] Keeping the same key identifier for groups

Hi Jim, all,

Best,
/Marco

On August 20, 2019 7:53:58 PM GMT+02:00, Jim Schaad <[email-masked] <mailto:[email-masked]> > wrote:

-----Original Message-----
From: Ace <[email-masked] <mailto:[email-masked]> > On Behalf Of Ludwig Seitz
Sent: Tuesday, August 20, 2019 2:09 AM
To: [email-masked] <mailto:[email-masked]> 
Subject: Re: [Ace] Keeping the same key identifier for groups

Side-note:

jim

[JLS]  

/Ludwig

--
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51

  _____  

Ace mailing list
[email-masked] <mailto:[email-masked]> 
https://www.ietf.org/mailman/listinfo/ace

-- 
Marco Tiloca
Ph.D., Senior Researcher