Skip to content

Support for dtls connection id extension? #27

Open

Description

@mfalkvidd

Does tinydtls support the dtls connection id extension? (See https://datatracker.ietf.org/doc/draft-ietf-tls-dtls-connection-id/ for details)

If not, does anyone familiar with the project have an idea of how much effort it would be to add support?

Activity

  1. erkki commented on Mar 31, 2020

    @erkki

    We've implemented a minimalistic form of DTLS CID in a private project but it's not in a good shape right now to be released publicly as it relies on many hardcoded bits. There's some internals that make it clunky to implement so if there's official upstream interest/support we're happy to collaborate.

  2. obgm commented on Mar 31, 2020

    @obgm
    Contributor

    The official status is that it is currently not supported by the upstream tinydtls. It should not be too hard to implement, though (maybe @erkki can share more details?)

  3. boaks commented on Jun 25, 2020

    @boaks
    Contributor

    @erkki

    I'm interested to test the interoperability with Eclipse - Californium, at least the device-client side. Would it be possible to get access to your work?

  4. erkki commented on Jun 25, 2020

    @erkki

    @boaks by all means, we are already running against leshan/californium, in fact your work there was our starting point. I'll revisit and try to share something.

  5. boaks commented on Jun 25, 2020

    @boaks
    Contributor

    :-), cool!
    So there are already some clients working with it.

  6. erkki commented on Jul 11, 2020

    @erkki

    Sorry for being late, I was hoping to go through the code again to refresh up and maybe make some bits nicer. This didn't happen, so opening it up as it is in its current state and then we can take it from there. We have a limited implementation with a fixed CID length (also hardcoded leshan side in our usage) format so this would probably have to change in a more general solution.

    Happy to help with implementation and/testing once there's established interest and direction.

    https://github.com/bear-metal/tinydtls-esp32/tree/dtls_cid

  7. boaks commented on Oct 29, 2020

    @boaks
    Contributor

    @erkki

    just if you are still interested in the recent development, I added a build-in cid-load-balancer to Californium. The current plan is to add this the the upcoming Californium release 2.5.0 next week.

  8. erkki commented on Oct 30, 2020

    @erkki

    @boaks this looks great! Definitely interested, albeit little time constrained. We're doing field testing now with some devices but for the next phase we would definitely need something like this on the server/infra side for HA/LB. I've been trying to keep up with the RFC discussions as well so probably need a rebase+refresh at some point. Curious if you have a backwards compatibility plan with the recent RFC changes and client code with CID length specificers :)

  9. boaks commented on Oct 30, 2020

    @boaks
    Contributor

    albeit little time constrained.

    So am I :-)

    I've been trying to keep up with the RFC discussions as well so probably need a rebase+refresh at some point. Curious if you have a backwards compatibility plan with the recent RFC changes and client code with CID length specificers :)

    There are three ways to go:

    • new MAC new record content-type
    • new MAC only (without new record content-type). That would require to check the MAC of the FINISH, if it uses the definition of 07 or the future one.
    • no new MAC, no change required. My strong preference. But it seems, that I'm the only one :-).

    So for now, the only topic discussed to change seems to be the MAC. But until the RFC gets really released, I don't think it's worth to frequently adapt to those MAC updates based on cryptographic hygiene.

    The discussion about more clarification on "variable length CID" encoding doesn't affect Californium's implementation. There it's just delegated to the implementation of ConnectionIdGenerator. And, if fixed length CID are used, it's not related at all.

    The only "claimed threat" left seems to be a "false valid" for the MAC of the FINISH message, if handshake messages are manipulated. Generally, the verify_data of the FINISH is used to protect from such handshake message manipulations. I don't see, why the MAC should be here that important. There are much more options to manipulate handshake messages, which are also not detected by the FINISH MAC, but by that verify_data.
    End the example seems to be more theoretical and focused isolated on the CID-MAC topic. In my opinion, AEAD, AES-CDC MtE will not show that defect, only AES-CDC EtM, but that's not implemented in Californium.
    And I guess, RFC7627 will also close that gap (if that "false valid" MAC is considered as gap at all).

    So, let's look forward, what will be presented as release by the IETF-TLS working group.

  10. erkki commented on Oct 30, 2020

    @erkki

    Yes makes sense, we're already using ConnectionIdGenerator to pseudo-fix our CID length.

  11. boaks commented on Mar 21, 2021

    @boaks
    Contributor

    The last information on that MAC change is, that also a new hello_extension code point (currently 53) will be assigned by the IANA with the release of the draft-ietf-tls-dtls-connection-id. The old one will stay reserved for a while.

  12. boaks commented on Nov 19, 2021

    @boaks
    Contributor

    @mfalkvidd
    @erkki

    For the case, you're still interested:

    Californium reached also version 3.0.0 (support compliant to RFC9146).
    If you're still interested, your feedback is very welcome.

  13. erkki commented on Nov 21, 2021

    @erkki

    Sounds good!

    I'll give this a test in the lab :)

  14. boaks commented on Dec 9, 2021

    @boaks
    Contributor

    @mfalkvidd
    @erkki

    Have you been able to have a look on it? Does it work for you?

    For my developments in the last two years, DTLS CID, so simple it is, turned into the enabler technology for successfully DTLS load-balancing with long term session, and for (half :-) ) high availability using a dtls graceful restart. Hope this could get some more adoption in the next year.

  15. erkki commented on Dec 9, 2021

    @erkki

    Sorry, been tied up. Definitely want to give this a test run in the lab this weekend.

    For us, also, DTLS CID has been a huge enabler, due to the IP roaming issue prevalent otherwise.

  16. boaks commented on Mar 22, 2022

    @boaks
    Contributor

    Just to mention:
    RFC9146 is published.

  17. boaks commented on Aug 9, 2022

    @boaks
    Contributor

    In the meantime, tinydtls has a feature branch for CID and a pending PR #149 .

    If someone is interested to see that in action, you may consider to have a look at

    Zephyr - CoAP/DTLS 1.2 CID client for Thingy:91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions