Subject: [rtcweb] Which hashes are valid for the fingerprint attribute?

From: Iñaki Baz Castillo <[email-masked]>
Date: Fri, 11 Jul 2014 14:26:23 +0200

Hi,

Hi, RFC 5763 and RFC 5764 (DTLS-SRTP) do not mandate a specific hash
for the fingerprint attribute in the SDP. RFC 5763 refers to RFC 4572
"Connection-Oriented Media Transport over TLS in SDP”. Its section 5
clearly opens the door to multiple hash functions:

   hash-func    =  "sha-1" / "sha-224" / "sha-256" /
                         "sha-384" / "sha-512" /
                         "md5" / "md2" / token
                         ; Additional hash functions can only come
                         ; from updates to RFC 3279

I'm pretty sure that WebRTC implementations are not ready for all
those hash functions. Is there any WebRTC related draft constraining
the hash functions that can be used?

Thanks a lot.

PS: Not sure if this question should be placed here or in public-webrtc ML.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Alexandre GOUAILLARD <[email-masked]>
Date: Fri, 11 Jul 2014 23:05:54 +0800

Inaki,

I checked a little bit, following our previous exchange.

There was a thread back in november last year in discuss-webrtc (how to
specify desired hash function(s) (sha-1, sha-256, sha-512) for DTLS-SRTP?)

Justin said "Chrome supports various hash functions in the remote
description (SHA-1, 256, 512). Local description currently only
supports SHA-256,
no plans to change that (although we will probably support longer hashes in
the future for hash agility). Asymmetric hash functions should not be an
issue. If multiple fingerprints are specified in the remote description, I
think Chrome will only use the first one."

then in ORTC there was this thread in april:
"Issue 64: Section 2.5.1 Fingerprint attribute"
in which bernard proposed:
"
dictionary RTCDtlsParameters {
    RTCDtlsRole                  role = "auto";
    sequence<RTCDtlsFingerprint> fingerprint;
};
dictionary RTCDtlsFingerprint {
    RTCDtlsCertificateHashAlgorithm algorithm;
    ArrayBuffer                     value;
};
enum RTCDtlsCertificateHashAlgorithm {
    "sha-1",
    "sha-224",
    "sha-256",
    "sha-384",
    "sha-512"
};
"

On Fri, Jul 11, 2014 at 8:26 PM, Iñaki Baz Castillo <[email-masked]> wrote:

> _______________________________________________
> rtcweb mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/rtcweb
>

-- 
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
CTO - Temasys Communications, S'pore / Mountain View
President - CoSMo Software, Cambridge, MA
------------------------------------------------------------------------------------
sg.linkedin.com/agouaillard

   -

---

From: Justin Uberti <[email-masked]>
Date: Fri, 11 Jul 2014 08:58:02 -0700

The recommended algorithms to support probably needs to appear in the
security document; JSEP should also mention or point to the recommended
algorithms to use when generating the digest.

On Fri, Jul 11, 2014 at 8:05 AM, Alexandre GOUAILLARD <[email-masked]
> wrote:

> description (SHA-1, 256, 512). Local description currently only supports
> SHA-256, no plans to change that (although we will probably support
> longer hashes in the future for hash agility). Asymmetric hash functions
> should not be an issue. If multiple fingerprints are specified in the
> remote description, I think Chrome will only use the first one."
>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Fri, 11 Jul 2014 18:31:21 +0200

> algorithms to use when generating the digest.

Agreed. There are too many possible hash algorithms and it's
unfeasible to expect that different implementations may support all of
them.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Martin Thomson <[email-masked]>
Date: Fri, 11 Jul 2014 11:05:21 -0700

>    hash-func    =  "sha-1" / "sha-224" / "sha-256" /

Firefox supports sha*.  We will not support md* and don't believe that
we are obligated to.  Forbidding md* might be a good idea:
https://github.com/rtcweb-wg/security-arch/issues/10

---

From: Martin Thomson <[email-masked]>
Date: Fri, 11 Jul 2014 11:07:08 -0700

> https://github.com/rtcweb-wg/security-arch/issues/10

Oh, and I forgot to add, like Chrome, we will *provide* sha-256.  For
the near term, that is what we consider to be the right choice.