ThreadX docsThreadX docs
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
  • NetX Duo Documentation

    • Understand NetX Duo
    • NetX Duo documentation
    • Chapter 1 - Introduction to NetX Duo
    • Chapter 2 - Installation and Use of NetX Duo
    • Chapter 3 - Functional Components of NetX Duo
    • Chapter 4 - Description of NetX Duo Services
    • Chapter 5 - NetX Duo Network Drivers
    • Appendix A - NetX Duo Services
    • Appendix B - NetX Duo Constants
    • Appendix C - NetX Duo Data Types
    • Appendix D - NetX Duo BSD-Compatible Socket API
    • Appendix E - NetX Duo ASCII Character Codes
    • Auto-IP

      • Chapter 1 - Introduction to NetX Duo AutoIP
      • Chapter 2 - Installation and use of NetX Duo AutoIP
      • Chapter 3 - Description of NetX Duo AutoIP services
    • BSD

      • Chapter 1 - Introduction to NetX Duo BSD
      • Chapter 2 - Installation and use of NetX Duo BSD
      • Chapter 3 - NetX Duo BSD Services
    • Crypto

      • Chapter 1 - Introduction to NetX Duo Crypto
      • Chapter 2 - Installation and use of NetX Duo Crypto
      • Chapter 3 - Functional description of NetX Duo Crypto
      • Chapter 4 - NetX Duo Crypto API description
      • Appendix - NetX Duo Crypto CAVS test
    • DHCP Client

      • Chapter 1 - Introduction to the NetX Duo DHCP Client
      • Chapter 2 - Installation and use of NetX Duo DHCP Client
      • Chapter 3 - Description of NetX Duo DHCP Client services
      • Appendix A - Description of the Restore state feature for NetX Duo DHCP Client services
    • DHCP Server

      • Chapter 1 - Introduction to NetX Duo DHCP Server
      • Chapter 2 - Installation and Use of the NetX Duo DHCP Server
      • Chapter 3 - Description of NetX Duo DHCP server services
    • DHCPv6 Client

      • Chapter 1 - Introduction to NetX Duo DHCPv6 Client
      • Chapter 2 - Installation and use of NetX Duo DHCPv6 Client
      • Chapter 3 - NetX Duo DHCPv6 configuration options
      • Chapter 4 - NetX Duo DHCPv6 Client services
      • Appendix A - Description of the Restore State Feature for NetX Duo DHCPv6 Client
    • DHCPv6 Server

      • Chapter 1 - Introduction to NetX Duo DHCPv6 server
      • Chapter 2 - Installation and use of NetX Duo DHCPv6 server
      • Chapter 3 - NetX Duo DHCPv6 server configuration options
      • Chapter 4 - NetX Duo DHCPv6 server services
      • Appendix A – NetX Duo DHCPv6 option codes
      • Appendix B - NetX Duo DHCPv6 server status codes
      • Appendix C - NetX Duo DHCPv6 unique identifiers (DUIDs)
      • Appendix D - NetX Duo Advanced DHCPv6 server example
    • DNS

      • Chapter 1 - Introduction to the NetX Duo DNS Client
      • Chapter 2 - Installation and Use of NetX Duo DNS Client
      • Chapter 3 - Description of NetX Duo DNS Client Services
    • FTP

      • Chapter 1 - Introduction to NetX Duo FTP
      • Chapter 2 - Installation and use of FTP
      • Chapter 3 - Description of FTP services
    • HTTP

      • Chapter 1 - Introduction to NetX Duo HTTP
      • Chapter 2 - Installation and Use of NetX Duo HTTP
      • Chapter 3 - Description of NetX Duo HTTP Services
    • iperf

      • Chapter 1 - Introduction to NetX Duo Iperf
      • Chapter 2 - Installing and using NetX Duo Iperf
      • Chapter 3 - Running the UDP Transmit Test
    • mDNS

      • Chapter 1 - Introduction to NetX Duo mDNS/DNS-SD
      • Chapter 2 - Installation and use of mDNS
      • Chapter 3 - Description of internal service cache
      • Chapter 4 - Description of mDNS services
    • mqtt

      • Chapter 1 - Introduction to NetX Duo MQTT
      • Chapter 2 - Installation and use of NetX Duo MQTT client
      • Chapter 3 - Description of NetX Duo MQTT Client Services
    • NAT

      • Chapter 1 - An introduction to Network Address Translation
      • Chapter 2 - Installation and use of NAT
      • Chapter 3 - NAT configuration options
      • Chapter 4 - Description of NAT services
    • POP3 Client

      • Chapter 1 - Introduction to NetX Duo POP3
      • Chapter 2 - Installation and use of NetX Duo POP3 Client
      • Chapter 3 - Description of POP3 Client services
    • PPP

      • Chapter 1 - Introduction to the NetX Duo Point-to-Point Protocol (PPP)
      • Chapter 2 - Installation and use of NetX Duo Point-to-Point Protocol (PPP)
      • Chapter 3 - Description of NetX Duo Point-to-Point Protocol (PPP) services
    • PTP Client

      • Chapter 1 - Introduction to NetX Duo PTP Client
      • Chapter 2 - Installation and Use of NetX Duo PTP Client
      • Chapter 3 - Description of NetX Duo PTP Client Services
    • rtp

      • Chapter 1 - Introduction to the NetX Duo RTP Sender
      • Chapter 2 - Installation and use of NetX Duo RTP Sender
      • Chapter 3 - Description of NetX Duo RTP Sender Services
    • rtsp

      • Chapter 1 - Introduction to the NetX Duo RTSP Server
      • Chapter 2 - Installation and use of NetX Duo RTSP Server
      • Chapter 3 - Description of NetX Duo RTSP Server Services
    • Secure DTLS

      • Chapter 1 - Introduction to NetX Duo Secure DTLS
      • Chapter 2 - Installation and use of NetX Duo Secure DTLS
      • Chapter 3 - Functional description of NetX Duo Secure DTLS
      • Chapter 4 - Description of NetX Duo Secure DTLS services
      • Appendix A - NetX Duo Secure DTLS return/error codes
    • Secure TLS

      • Chapter 1 - Introduction to NetX Duo Secure
      • Chapter 2 - Installation and use of NetX Duo Secure
      • Chapter 3 - Functional description of NetX Duo Secure
      • Chapter 4 - Description of NetX Duo Secure services
      • Appendix A - NetX Duo Secure return/error codes
    • SMTP Client

      • Chapter 1 - Introduction to NetX Duo SMTP client
      • Chapter 2 - Installation and use of NetX Duo SMTP client
      • Chapter 3 - Client description of SMTP Client services
    • snmp

      • Chapter 1 - Introduction to NetX Duo SNMP
      • Chapter 2 - Installation and use of the NetX Duo SNMP agent
      • Chapter 3 - Description of NetX Duo SNMP agent services
    • sntp client

      • Chapter 1 - Introduction to NetX Duo SNTP
      • Chapter 2 - Installation and Use of NetX Duo SNTP Client
      • Chapter 3 - Description of NetX Duo SNTP Client Services
      • Appendix A - NetX Duo SNTP Fatal Error Codes
    • telnet

      • Chapter 1 - Introduction to NetX Duo Telnet
      • Chapter 2 - Installation and use of NetX Duo Telnet
      • Chapter 3 - Description of NetX Duo Telnet services
    • TFTP

      • Chapter 1 - Introduction to NetX Duo TFTP
      • Chapter 2 - Installation and use of NetX Duo TFTP
      • Chapter 3 - Description of NetX Duo TFTP services
    • Web HTTP

      • Chapter 1 - Introduction to HTTP and HTTPS
      • Chapter 2 - Installation and use of HTTP and HTTPS
      • Chapter 3 - Description of HTTP services
    • About the NetX Duo User Guide

