Subject: [Dtls-iot] Spencer Dawkins' Yes on draft-ietf-dice-profile-16: (with COMMENT)

From: "Spencer Dawkins" <[email-masked]>
Date: Wed, 30 Sep 2015 11:04:53 -0700

Spencer Dawkins has entered the following ballot position for
draft-ietf-dice-profile-16: Yes

When responding, please keep the subject line intact and reply to all
email addresses included in the To and CC lines. (Feel free to cut this
introductory paragraph, however.)

Please refer to https://www.ietf.org/iesg/statement/discuss-criteria.html
for more information about IESG DISCUSS and COMMENT positions.

The document, along with other ballot positions, can be found here:
https://datatracker.ietf.org/doc/draft-ietf-dice-profile/

----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

I really like this document. I wish more working groups produced similar
guidance.

I did have a number of questions, that you might want to take a look at
before the document is approved.

This text

   UDP is mainly used to carry CoAP messages but other
   transports can be utilized, such as SMS Appendix A or TCP
   [I-D.tschofenig-core-coap-tcp-tls].
   
is somewhat ambiguous - is this supposed to say that "Most CoAP messages
are carried in UDP, but other transports can be utilized, such as ..."?

This document is pretty reference-rich, but 

   For use with this profile the PSK identities
   SHOULD NOT assume a structured format (such as domain names,
   Distinguished Names, or IP addresses) and a constant time bit-by-bit
   comparison operation MUST be used by the server for any operation
   related to the PSK identity.
   
doesn't have a reference or a definition for "constant time bit-by-bit
comparison operation". Could you provide one?

I wasn't quite sure what 

   TLS/DTLS offers a lot of freedom for the use with ECC.  
   
means. At a minimum, "for the use with" needs help. I'm guessing from the
rest of the paragraph that this is saying "TLS/DTLS offers a lot of
choices when selecting ECC curves", or something like that. But I'm
guessing.

Is there a missing word in 

   For deployments
   where public key cryptography is acceptable the raw public might
                                      somewhere around here? ^
   offer an acceptable middle ground between the PSK ciphersuite in
   terms of out-of-band validation and the functionality offered by
   asymmetric cryptography.
   
I think I understand 

   The use of PFS is a trade-off decision since on one hand the
   compromise of long-term secrets of embedded devices is more likely
   than with many other Internet hosts but on the other hand a Diffie-
   Hellman exchange requires ephemeral key pairs to be generated, which
   is demanding from a performance point of view.  For obvious
   performance improvement, some implementations re-use key pairs over
   multiple exchanges (rather than generating new keys for each
   exchange).  However, note that such key re-use over long periods
   voids the benefits of forward secrecy when an attack gains access to
   this DH key pair.

but, just to make sure - is this saying that when you gain access to a DH
key pair, you can decrypt back to the last time the device generated new
keys, but no further (so, "Imperfect Forward Secrecy")? I'm guessing that
based on "trade-off" in the first sentence, but I'm not sure what's being
traded for performance improvement.

In this text,

   On the other hand, the way DTLS handles
   retransmission, which is per-flight instead of per-segment, tends to
   interact poorly with low bandwidth networks.
   
I'm assuming you are using "per-flight" in the
https://tools.ietf.org/html/rfc5681 sense of the term ("FLIGHT SIZE: The
amount of data that has been sent but not yet cumulatively
acknowledged"), but that's somewhat obscure, especially outside of TSV,
and there's no definition or reference for it in this document. Perhaps
you could say something like

   On the other hand, DTLS handles loss by retransmitting the
   entire amount of data that has been sent but has not been 
   cumulatively acknowledged, and this tends to
   interact poorly with low bandwidth networks.
   
Just to make sure I understand, 

   The ClientHello and the ServerHello messages contains the 'Random'
   structure, which has two components: gmt_unix_time and a sequence of
   28 random bytes. gmt_unix_time holds the current time and date in
   standard UNIX 32-bit format (seconds since the midnight starting Jan
   1, 1970, GMT).  Since many IoT devices do not have access to an
   accurate clock, it is RECOMMENDED to place a sequence of random bytes
   in the two components of the 'Random' structure when creating a
   ClientHello or ServerHello message and not to assume a structure when
   receiving these payloads.
   
is recommending that all IoT devices use a sequence of random bytes, even
if they do have access to an accurate clock - is that right?

Could you help me understand why 

   Implementing the Server Name Indication extension is RECOMMENDED
   unless it is known that a TLS/DTLS client does not interact with a
   server in a hosting environment.
   
isn't REQUIRED? This seems like a violation of the Principle of Least
Astonishment ("we moved our server into a hosted environment to save
money, and our sensor network quit working").

I don't understand this paragraph.

   To prevent the re-negotiation attack [RFC5746] this specification
   RECOMMENDS to disable the TLS renegotiation feature.  Clients MUST
   respond to server-initiated re-negotiation attempts with an alert
   message (no_renegotiation) and clients MUST NOT initiate them.
   
If you MUST tell the server you won't renegotiate, and you MUST not try
to renegotiate yourself, how does these turn into a RECOMMENDS
("SHOULD")?

---

From: "FOSSATI, Thomas (Thomas)" <[email-masked]>
Date: Wed, 30 Sep 2015 21:28:14 +0000

Hi Spencer,

Thanks for your comments.  Quick reply on this one:

On 30/09/2015 19:04, "dtls-iot on behalf of Spencer Dawkins"
<[email-masked] on behalf of [email-masked]>
>   interact poorly with low bandwidth networks.

The term "flight" has a precise connotation in DTSL (see
https://tools.ietf.org/html/rfc6347#section-4.2.4) which is what we imply
here.

In the paragraph just above the one you've quoted, we reference section
4.2.4 of RFC 6347 which is where the term is originally introduced; so,
although implicitly, we provide the context.

I agree this is not perfect, but it's not easy to guess what the reader
knows already, what his/her mental filters are, etc, so I'm not sure what
we could do to make the text better/unambiguous?

Cheers, t

---

From: Spencer Dawkins at IETF <[email-masked]>
Date: Wed, 30 Sep 2015 23:02:42 -0500

Hi, Thomas,

> https://tools.ietf.org/html/rfc6347#section-4.2.4) which is what we imply

I learn something on almost every telechat. This is what I learned for the
current telechat cycle. Thanks for cluing me in!

> we could do to make the text better/unambiguous?

(At a comment level), this (excellent) document includes an introduction to
(D)TLS in section 3, so I'm assuming that at least some of your intended
readers won't have more clue about DTLS flights than I do. Perhaps
something like

"On the other hand, DTLS handles loss by retransmitting an entire flight
(as defined in section 4.2.4 of RFC 6347), and retransmitting all
unacknowledged segments tends to interact poorly with low bandwidth
networks."

But, your call. Your least clued readers may be more clued than I am :-)

Spencer