Subject: [Pana] pana-pana Issue223: Cookie issue

From: Yoshihiro Ohba <[email-masked]>
Date: Tue, 27 Dec 2005 11:56:24 -0500

> In order to do that,
>   the cookie MUST be computed in such a way that it does not require
>   any per-session state maintenance on the PAA in order to verify the
>   cookie returned in the PANA-Start-Answer message.  The PAA discovery
>   that takes advantage of cookies is called "stateless PAA discovery".
>   The exact algorithms and syntax used by the PAA to generate cookies
>   does not affect interoperability and hence is not specified here.
An
>   example algorithm is described below.
>
>      Cookie =
>        <secret-version> | HMAC_SHA1( <Device-Id of PaC> , <secret> )
>
>   where <secret> is a randomly generated secret known only to the PAA,
>   <secret-version> is an index used for choosing the secret for
>   generating the cookie and '|' indicates concatenation.  The secret-
>   version should be changed frequently enough to prevent replay
>   attacks.  The secret key is valid for a certain time frame.  The
>   device identifier of the PaC can be extracted from a link-layer or
IP
>   header of PANA messages.
Why even suggest this? You may simply point to RFC4086 for ways to 
obtain a cryptographically random number.

>
>   When the PaC sends a PANA-Start-Answer message in response to a
PANA-
>   Start-Request containing a Cookie AVP, the answer MUST contain a
>   Cookie AVP with the cookie value copied from the request.
>
>  
>

>   When the PAA receives the PANA-Start-Answer message from the PaC, it
>   verifies the cookie.  The cookie is considered as valid if the
>   received cookie has the expected value.  If the computed cookie is
>   valid, the protocol enters the authentication and authorization
>   phase.  Otherwise, it MUST silently discard the received message.
>  
>
The first time I read this, coupled with the suggested algorithm using a

shared secret, I thought that you were saying the cookie was to be 
calculated in advance and compared when received (by the 
PANA-Start-Request). Upon closer examination, I see you are only 
verifying a cookie that is echoed back. This is fine, but please make 
the text more clear. Elimating the algorithm for cookie calculation 
might be one way to help here (it is very tempting to believe that this 
is the way one MUST calculate the cookie, and try to verify that a 
received cookie matches this computation rather than simply the echo of 
a cookie sent earlier).

_______________________________________________
Pana mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/pana