Chapter 1 - Introduction to NetX Duo Secure

NetX Duo Secure is a high-performance real-time implementation of cryptographic network security standards including TLS/SSL designed exclusively for embedded ThreadX-based applications. This chapter contains an introduction to NetX Duo Secure and a description of its applications and benefits.

NetX Duo Secure Unique Features

Unlike most other TLS implementations, NetX Duo Secure was designed from the ground up to support a wide variety of embedded hardware platforms and scales easily from small micro-controller applications to the most powerful embedded processors available. The code is written with the limited resources of embedded systems in mind, and provides a number of configuration options to reduce the memory footprint needed to provide secure network communications over TLS.

RFCs Supported by NetX Duo Secure

NetX Duo Secure supports the following protocols related to TLS. The list is not necessarily comprehensive as there are numerous RFCs pertaining to TLS and cryptography. NetX Duo Secure follows all general recommendations and basic requirements within the constraints of a real-time operating system with small memory footprint and efficient execution.

RFCDescriptionPage
RFC 2104HMAC: Keyed-Hashing for Message Authentication33
RFC 2246The TLS Protocol Version 1.019
RFC 3268Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS)31
RFC 3447Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.132
RFC 4279Pre-Shared Key Ciphersuites for TLS39
RFC 4346The Transport Layer Security (TLS) Protocol Version 1.119
RFC 5246The Transport Layer Security (TLS) Protocol Version 1.219
RFC 5280X.509 PKI Certificates (v3)41
RFC 5746Transport Layer Security (TLS) Renegotiation Indication Extension
RFC 5869HMAC-based Extract-and-Expand Key Derivation Function (HKDF)19
RFC 60661Transport Layer Security (TLS) Extensions: Extension Definitions19
RFC 6234US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)33
RFC 8443Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) Versions 1.2 and Earlier
RFC 8446The Transport Layer Security (TLS) Protocol Version 1.319
  1. As of version 6.0 only the Server Name Indication (SNI) extension from RFC 6066 is fully supported.

