<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi all,<br>
<br>
I'm the main Maintainer of <a
href="https://github.com/eclipse-leshan/leshan"><b>Leshan</b></a>.
An open Source Java Implementation of <b><a
href="https://github.com/eclipse-leshan/leshan/wiki/Lightweight-M2M-Specification">LWM2M</a></b>
protocol.<br>
<br>
<b>LWM2M</b> is mainly based on <b>coap</b> and <b>coap+tcp</b>
protocol.<br>
Security is available by usage of <b>coaps</b> and <b>coaps+tcp</b>
which are based respectively on <b>DTLS</b> and <b>TLS</b>
(mainly v1.2 for now)<br>
<br>
Currently we only have support of <b>coap</b> and <b>coaps</b>.
We are using <b><a
href="https://github.com/eclipse-californium/californium/tree/main/scandium-core">Scandium</a></b>
as <b>DTLS</b> implementation, this is an historical choice
because <b>DTLS</b> was not available <b>OpenJDK</b> initially.<br>
</p>
<p>Recently, I begin to work about adding <b>coap+tcp</b> and <b>coaps+tcp</b>
to Leshan and so I looked again on available security feature in
OpenJDK to see if I should rely on it but I understand there
still missing key features for IoT.<br>
<br>
My understanding, DTLS 1.2 was added but there is still no support
of : <br>
</p>
<ul>
<li><b>Pre-Shared Key</b> for (D)TLS 1.2 : PSK is one of the most
basic techniques for TLS/DTLS since it is both computationally
efficient and bandwidth conserving. (<a
href="https://www.rfc-editor.org/rfc/rfc7925#section-4.2">RFC7925§Section4.2</a>
- TLS / DTLS -Profiles for the Internet of Things)<br>
</li>
<li><b>Connection Identifier</b> for DTLS 1.2 (<a
href="https://www.rfc-editor.org/rfc/rfc9146.html">RFC 9146</a>)
: CID is key feature to limit handshake in dynamic IP
environment. (and also be used for load balancing)</li>
<li>Cipher suite based on <b>AES_128_CCM_8 </b>(TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
TLS_PSK_WITH_AES_128_CCM_8) which are the recommended or
mandatory ciphersuite for CoAP or to create implementation
compliant with <a href="https://www.rfc-editor.org/rfc/rfc7925">RFC7925</a>.</li>
</ul>
<p>If I missed something and one of those feature is already
available let me know.<br>
<br>
The point I want to raise here it that it's pretty hard for Java
IoT developer to support commons Security IoT Feature.<br>
</p>
<p>Community can eventually rely on Scandium but it is currently
maintain by only 1 person and doesn't follow JSSE API and only
target DTLS.<br>
Other alternative is maybe Bouncy Castle but Pre-shared key seems
not available in their JSSE provider.<br>
There is also possibility to bind native library but this is not
so easy and also have drawback.<br>
All that solution sounds not so good...<br>
</p>
<p>So do you think it could make sense to add this kind of feature
in OpenJDK ?<br>
Or Maybe there is already plan to add it ? <br>
</p>
<p>(I hope this is the right place for this kind of question)</p>
<p>Thx,<br>
<br>
Simon<br>
<br>
</p>
</body>
</html>