简体   繁体   中英

Datagram Transport Layer Security (DTLS) on Android/Java

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?

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).

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

现在 Android 的 OpenSSL 不是一个好的选择,我目前正在使用 Mbed TLS 库,使用 Android NDK 轻松编译,工作正常,占用空间小,推荐它。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM