Datagram Transport Layer Security (DTLS) on Android/Java
Asked Answered
C

4

6

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?

Cl answered 26/5, 2010 at 15:5 Comment(0)
Z
3

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

Zarla answered 26/5, 2010 at 15:17 Comment(2)
Thanks. I assume you used DTLS of OpenSSL. How was the performance of using OpenSSL using JNI? Is your code open source ?Cl
The project is not open source. Performance is good but we finally decided using DTLS is not worth while. UDP has lots of advantage over TCP, you save the 3 way handshake (4 ms on our network). However, when you add the overhead of TLS, the performance gain between UDP and TCP is not that noticeable.Zarla
R
1

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

Rachitis answered 8/11, 2013 at 17:18 Comment(1)
The licensing of the above was made clear that it was indeed commercial, but also available under an open source GPLv2 license. Not trying to hide that fact, just provide an alternative option.Rachitis
T
0

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.

Tillo answered 30/4, 2020 at 18:1 Comment(0)
U
0

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.

Ustulation answered 1/5, 2020 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.