RECENT BLOG NEWS
wolfSSL with Improved ThreadX/NetX Support
wolfSSL has supported the ThreadX/NetX RTOS with the TLS protocol. Recently we added the ability to use DTLS with NetX. Out of the box, wolfSSL has the I/O callback functions for handling UDP packets for DTLS. As an extension to DTLS, wolfSSL also supports Multicast DTLS. If you would like to know more please contact our sales team via email, sales@wolfssl.com
How to use the 0-RTT rope to climb, without hanging yourself!
One of the major new features of TLS v1.3 is the 0-RTT handshake protocol. This variation of the handshake, using Pre-Shared Keys (PSKs), allows the client to send encrypted data to the server in the first flight. This is particularly useful for TLS on embedded devices. Take the example of IoT. There may be thousands or even millions of devices reporting back regularly to the central servers with small updates.
Using 0-RTT, the IoT device can send a ClientHello plus all the update data, known as “early data”, in one flight. Then, the server responds with the ServerHello, EncryptedExtensions, and Finished messages plus acknowledgement of the early data all in one flight. Finally the device responds with EndOfEarlyData and Finished messages in a final flight to close the loop on the security.
We can see that the data is offloaded, without having to wait for the server. The device stores a little state and goes back to its job ready for the interrupt on response. If the response times out then the server can resend with an updated ClientHello. On response, the device processes the handshake messages and responds closing the connection and the update can be discarded.
This is all very efficient in terms of processing and overall round-trip time. But, there are potential security issues including: replay attacks and no forward security.
An attacker can replay messages from a device. The server decrypts the early data using a key directly derived from the PSK and no other authentication is performed. Without the second flight from the client, the server would not recognize the copy is invalid. The recommended defense is single-use tickets. Each ticket contains a fresh PSK. This has the downside of requiring a shared database of tickets across servers. Alternatively, unique values from the ClientHello used with each PSK can be stored instead.
The attacker may also intercept the client’s first flight and spam the server with copies. If the early data contains “state modifying” data as in the example above, processing a copy would be disastrous. If the PSK is single-use, the client will get out of sync with the server and a full handshake will be required. The server may well interpret the attack as the client attempting to retry and therefore this must be handled at the application level.
When the PSK is reused for a number of messages, forward secrecy is lost. This means that if a device is compromised all messages encrypted using keys derived from the current PSK are exposed. The recommended defense is to use a short timeout with tickets to limit the period of vulnerability.
Using 0-RTT does require more careful architecture on the server side, the benefits at the client side are worth it.
Overview of Testing in wolfSSL
The security of wolfSSL products is always on our mind and holds high importance. Conducting regular, diligent, and well-planned testing helps maintain wolfSSL’s robustness and security. We strive to write and maintain clean, readable, and understandable code.
Like the halting problem, we know it is impossible to test every single possible path through the software, but we practice an approach that is focused on lowering risk of failure. In addition to extensive automated testing, we make sure that we specifically test well-known use cases. This post outlines some of our internal testing process.
-
API Unit Testing: We have unit tests in place that test API functions for correct behavior. This helps maintain library consistency across releases and as the code evolves. It helps us to deliver a high quality well tested API to our end users with each software release. API unit tests are run with each “make check” of wolfSSL.
-
Cipher Suite Testing: wolfSSL supports an extensive list of cipher suites, which are all tested with every “make check” using the wolfSSL example client and example server. Each cipher suite is tested not only in the default configuration, but also in non-blocking mode and with client authentication both turned on/off.
-
Algorithm Testing: The security of our SSL/TLS implementation depends on the correctness and robustness of our underlying cryptography library, wolfCrypt. We test all algorithms using NIST test vectors in addition to running our CAVP test harness used for our FIPS 140-2 validations. We also test on both big and little endian platforms for portability.
-
Benchmark Testing: We engage in another ever expanding universe of benchmark testing, where we look at sizing, transmission rates, connection speeds, and cryptography performance. A version of our benchmark suite is included in every download for users to enjoy!
-
Static Analysis: We do static analysis on our entire codebase using not only one, but multiple different static analysis tools. We currently use Coverity Scan, clang scan-build, and Facebook infer. These tools help us to automatically find bugs including ones on low-traffic code paths.
-
Detecting Memory Errors: We mitigate memory errors by using valgrind on a regular and automated basis. This helps find memory errors including invalid access, use of undefined values, incorrect freeing of dynamic memory, and memory leaks.
-
Interop Testing: We test for interoperability with other Open Source TLS implementations, including OpenSSL, BoringSSL, and GnuTLS. This helps us to catch any protocol implementation errors in either wolfSSL or the implementation being tested against. We also test outside of a closed environment by connecting to servers in the real world running unknown SSL/TLS implementations.
-
Real World Builds: We build with a series of ‘real’ applications, like cURL, wget, pppd, OpenSSH, stunnel, lighttpd, etc. For some of our customers with top level support, we build new releases with their application.
-
Compiler Testing: We have users who compile wolfSSL with a variety of different compilers. As such, we test compiling wolfSSL with many different compilers and toolchains including gcc/g++, clang, icc, Visual Studio, CodeWarrior, KDS, LPCXpresso, MPLAB XC, TI CCS, Keil, IAR, Cygwin, MinGW, CrossWorks, Arduino, Wind River Workbench, and more.
-
Peer Review: More eyes on a codebase reduces bugs that end up in a final product. Internally, we operate using a “Fork and Pull Request” model. This means that every commit that makes it into our master branch has been reviewed and tested by at least two separate engineers.
-
Third Party Testing: Our code is regularly reviewed by university researchers, customer and user security teams, FIPS and certification labs, and our Open Source user base. This helps put more eyes on our code and product architecture.
-
Fuzz Testing: We test using several different software fuzzers, including an in-memory fuzzer, a network fuzzer, OSS-fuzz, libfuzzer, tlsfuzzer, and AFL. Fuzz testing bombards the program with invalid, unexpected, and random data that then allows for observing if there is potential memory leaks or logic errors. This allows us to catch bugs that could turn into potential vulnerabilities if released in a final release.
-
Continuous Integration (CI): Leveraging Jenkins, we run tests on each commit submitted to the wolfSSL code repository. Tests run on each commit include testing of our FIPS build, numerous build options (customer/user/common), running valgrind, and doing static analysis with scan-build.
-
Nightly Test Cycle: Each night we run extended tests that last longer than the typical ones during the work day. These are more in-depth than our CI testing and puts results in our engineers’ inboxes each morning. Some tests included in our nightly cycle include extended build option testing on multiple platforms with multiple compilers, and extended fuzz testing.
If you have specific questions about how we test, please contact us at facts@wolfssl.com. If you would like us to include your SSL/TLS or crypto implementation in our interop testing, please let us know! Likewise, if you would like to include wolfSSL in your own test framework, we would be happy to discuss.
wolfSSL STM32F7 Support
We would like to announce that the wolfSSL embedded SSL library now has support for hardware-based cryptography and random number generation offered by the STM32F7. Supported cryptographic algorithms include AES (CBC, CTR), DES (ECB, CBC), 3DES, MD5, and SHA1. For details regarding the STM32F7 crypto and hash processors, please see the STM32F7 Hardware Abstraction Layer (HAL) and Low-layer drivers document (linked below).
If you are using the STM32F7 with wolfSSL, you can see substantial speed improvements when using the hardware crypto versus using wolfSSL’s software crypto implementation. The following benchmarks were gathered from the wolfCrypt benchmark application (wolfcrypt/benchmark/benchmark.c) running on the STM32F777NI board (STM32F7) using the STM32F7 HAL on bare metal (No OS).
wolfSSL Software Crypto, Normal Big Integer Math Library
RNG 3 MB took 1.000 seconds, 3.149 MB/s
AES-Enc 6 MB took 1.000 seconds, 6.494 MB/s
AES-Dec 7 MB took 1.000 seconds, 6.519 MB/s
AES-GCM-Enc 3 MB took 1.004 seconds, 2.553 MB/s
AES-GCM-Dec 3 MB took 1.004 seconds, 2.553 MB/s
AES-CTR 7 MB took 1.000 seconds, 6.543 MB/s
CHACHA 16 MB took 1.000 seconds, 15.723 MB/s
CHA-POLY 10 MB took 1.000 seconds, 10.474 MB/s
3DES 1 MB took 1.008 seconds, 1.405 MB/s
MD5 24 MB took 1.000 seconds, 24.243 MB/s
POLY1305 42 MB took 1.000 seconds, 41.821 MB/s
SHA 14 MB took 1.000 seconds, 14.380 MB/s
SHA-224 8 MB took 1.000 seconds, 8.423 MB/s
SHA-256 8 MB took 1.000 seconds, 8.423 MB/s
SHA-384 2 MB took 1.000 seconds, 2.319 MB/s
SHA-512 2 MB took 1.000 seconds, 2.319 MB/s
STM32F7 Hardware Crypto, Normal Big Integer Math Library
RNG 6 MB took 1.000 seconds, 6.030 MB/s
AES-Enc 30 MB took 1.000 seconds, 30.396 MB/s
AES-Dec 30 MB took 1.000 seconds, 30.371 MB/s
AES-GCM-Enc 42 MB took 1.000 seconds, 42.261 MB/s
AES-GCM-Dec 33 MB took 1.000 seconds, 32.861 MB/s
AES-CTR 48 MB took 1.000 seconds, 47.827 MB/s
CHACHA 16 MB took 1.000 seconds, 15.747 MB/s
CHA-POLY 11 MB took 1.000 seconds, 10.522 MB/s
3DES 13 MB took 1.000 seconds, 12.988 MB/s
MD5 41 MB took 1.000 seconds, 40.894 MB/s
POLY1305 42 MB took 1.000 seconds, 41.846 MB/s
SHA 38 MB took 1.004 seconds, 38.202 MB/s
SHA-224 41 MB took 1.000 seconds, 41.309 MB/s
SHA-256 39 MB took 1.000 seconds, 39.111 MB/s
SHA-384 2 MB took 1.004 seconds, 2.310 MB/s
SHA-512 2 MB took 1.004 seconds, 2.310 MB/s
As the above benchmarks (and chart) show, the hardware-based algorithms on the STM32F7 demonstrate significantly faster speeds than that of their software counterparts.
To enable STM32F7 hardware crypto and RNG support, define WOLFSSL_STM32F7 when building wolfSSL. For a more complete list of defines which may be required, please see the WOLFSSL_STM32F7 define in <wolfssl_root>/wolfssl/wolfcrypt/settings.h. You can find the most recent version of wolfSSL on GitHub, here: https://github.com/wolfssl/wolfssl.
If you would like to use wolfSSL with STM32F7 hardware-based cryptography or RNG, or have any questions, please contact us at facts@wolfssl.com for more information.
STM32: http://www.st.com/internet/mcu/class/1734.jsp
STM32F7 HAL and Low-layer drivers documentation: http://www.st.com/content/ccc/resource/technical/document/user_manual/45/27/9c/32/76/57/48/b9/DM00189702.pdf/files/DM00189702.pdf/jcr:content/translations/en.DM00189702.pdf
wolfSSL with PikeOS and ElinOS and TLS 1.3
Are you a user of PikeOS or ElinOS, and interested in a lightweight TLS 1.3 implementation? The wolfSSL embedded SSL/TLS library now supports TLS 1.3 (drafts 18 and 20). TLS 1.3 improves performance of establishing TLS connections by reducing the required number of round trips during the TLS handshake (including a new 0-RTT option where applications can send application data in the first flight!). It also increases security by removing old legacy algorithms in favor of new, secure, and performant ones.
If you aren’t familiar with these operating systems, here’s a quick summary via Wikipedia:
“PikeOS is a microkernel-based real-time operating system made by SYSGO AG. It is targeted at safety and security critical embedded systems. It provides a partitioned environment for multiple operating systems with different design goals, safety requirements, or security requirements to coexist in a single machine.”
“ELinOS is a commercial development environment for embedded Linux. It consists of a Linux distribution for the target embedded system and development tools for a development host computer. ELinOS provides embedded Linux as a standalone operating system or it can be integrated into the PikeOS virtualization platform if safety and security demands cannot be met by Linux alone.”
To learn more about how to use wolfSSL with TLS 1.3, you can visit our TLS 1.3 webpage, or contact us at facts@wolfssl.com!
NXP CAU, mmCAU, and LTC Hardware Cryptography with TLS 1.3
As you may know, wolfSSL includes support for offloading cryptography operations into NXP Coldfire and Kinetis devices that include the CAU, mmCAU, or LTC hardware crypto modules. Taking advantage of these modules improves performance of both the cryptography and the SSL/TLS layer running on top of it.
Here is a quick comparison of performance between software cryptography and the hardware-based cryptography offered by the Kinetis mmCAU on a K60 TWR running at 100MHz:
Software Crypto Hardware Crypto
AES 0.49 MB/s 2.71 MB/s
DES 0.31 MB/s 3.49 MB/s
3DES 0.12 MB/s 1.74 MB/s
MD5 4.07 MB/s 4.88 MB/s
SHA-1 1.74 MB/s 2.71 MB/s
SHA-256 1.16 MB/s 2.22 MB/s
HMAC-SHA 1.74 MB/s 3.05 MB/s
HMAC-SHA256 1.22 MB/s 2.03 MB/s
And, here are some benchmark comparisons between software and hardware cryptography offered by the LTC module on a NXP FRDM-K82F, Cortex M4 running at 150 MHz:
Software Crypto Hardware Crypto
RNG 0.136 MB/s 0.939 MB/s
AES enc 0.247 MB/s 12.207 MB/s
AES dec 0.239 MB/s 12.207 MB/s
AES-GCM 0.016 MB/s 12.207 MB/s
AES-CTR 0.247 MB/s 8.138 MB/s
AES-CCM 0.121 MB/s 6.104 MB/s
CHACHA 0.568 MB/s 3.052 MB/s
CHA-POLY 0.444 MB/s 1.878 MB/s
POLY1305 2.441 MB/s 8.138 MB/s
SHA 0.842 MB/s 4.069 MB/s
SHA-256 0.309 MB/s 2.713 MB/s
SHA-384 0.224 MB/s 0.763 MB/s
SHA-512 0.216 MB/s 0.698 MB/s
RSA 2048 public 147.000 ms 12.000 ms (over 1 iteration)
RSA 2048 private 2363.000 ms 135.000 ms (over 1 iteration
ECC 256 key generation 355.400 ms 17.400 ms (over 5 iterations)
EC-DHE key agreement 352.400 ms 15.200 ms (over 5 iterations)
EC-DSA sign time 362.400 ms 20.200 ms (over 5 iterations)
EC-DSA verify time 703.400 ms 33.000 ms (over 5 iterations)
CURVE25519 256 key generation 66.200 ms 14.400 ms (over 5 iterations)
CURVE25519 key agreement 65.400 ms 14.400 ms (over 5 iterations)
ED25519 key generation 25.000 ms 14.800 ms (over 5 iterations)
ED25519 sign time 30.400 ms 16.800 ms (over 5 iterations)
ED25519 verify time 74.400 ms 30.400 ms (over 5 iterations)
Did you know that wolfSSL also now supports TLS 1.3? With TLS 1.3, users also have the ability to use this new protocol version for even better performance for TLS connections!
TLS 1.3 includes several improvements over TLS 1.2, including reducing the number of round trips required to perform a full handshake, and repurposing the ticketing system to allow for servers to be stateless. These changes mean better performance on Freescale/NXP CAU, mmCAU, and LTC-based devices, and lower memory usage on those devices acting as a TLS server.
To learn more about using TLS 1.3 in wolfSSL, visit our TLS 1.3 webpage today!
Microchip PIC32MZ with TLS 1.3
As you may know, wolfSSL includes support for offloading cryptography operations into the PIC32MZ hardware crypto module. This improves performance of both the cryptography and the SSL/TLS layer running on top of it.
Here is a quick comparison of performance between software cryptography and the hardware-based cryptography offered by the PIC32MZ:
Software Crypto Hardware Crypto
AES-CBC 0.26 Mb/s 5.78 Mb/s
AES-CTR 0.69 Mb/s 5.67 Mb/s
3DES 6.19 Mb/s 6.19 Mb/s
MD5 6.22 Mb/s 16.84 Mb/s
SHA-1 3.46 Mb/s 16.65 Mb/s
SHA-256 1.678 Mb/s 15.84 Mb/s
Did you know that wolfSSL also now supports TLS 1.3? With TLS 1.3, users also have the ability to use this new protocol version for even better performance for TLS connections!
TLS 1.3 includes several improvements over TLS 1.2, including reducing the number of round trips required to perform a full handshake, and repurposing the ticketing system to allow for servers to be stateless. These changes mean better performance on PIC32-based devices, and lower memory usage on those PIC32 devices acting as a TLS server.
To learn more about using TLS 1.3 in wolfSSL, visit our TLS 1.3 webpage today!
wolfSSL Package for Arch Linux
Hi! Are you a user of Arch Linux? wolfSSL 3.12.0 is now available as a package in the Arch User Repository!
https://aur.archlinux.org/packages/wolfssl
wolfSSL, written in C, supports industry protocol standards up to TLS 1.3 and DTLS 1.2 and progressive ciphers including ChaCha20, Poly1305, Curve25519, Ed25519, and SHA-3. We encourage you to give our package a try and let us know what you think!
For help getting started with wolfSSL and wolfCrypt, see:
wolfSSL FIPS with Intel® SGX
wolfSSL supports use with Intel® SGX on both Windows and Linux. In addition to being available on both operating systems the Linux example includes running a full TLS connection in a secure Enclave. Examples can be found on GitHub under wolfssl/wolfssl-examples located here (https://github.com/wolfSSL/wolfssl-examples). One of the exciting upcoming features this year, is that wolfSSL is planning to be FIPS certified while running inside a secure Enclave.
If there are questions about current support or the future roadmap feel free to let us know at facts@wolfssl.com.
wolfCrypt FIPS 140-2 on ARM
Do you need a FIPS 140-2 validated cryptography library for your ARM-based platform? wolfCrypt has been FIPS 140-2 validated on several different operating environments to date, some of which have been on resource-constrained ARM-based devices.
FIPS validating a crypto library on a resource-constrained device can be more involved than doing a validation on a standard desktop-like platform. Variances in OS, Flash/RAM, filesystem (or lack of), entropy, communication, and more can make things interesting. Going through our past ARM-based validations, we have figured out how to make this process easier with wolfCrypt!
If you are interested in exploring FIPS 140-2 cryptography validations on ARM platforms, reach out to us at facts@wolfssl.com!
Weekly updates
Archives
- March 2025 (6)
- February 2025 (21)
- January 2025 (23)
- December 2024 (22)
- November 2024 (29)
- October 2024 (18)
- September 2024 (21)
- August 2024 (24)
- July 2024 (27)
- June 2024 (22)
- May 2024 (28)
- April 2024 (29)
- March 2024 (21)
- February 2024 (18)
- January 2024 (21)
- December 2023 (20)
- November 2023 (20)
- October 2023 (23)
- September 2023 (17)
- August 2023 (25)
- July 2023 (39)
- June 2023 (13)
- May 2023 (11)
- April 2023 (6)
- March 2023 (23)
- February 2023 (7)
- January 2023 (7)
- December 2022 (15)
- November 2022 (11)
- October 2022 (8)
- September 2022 (7)
- August 2022 (12)
- July 2022 (7)
- June 2022 (14)
- May 2022 (10)
- April 2022 (11)
- March 2022 (12)
- February 2022 (22)
- January 2022 (12)
- December 2021 (13)
- November 2021 (27)
- October 2021 (11)
- September 2021 (14)
- August 2021 (10)
- July 2021 (16)
- June 2021 (13)
- May 2021 (9)
- April 2021 (13)
- March 2021 (24)
- February 2021 (22)
- January 2021 (18)
- December 2020 (19)
- November 2020 (11)
- October 2020 (3)
- September 2020 (20)
- August 2020 (11)
- July 2020 (7)
- June 2020 (14)
- May 2020 (13)
- April 2020 (14)
- March 2020 (4)
- February 2020 (21)
- January 2020 (18)
- December 2019 (7)
- November 2019 (16)
- October 2019 (14)
- September 2019 (18)
- August 2019 (16)
- July 2019 (8)
- June 2019 (9)
- May 2019 (28)
- April 2019 (27)
- March 2019 (15)
- February 2019 (10)
- January 2019 (16)
- December 2018 (24)
- November 2018 (9)
- October 2018 (15)
- September 2018 (15)
- August 2018 (5)
- July 2018 (15)
- June 2018 (29)
- May 2018 (12)
- April 2018 (6)
- March 2018 (18)
- February 2018 (6)
- January 2018 (11)
- December 2017 (5)
- November 2017 (12)
- October 2017 (5)
- September 2017 (7)
- August 2017 (6)
- July 2017 (11)
- June 2017 (7)
- May 2017 (9)
- April 2017 (5)
- March 2017 (6)
- January 2017 (8)
- December 2016 (2)
- November 2016 (1)
- October 2016 (15)
- September 2016 (6)
- August 2016 (5)
- July 2016 (4)
- June 2016 (9)
- May 2016 (4)
- April 2016 (4)
- March 2016 (4)
- February 2016 (9)
- January 2016 (6)
- December 2015 (4)
- November 2015 (6)
- October 2015 (5)
- September 2015 (5)
- August 2015 (8)
- July 2015 (7)
- June 2015 (9)
- May 2015 (1)
- April 2015 (4)
- March 2015 (12)
- January 2015 (4)
- December 2014 (6)
- November 2014 (3)
- October 2014 (1)
- September 2014 (11)
- August 2014 (5)
- July 2014 (9)
- June 2014 (10)
- May 2014 (5)
- April 2014 (9)
- February 2014 (3)
- January 2014 (5)
- December 2013 (7)
- November 2013 (4)
- October 2013 (7)
- September 2013 (3)
- August 2013 (9)
- July 2013 (7)
- June 2013 (4)
- May 2013 (7)
- April 2013 (4)
- March 2013 (2)
- February 2013 (3)
- January 2013 (8)
- December 2012 (12)
- November 2012 (5)
- October 2012 (7)
- September 2012 (3)
- August 2012 (6)
- July 2012 (4)
- June 2012 (3)
- May 2012 (4)
- April 2012 (6)
- March 2012 (2)
- February 2012 (5)
- January 2012 (7)
- December 2011 (5)
- November 2011 (7)
- October 2011 (5)
- September 2011 (6)
- August 2011 (5)
- July 2011 (2)
- June 2011 (7)
- May 2011 (11)
- April 2011 (4)
- March 2011 (12)
- February 2011 (7)
- January 2011 (11)
- December 2010 (17)
- November 2010 (12)
- October 2010 (11)
- September 2010 (9)
- August 2010 (20)
- July 2010 (12)
- June 2010 (7)
- May 2010 (1)
- January 2010 (2)
- November 2009 (2)
- October 2009 (1)
- September 2009 (1)
- May 2009 (1)
- February 2009 (1)
- January 2009 (1)
- December 2008 (1)