Subject: [tram] Hash agility for STUN message-integrity

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Thu, 24 Nov 2016 04:31:38 +0000

Hi all,

In STUNBis (https://tools.ietf.org/html/draft-ietf-tram-stunbis-08#page-48) I see there is a new attribute that TURN clients can insert if they use HMAC-SHA-256 for digest (MESSAGE-INTEGRITY-SHA256). So if a client supports HMAC-SHA-1 it will insert the old attribute and if it supports HMAC-SHA-256 it will insert this new attribute
 
Is there a way to have a TURN server tell the client which algorithm to use? For example, a TURN client may support HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512 and depending on the policies/enterprise requirements, the TURN server will want to choose an algorithm for digest.

This can be solved by having the TURN server return the set of algorithms it would prefer in the 401 Unauthorized response to a AllocateRequest.
  
Current STUNBis does not have a way to negotiate digest algorithm, but I see it is something useful thing to have. Please let me know your thoughts?

Regards,
Ram

---

From: Muthu Arul Mozhi Perumal <[email-masked]>
Date: Fri, 25 Nov 2016 13:16:59 +0530

Hi Ram,

On Thu, Nov 24, 2016 at 10:01 AM, Ram Mohan R (rmohanr) <[email-masked]>
wrote:

> Hi all,
>
> In STUNBis (https://tools.ietf.org/html/draft-ietf-tram-stunbis-08#page-48)
> I see there is a new attribute that TURN clients can insert if they use
> HMAC-SHA-256 for digest (MESSAGE-INTEGRITY-SHA256). So if a client supports
> HMAC-SHA-1 it will insert the old attribute and if it supports HMAC-SHA-256
> it will insert this new attribute
>

​
No, stunbis section section 9.1.2
​says it ​
MUST insert both (unless it knows from an external indication which message
integrity algorithm is supported by both agents).
​
​

>
> Is there a way to have a TURN server tell the client which algorithm to
> use? For example, a TURN client may support HMAC-SHA-1, HMAC-SHA-256,
> HMAC-SHA-384 and HMAC-SHA-512 and depending on the policies/enterprise
> requirements, the TURN server will want to choose an algorithm for digest.
>
> This can be solved by having the TURN server return the set of algorithms
> it would prefer in the 401 Unauthorized response to a AllocateRequest.
>

​Since stunbis requires that the client include all message integrity
attributes or somehow know what the server supports and include only those,
the case where the client includes the message integrity for a digest that
the server doesn't support doesn't arise. So, stunbis needs changes first,
to achieve what you have described above..

Muthu

>
> Current STUNBis does not have a way to negotiate digest algorithm, but I
> see it is something useful thing to have. Please let me know your thoughts?
>
> Regards,
> Ram
>
> _______________________________________________
> tram mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/tram
>

---

From: "Ram Mohan R (rmohanr)" <[email-masked]>
Date: Fri, 25 Nov 2016 08:26:55 +0000

Hi Muthu,

See inline

From: Muthu Arul Mozhi Perumal <[email-masked]>
    Date: Friday, 25 November 2016 at 1:16 PM
    To: "Ram Mohan R (rmohanr)" <[email-masked]>
    Cc: "[email-masked]" <[email-masked]>
    Subject: Re: [tram] Hash agility for STUN message-integrity
    
    Hi Ram,
    
    On Thu, Nov 24, 2016 at 10:01 AM, Ram Mohan R (rmohanr) <[email-masked]> wrote:
    Hi all,

    ​
    No, stunbis section section 9.1.2 
    ​says it ​
    MUST insert both (unless it knows from an external indication which message integrity algorithm is supported by both agents). 

That’s right. Currently STUNbis requires client to insert both Message-integrity attributes. I would like to have the TURN server tell client which algorithm(s) to use for digest. For example, a client may support any one of below algorithms and I would like to have a way the TURN server client which subset or which algorithm to use for digest.

For example, as mentioned below the 401 Unauthorized response to allocateRequest can carry the list of algorithms the server prefer and client can choose one among them (depending on what he supports) to compute digest.

Regards,  
 Ram

    
    ​Since stunbis requires that the client include all message integrity attributes or somehow know what the server supports and include only those, the case where the client includes the message integrity for a digest that the server doesn't support doesn't arise. So, stunbis needs changes first, to achieve what you have described above..
    
    Muthu

    Regards,
    Ram

---

From: Muthu Arul Mozhi Perumal <[email-masked]>
Date: Fri, 25 Nov 2016 14:18:31 +0530

Understand. I think MUST include both MIs in the STUN request should be
relaxed in stunbis to achieve this (the agent must continue to insert both
MIs in the STUN indication).

Muthu

On Fri, Nov 25, 2016 at 1:56 PM, Ram Mohan R (rmohanr) <[email-masked]>
wrote:

>     In STUNBis (https://tools.ietf.org/html/draft-ietf-tram-stunbis-08#
> page-48) I see there is a new attribute that TURN clients can insert if
> they use HMAC-SHA-256 for digest (MESSAGE-INTEGRITY-SHA256). So if a client
> supports HMAC-SHA-1 it will insert the old attribute and if it supports
> HMAC-SHA-256 it will insert this new attribute
>
>     ​
>     MUST insert both (unless it knows from an external indication which
> message integrity algorithm is supported by both agents).
>
> That’s right. Currently STUNbis requires client to insert both
> Message-integrity attributes. I would like to have the TURN server tell
> client which algorithm(s) to use for digest. For example, a client may
> support any one of below algorithms and I would like to have a way the TURN
> server client which subset or which algorithm to use for digest.
>
> For example, as mentioned below the 401 Unauthorized response to
> allocateRequest can carry the list of algorithms the server prefer and
> client can choose one among them (depending on what he supports) to compute
> digest.
>
> Regards,
>  Ram
>
>     Is there a way to have a TURN server tell the client which algorithm
> to use? For example, a TURN client may support HMAC-SHA-1, HMAC-SHA-256,
>     This can be solved by having the TURN server return the set of
> algorithms it would prefer in the 401 Unauthorized response to a
> AllocateRequest.
>
>     Current STUNBis does not have a way to negotiate digest algorithm, but
> I see it is something useful thing to have. Please let me know your
> thoughts?
>
>     Regards,
>     Ram
>