wolfSSL Example Applications

wolfSSL has some example applications located in a GitHub repository that many users find helpful when getting started with using wolfSSL. Some of the example applications cover using wolfSSL with Android, µTasker, X509 field extraction, and DTLS.

Below are some more details on the examples provided by wolfSSL:

  • android (Android NDK)
    This directory contains examples that demonstrate using wolfSSL and wolfSSLJNI on the Android platform, using the Android NDK toolchain.
  • btle
    This directory contains examples for securing a Bluetooth Low Energy Link (BTLE). BTLE packets are small and throughput is low, so these examples demonstrate a way to exchange data securley without BTLE pairing.
  • certfields (X509 field extraction)
    This directory contains an example that demonstrate using the wolfSSL to read a DER encoded certificate and extract the public key and subject name information.
  • certgen
    Contains examples on how to generate and sign certificates
  • certmanager (wolfSSL CertManager)
    This directory contains examples that demonstrate using the wolfSSL CertManager (Certificate Manager) functionality.
  • crypto
    The Crypto directory contains example applications showing how to perform 3DES, AES, Camellia, PKCS#12 encryption, and ECC key storage/loading.
  • custom-io-callbacks
    This directory demonstrates how the custom IO callbacks can be used to facilitate a TLS connection using any medium.
  • dtls (Datagram TLS)
    This directory contains examples of using DTLS, with client and server examples demonstrating UDP, DTLS, non-blocking, session resumption, and multi-threading.
  • ecc
    Various Elliptic Curve Cryptography (ECC) examples including signing, verifying, decoding, and more.
  • pkcs7
    PKCS7 verification example
  • psk
    This directory contains examples of using PSK, with client and server examples demonstrating TCP/IP, PSK, non-blocking, session resumption, and multi-threading.
  • SGX_Linux
    This directory contains an example application, written in C, which demonstrates how to link with the wolfSSL lightweight SSL/TLS library with a simple Enclave using Linux.
  • SGX_Windows
    This directory contains an example application, written in C, which demonstrates how to link with the wolfSSL lightweight SSL/TLS library with a simple Enclave using Windows.
  • signature
    This directory contains a simple example of using wolfSSL to sign and verify binary data. It supports RSA and ECC for signing and MD2, MD4, MD5, SHA, SHA256, SHA384 and SHA512.
  • tls
    This directory contains examples of using SSL/TLS, with client and server examples demonstrating TCP/IP, SSL/TLS, non-blocking, session resumption, and multi-threading.
  • utasker (µTasker wolfSSL example tasks)
    Example µTasker client and server tasks that demonstrate using wolfSSL with the µTasker stack. These have been tested on the µTasker Simulator.
  • wolfCLU (wolfSSL Command Line Utility)
    This is a tool to provide command line access to wolfcrypt cryptographic libraries. wolfSSL command line utility will allow users to encrypt or decrypt a user specified file to any file name and extension.

The wolfSSL example applications can be downloaded using a git-clone command from the GitHub repository here: https://github.com/wolfSSL/wolfssl-examples

In addition, the README contains extra information about each example application and can be viewed here: https://github.com/wolfSSL/wolfssl-examples/blob/master/README.md. Some of the example application directories may also include an extra README as well, if the steps to run the examples are more complex.

If having trouble, feel free to contact support or view more information on contacting the wolfSSL team here: https://www.wolfssl.com/contact/.

Upcoming wolfTPM Support for ST33 TPM 2.0

wolfSSL will soon be adding support for the ST33 secure microcontroller to wolfTPM!  The ST33 includes an ARM® SecurCore® SC300 32-bit RISC processor, which provides a Secure Element.  From the ST33 webpage:

The device features hardware accelerators for advanced cryptographic functions. The EDES peripheral provides a secure DES (Data Encryption Standard) algorithm implementation, while the NESCRYPT cryptoprocessor efficiently supports the public key algorithm. The AES peripheral ensures secure and fast AES algorithm implementation.

If you are interested in using wolfTPM in your project, or using wolfTPM with the STM33 or ARM® SecurCore® SC300, contact us today at facts@wolfssl.com!  In recent news, wolfSSL recently released a new version of wolfTPM that now supports TLS from the wolfSSL embedded SSL/TLS library.  Learn more here!

Announcing wolfTPM v1.3 with TLS support

We are excited to announce wolfTPM v1.3, which adds support for TLS client, Certificate Signing Request (CSR) generation, PKCS #7 signing and verification and benchmarks. In addition to the features listed this release fixes some minor issues and adds in more wrappers for simplifying usage.

You can download the latest release from our website here:
https://www.wolfssl.com/products/wolftpm/

wolfTPM v1.3 (07/20/2018) Release Notes:

  • Fixed the TIS TPM_BASE_ADDRESS to conform to specification.
  • Fixed static analysis warnings.
  • Fixed minor build warnings with different compilers.
  • Fixed TPM failure for RSA exponents less than 7 by using software based RSA.
  • Added TPM benchmarking support.
  • Added functions to import/export public keys as wolf format.
  • Added PKCS7 example to show sign/verify with TPM.
  • Added CSR example to generate certificate request based on TPM key.
  • Added CSR signing script ./certs/certreq.sh to create certificate using self-signed CA.
  • Added TLS Client example that uses TPM based key for client certificate.
  • Added support for wolfSSL WOLF_CRYPT_DEV callbacks to enable TPM based ECC and RSA private keys.
  • Added ability to clear/reset TPM using ./examples/wrap/wrap_test 1
  • Moved some of the example configuration into ./examples/tpm_io.h.

For questions please email us at facts@wolfssl.com.

wolfSSL Enables Gesytec to Easily Secure Communications Between Embedded Systems and the Cloud

Gesytec, a global leader in LON interfaces, provides worldwide software and hardware development solutions that focus on the improvement of industrial automation in industries such as restaurants, gas stations, hotels, grocery stores, and food distribution companies. One of Gesytec’s products, the GesySense Receiver \LAN is a device that consists of an embedded system that works to collect and record temperature statistics and relay them to a web-based user platform over a wireless network.

In order to avoid the compromise of data and to prevent potential attacks on the network, it became mandatory that the GesySense device data would need to be encrypted. As Gesytec was using Microchip’s PIC32MX boards, the cryptographic library they required needed to be very efficient in terms of resource usage. After thorough research, Gesytec landed at the conclusion that wolfSSL’s SSL/TLS library would be exactly what they wanted to secure the data from the GesySense device to the web-based platform.

To discover the reasons behind why wolfSSL was the optimal solution for Gesytec, please view the wolfSSL/Gesytec case study on our case studies page.

To learn more about Gesytec and their products, feel free to visit their website or contact them at info@gesytec.com.

For questions regarding the use of wolfSSL products in your embedded or IoT devices, please contact us at facts@wolfssl.com.

TLS 1.3 is now available in wolfSSL's embedded SSL/TLS library! Learn more here and don't forget to check out our product page.

wolfTPM Now Tested Nightly with Infineon OPTIGA (TM) Trusted Platform Module 2.0 SLB 9670

wolfTPM is a portable TPM 2.0 project designed for embedded use.

We have expanded our automated tests to ensure hardware support and functionality for wolfTPM in our commitment to having the best tested cryptography product lineup.  Our Jenkins CI setup now tests the following build configuration every night!

Testing Hardware Setup

  • Raspberry Pi 2 Model B Rev 1.2 (ARMv7 Processor rev 4 (v7l))
  • Infineon OPTIGA (TM) Trusted Platform Module 2.0 SLB 967 (IRIDIUM9670 TPM2.0 LINUX).

wolfTPM Features

  • This implementation provides all TPM 2.0 API’s in compliance with the specification.
  • This uses the TPM Interface Specification (TIS) to communicate over SPI.
  • The design allows for easy portability to different platforms:
  • Native C code designed for embedded use.
  • Single IO callback for hardware SPI interface.
  • No external dependencies.
  • Compact code size and minimal memory use.
  • Examples for the Raspberry Pi and STM32 with CubeMX.
  • Includes example code for most TPM2 native API’s.
  • Includes wrappers for Key Generation, RSA encrypt/decrypt, ECC sign/verify and ECDH.
  • Testing done using the Infineon OPTIGA SLB9670 module and LetsTrust TPM for Raspberry Pi.

Check out how to quickly build wolfSSL and wolfTPM on GitHub.
https://github.com/wolfSSL/wolfTPM

For examples on using the wolfTPM library check out the wrapper and native tests.
https://github.com/wolfSSL/wolfTPM/blob/master/examples/wrap/wrap_test.c
https://github.com/wolfSSL/wolfTPM/blob/master/examples/native/native_test.c

Please send any feedback or questions to us at facts@wolfssl.com

wolfCrypt JCE Provider Now Tested with Google Project Wycheproof

wolfCrypt JNI provides a Java, JNI-based wrapper to the native wolfCrypt API and implements wolfJCE as a JCE provider for Java’s built in security packages. wolfSSL is committed to providing the best tested cryptography available, and as such have expanded our automated testing of wolfCrypt JNI and JCE.  Both FIPS 140-2 and non-FIPS builds of wolfCrypt JNI and wolfJCE are tested nightly through our Jenkins CI, with JUnit and Project Wycheproof unit tests.

Project Wycheproof is a test suite developed and maintained by the Google Security Team. Their unit tests use Java security packages (java.security and javax.crypto) to allow for multiple JCA/JCE provider implementations to be tested, including wolfJCE. Over 80 of their unit tests attempt to detect unexpected behavior, vulnerabilities to attacks, and other known weaknesses.

wolfSSL has confidence in having high quality security software built on a foundation of continuously expanding unit tests.

Please send any feedback or questions to us at facts@wolfssl.com.

wolfCrypt-JNI
Download: https://wolfssl.com/download
GitHub: https://github.com/wolfSSL/wolfcrypt-jni
Manual: https://www.wolfssl.com/docs/wolfcrypt-jni-jce-manual

Project Wycheproof
GitHub: https://github.com/google/wycheproof

And a shout out to Project Wycheproof maintainers:

  • Daniel Bleichenbacher
  • Thai Duong
  • Emilia Kasper
  • Quan Nguyen

wolfSSL and NGINX

Hi!  We have been asked a number of times about wolfSSL integration with the nginx web server.  If you are not familiar with Nginx, it is a high performance, high concurrency web server that is becoming extremely popular these days.  You can learn more about nginx at nginx.com.

nginx and wolfSSL make a likely pairing because they are both lean, compact, fast, and scale well under high volumes of connections.  The big news today is that wolfSSL + nginx is available in a public GitHub repository!  We have added a new configure option “–enable-nginx” which will compile the wolfSSL libraries with nginx support.

For more info please contact us today facts@wolfssl.com!

wolfSSL repository for FreeRTOS classic and Amazon FreeRTOS

We have created a new repository for hosting the FreeRTOS classic and Amazon FreeRTOS support for wolfSSL located here:
https://github.com/wolfSSL/wolfssl-freertos

There are two pull requests with support for wolfSSL including demos:

FreeRTOS Classic v10.0.1 with wolfSSL/wolfMQTT demos:
https://github.com/wolfSSL/wolfssl-freertos/pull/1

  • Added a wolfMQTT FreeRTOS TCP demo. This demo connects to the iot.eclipse.org MQTT broker with TLS on port 8883. It sends a counter publish message every second.
  • Updated wolfSSL demo:
  • Project built and tested against latest v3.14.4 release.
  • Switched to using user_settings.h (WOLFSSL_USER_SETTINGS).
  • Updated the certs (expired Jan 31, 2018).
  • Stop tracking the .filter project file.
  • Add submodule for wolfMQTT v1.0 plus FreeRTOS TCP support.
  • Replace wolfSSL sources with submodule wolfSSL v3.14.4 plus some Win VS fixes.
  • Initial FreeRTOS v10.0.1

Amazon FreeRTOS v1.2.3 port to use wolfSSL:
https://github.com/wolfSSL/wolfssl-freertos/pull/2

  • Port of the Amazon FreeRTOS v1.2.3 to use wolfSSL.
  • Added a new solution and project for demo at FreeRTOS-AWS/demos/pc/windows/visual_studio/aws_demo_wolf.sln.
  • Added wolfssl as submodule.

Using wolfSSL and wolfCrypt from Java

Are you a Java developer looking for a industry-leading SSL/TLS and crypto implementation?  If so, you’re in luck!  wolfSSL provides has several options for you to use the native wolfSSL embedded SSL/TLS library and wolfCrypt cryptography libraries from Java.

wolfSSL TLS from Java

wolfSSL packages and maintains a JNI wrapper around the native C wolfSSL SSL/TLS library.  This wrapper encapsulates the SSL/TLS functionality of wolfSSL to be used from Java applications.

This wrapper is a thin wrapper around the native wolfSSL C API.  wolfSSL does not currently have a pluggable TLS-level JSSE provider.  If this is something you are interested in, please contact us at facts@wolfssl.com!  wolfSSL does offer a wolfCrypt-level pluggable JCE provider (see section below).

Full documentation on the wolfSSL JNI wrapper can be found here:  wolfSSL JNI Manual

wolfSSL JNI ships with both a client and server example to make plugging it into a Java application easy!

wolfCrypt Cryptography from Java

wolfSSL packages and maintains a JNI wrapper and JCE provider for the native C wolfCrypt library.  The “wolfcrypt-jni” package contains both a thin wolfCrypt JNI wrapper around the native C library as well as a pluggable wolfCrypt JCE provider.

Both of the following wrappers can be used with either normal wolfCrypt or wolfCrypt FIPS for those users who require a FIPS 140-2 validated cryptography library.

wolfCrypt JNI Wrapper

This wrapper is a thin wrapper around the native C wolfCrypt API.  It is designed for users who want to use wolfCrypt directly from a Java application, but do not want to go through the default Java Security API.

wolfCrypt JCE Provider

The JCE (Java Cryptographic Extension) framework supports the installation of custom Cryptographic Service Providers which can implement a subset of the cryptographic functionality used by the Java Security API.

The wolfCrypt JCE provider has been tested with several different JDK variants, including OpenJDK, Oracle JDK, and Android. It also ships with pre-signed JAR files for use with Oracle JDK versions that will correctly verify JCE provider classes.  OpenJDK does not have the requirement that JCE provider JAR’s be signed.

Classes and algorithms currently supported by the wolfCrypt JCE Provider:

Java Security ClassSupported Algorithms
java.security.MessageDigestMD5, SHA-1, SHA-256, SHA-384, SHA-512
java.security.SecureRandomHashDRBG
javax.crypto.CipherAES/CBC/NoPadding
DESede/CBC/NoPadding
RSA/ECB/PKCS1Padding
javax.crypto.MacHmacMD5, HmacSHA1, HmacSHA256, HmacSHA384, HmacSHA512
java.security.SignatureMD5withRSA, SHA1withRSA, SHA256withRSA, SHA384withRSA, SHA512withRSA
SHA1withECDSA, SHA256withECDSA, SHA384withECDSA, SHA512withECDSA
javax.crypto.KeyAgreementDiffieHellman, DH, ECDH
java.security.KeyPairGeneratorEC, DH

You can download wolfSSL JNI as well as the wolfCrypt JNI wrapper and JCE provider from the wolfSSL download page.  Please send any feedback or questions to us at facts@wolfssl.com.

TLS 1.3 combined with FIPS (#FIPS #TLS13)

For 2018, it's predicted that there will be more than 31 billion connectable IoT devices across the world. To put that number into perspective, imagine if every square mile on the Earth's surface was monitored by more than 150 IoT devices each. If this were square kilometers, there would be more than 60 IoT devices per square kilometer. With 31 billion devices potentially contributing to global internet traffic, this reveals a glaring need for an efficient and powerful way to secure data - and wolfSSL is the perfect solution.

wolfSSL is a lightweight TLS/SSL library that is targeted for embedded devices and systems. It has support for the most recent draft of the TLS 1.3 protocol, which is a secure protocol for transporting data between devices and across the internet. In addition, wolfSSL uses the wolfCrypt encryption library to handle its data encryption. Because there is a FIPS 140-2 validated version of wolfCrypt, this means that wolfSSL not only has support for the most current version of TLS, but it also has the encryption backbone to secure your data. FIPS 140-2 is a government certification that certifies that an encryption module has successfully passed rigorous testing and meets high encryption standards as specified by NIST.

Currently, wolfSSL is the only implementation of the TLS protocol that can support both the most recent version of TLS 1.3 and is FIPS 140-2 validated.

Some key benefits of combining TLS 1.3 with FIPS validated software include:

  1. Software becomes marketable to federal agencies - without FIPS, a federal agency is not able to use cryptographic-based software
  2. Single round trip
  3. 0-RTT (a mode that enable zero round trip time)
  4. After Server Hello, all handshake messages are encrypted.

And much more! For more information regarding the benefits of using TLS 1.3 or using the FIPS validated version of wolfCrypt, check out wolfSSL's TLS 1.3 Protocol Support and our wolfCrypt FIPS page.

For more details about wolfSSL, TLS 1.3, or if you have any other general inquiries please contact facts@wolfssl.com
To find out more about FIPS, check out the NIST FIPS publications or contact fips@wolfssl.com

Posts navigation

1 2