-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTLS support for UDP client #1766
Comments
Can you give some specific scenarios you're looking to enable? As @karelz noted in https://github.com/dotnet/corefx/issues/29711 (moved to #26173), we currently have no plans to add DTLS. Having some killer scenarios might provide some motivation.
There has been progress on QUIC. #427 |
@scalablecory for the additional information. The scenario that I'm familiar with is audio/video streaming. Without DTLS one is left with TCP, which imposes higher latency and bandwidth requirements. If you look at all the major VOIP applications on the market, they use UPD for the audio streams...and they don't use .Net and probably won't desire to switch to it because...no DTLS. |
WebRTC was mentioned on that thread even earlier. Overall we are still not convinced that there is need to have this protocol in the platform itself. For specific DTLS protocol implementation, there is a community project mentioned in the previous bug - https://github.com/CreatorDev/DTLS.Net To change our minds on DTLS, we would need either killer scenarios or much more interest from partners and community with good reasons why the 2 alternatives are not sufficient. Closing to express our intent to not take contributions with DTLS into .NET platform itself. |
@SunnyWar how many VOIP apps are there? Is any one of them seriously investigating option to use .NET? Why is the DTLS project linked above not sufficient? In general, VOIP seems to be fairly specific segment to me. I would like to see more general usages to make the case for having the protocol in the platform vs. just built-on nuget package. |
@karelz You wanted and an example, I gave you one. Making it sound like it's the only one is an odd response. Try to broaden your view. |
@SunnyWar let's try to de-escalate the chat here, let's be technical, without accusations of rudeness, not enough broaden views, etc. ... You gave us example of VOIP (thank you for that), which is fairly limited scenario as I tried to explain: The problem is that for almost anything in the world, one can find a scenario. The key question is, how common is the scenario and how many customers need it. Is 1 customer enough? (maybe a government) What about 10 customers? (maybe VOIP providers) Or 100? Or thousands / millions? Sorry to hear that you considered my response odd. I hope it was just misunderstanding / misinterpretation of my reply (which is easy to do in "just" written form, when emotions are lost from communication). As you probably understand, we cannot have everything implemented in .NET, we have to prioritize and choose which features and/or protocols we include in the platform. And because everything has a cost, even OSS contributions (aka "free of cost code") are sometimes rejected, because they bring long-term cost of maintenance and complexity which may not be worth the benefit. DTLS falls into this category -- the value is limited (based on our current knowledge) - the protocol is not very popular, it is used in scarce places/scenarios, and there are existing workarounds (external package + alternative under-construction protocol QUIC). On a side note: AFAIK .NET Core is not FIPS certified, so having DTLS implemented as part of the platform would not help with your point above [3] where you were looking for FIPS certified 3rd party solution. If you think I missed some important points, or if there is more information available that was not mentioned yet, please let me know. |
The VoIP angle is a bit of a red herring as far as DTLS is concerned. It's only required when the media (RTP) channel needs to be secured (SRTP). As to whether including a particular foundation protocol in dotnet would be worth it as far as uptake by application developers it's a chicken and egg situation. We can't really know. Anecdotally there are some pretty powerful communications apps (Slack, Skype etc.) that would lend themselves well to Windows and .Net/dotnet. Without the fundamental real-time communication protocols the hurdles are too high for most app developers to consider dotnet. But back to the main case for DTLS. WebRTC is supposedly the next big thing for web apps and Microsoft has been a big supporter of it including Microsoft employees on the WebRTC standards committees. Personally I think integrating DTLS into dotnet would be a small investment for a medium return. It's not a big stretch from TLS to DTLS so the effort is likely less than anticipated. As the popularity of WebRTC increases app developers will be looking for a way to provide real-time communication experiences in the current way they currently provide web experiences. I've tested a number of the open source DTLS libraries for dotnet, including the one mentioned above, and have had no success talking integrating with popular DTLS servers or a WebRTC client. The solution that does work is to go down the C++ path and use OpenSSL. The learning curve to do that is 10x compared to the comfortable consistency of the dotnet base class library. |
Looking at WebRTC on wikipedia - that seems to be targeting mainly VOIP endpoints in browsers. Is that correct? Why do you think the investment is small? What does small mean in this context? 1 month, 2 months, more? |
VoIP typically means Voice over IP and in that respect WebRTC is a lot more. As well as audio it also has video, data channels, hooks for accessing local video/audio devices and more. It's also a replacement for the Flash plugin and all its security woes. In the WebRTC Architecture stack DTLS is the mechanism use to negotiate the symmetric encryption key for SRTP which in turn encrypts the audio/video packets on the wire. DTLS is effectively the same thing as TLS but for UDP instead of TCP. DTLS does the Diffie-Hellman key exchange to set up the AES encryption key for the RTP media packets. The top level chromium DTLS classes can be seen here.
For somebody that worked on the
Another popular use case is Internet of Things (IoT) apps. A lot of times these devices prefer UDP instead of TCP to save resources (takes more battery to maintain TCP state compared to UDP). The problem is how can UDP transmissions be secured? Without something like DTLS it will require the app developer to roll their own hence the numerous IoT device exploits. |
Thanks for answers, few more questions: I don't see DTLS mentioned in the WebRTC Architecture doc ... am I missing something?
The TLS protocol is taken care of by external layer - OpenSSL (Linux/Mac) and Schannel (Windows). We do not deal with that part.
I would expect that these scenarios could leverage QUIC implementations instead of DTLS going forward. For general UDP+TLS solution. BTW: It seems there may be some thoughts on QUIC + WebRTC as well: https://bloggeek.me/who-needs-quic-in-webrtc/ |
Yes they've left it out. I suspect under the assumption it's an assumed part of the SRTP block. Coincidentally it is shown on the QUIC blog post you linked, halfway down in the "High Performance Browser Stack".
That's going to be a long way away (year(s) at best). There are bound to be IoT devices in the field that never get QUIC. Still I appreciate the point, resources are always limited. If DTLS/SRTP don't make it in to dotnet maybe the next batch of programmers will have QUIC & HTTP3. |
Appreciate it's flogging a dead horse at this stage but while doing some WebRTC testing with Microsoft Edge came across RTCDtlsTransport and ORTC API. So suffice to say there is already a DTLS stack somewhere in Microsoft. |
@SunnyWar if you're still looking for this someone else pointed out a DTLS implementation for .Net Core buried down in the BouncyCastle project. |
dotnet/corefx#29711 (moved to #26173) was closed without resolving the issue. Re-opening it here. We need DTLS in .Net.
As @sipsorcery pointed out, DTLS is needed for the implementation of WebRTC. Also, there does not appear to be any progress on QUIC protocol that @karelz pointed out. In any case, it's not available, so it's not a workaround.
If the powers that be choose to close this again, please show tracking on QUIC or an open-source workaround. Closing without this information is rude.
The text was updated successfully, but these errors were encountered: