Datagram Transport Layer Security (DTLS) on Android/Java

醉酒当歌 提交于 2021-02-18 02:06:10

问题


Has anyone used DTLS on Android or is there an open source Java implementation that supports DTLS?

What are my other options for securing UDP traffic on Android?


回答1:


DTLS support is not available in pure Java yet. We ended up using OpenSSL through JNI. I doubt you will find anything on Android.

You should use TLS (which means you have to use TCP).




回答2:


wolfSSL recently created an open source JNI wrapper around the lightweight SSL/TLS library, CyaSSL. The wrapper supports both DTLS 1.0 and DTLS 1.2 - in addition to current SSL/TLS standards up to TLS 1.2.

Both CyaSSL and the JNI wrapper are dual licensed under the GPLv2 as well as a commercial license to accomodate both personal/hobby and commercial project needs.

You can find our JNI wrapper here: http://yassl.com/yaSSL/Products-wolfssljni.html




回答3:


Nowadays OpenSSL for Android is not a good option, I am currently using Mbed TLS library, easy compiles with Android NDK, works fine, small footprint, recommend it.




回答4:


Californium offers a DTLS 1.2 library (scandium) in java, so you don't need any native stuff to make it working. It supports DTLS 1.2 Connection ID to overcome broken DTLS encryption contexts, when an address change occurs. Depending on the use-case, CoAP may make sense as well. Using both enables an android device to exchange data encrypted with a cloud server, moving around or changing between cellular or wifi without new handshakes.



来源:https://stackoverflow.com/questions/2914151/datagram-transport-layer-security-dtls-on-android-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!