NetX Duo Secure Requirements

In order to function properly, the NetX Duo Secure run-time library requires that a NetX IP instance has already been created. In addition, and depending on the application, one or more DER-encoded X.509 Digital Certificates will be required, either to identify a TLS instance or to verify certificates coming from a remote host. The NetX Duo Secure package has no further requirements.

NetX Duo Secure Constraints

The NetX Duo Secure protocol implements the requirements of the RFC 5246 Standard(s) for TLS 1.2 and RFC 8446 for TLS 1.3, as well as providing optional (disabled by default) backwards-compatibility with RFCs 4346 (TLS 1.1) and 2246 (TLS 1.0). However, there are the following constraints:

  • Only ciphersuites using SHA-256 are supported for TLS 1.2 and TLS 1.3. In versions prior to TLS 1.2, the TLS handshake uses a fixed hashing routine to verify TLS handshake messages are not tampered with. Starting with version 1.2, the handshake uses the hash routine provided with the ciphersuite. TLS does not know ahead of time what hash routine will be used and must cache the handshake messages. By fixing the hash to SHA-256, NetX Duo Secure TLS can function with a smaller RAM footprint than other TLS implementations. This limitation will be removed in a future version once the memory usage can be properly addressed. *IMPORTANT NOTE: This limitation applies only to ciphersuite choice. X.509 certificate signatures are not subject to the same limitation and any of the supported hash routines may be used.
  • Due to the nature of embedded devices, some applications may not have the resources to support the maximum TLS record size of 16KB. NetX Duo Secure can handle 16KB records on devices with sufficient resources. The TLS reassembly buffer (see API reference for nx_secure_tls_session_packet_buffer_set) may be set to a size smaller than 16KB at the risk of interoperability problems. If a valid TLS record is received that is larger than the reassembly buffer, NetX Duo Secure TLS will abort the TLS session with an error. In general, the buffer should always be set to at least 18KB (16KB TLS record size + 2KB for encryption padding) and only made smaller in controlled settings (e.g. the remote host guarantees a maximum TLS record size).

    Note: In general, the packet reassembly buffer should never be smaller than the TLS maximum record size. However, if the characteristics of the remote host are well known (e.g. in a completely closed system) the size can be reduced to regain some RAM space.

  • Minimal certificate verification. NetX Duo Secure will perform basic X.509 chain verification on a certificate to assure that the certificate is valid and signed by a trusted Certificate Authority, and can provide the certificate Common Name for the application to compare against the Top-Level Domain Name of the remote host. If a real-time clock is available, it can be used to verify the certificate expiration date (see API nx_secure_tls_session_time_function_set). However, verification of certificate extensions and other data is the responsibility of the application implementer.
  • Software-based cryptography is processor-intensive. The NetX Duo Secure software-based cryptographic routines have been optimized for performance, but depending on the power of the target processor, that performance may result in very long operations. When hardware-based cryptography is available, it should be used for optimal performance of NetX Duo Secure TLS.
  • TLS Handshake Record fragmentation is unsupported. If certain TLS handshake record messages are too large, they may be split across multiple TLS records – NetX Duo Secure TLS currently treats this as an error. The memory requirements for embedded systems mean that the larger handshake record message likely cannot be handled anyway but the limitation could lead to errors when communicating with certain TLS hosts that use excessively large certificate chains.
  • TLS server does not support dynamic certificate selection when there are multiple certificates in the local store.
  • X509 Certificate KeyUsage is not observed.
  • ECDH-based ciphersuites are not supported. Use ECDHE instead.
Next
Chapter 2 - Installation and use of NetX Duo Secure