How to make your TPM talk PKCS11

wolfSSL has implemented our own PKCS11 provider library to leverage cryptographic hardware and keystores on various systems. Recently we added support for using a TPM 2.0 module with wolfTPM (see pull request #23). We believe that this functionality is particularly useful for users that have coded to the PKCS11 standard, but need to switch to a TPM or fTPM.

The wolfTPM and wolfPKCS11 libraries are both fully portable to any RTOS or embedded system, including bare-metal. The PKCS11 interface provides a standardized API set for making cryptographic calls to a hardware module. All TPM’s support RSA and ECC keys, so when using a TPM only those two asymmetric algorithms are supported.

Our example PKCS11 applications can run on any Linux or Windows that have a TPM available. If a TPM is not available you can use the TPM simulators (see SWTPM.md). We have also successfully ported it to a bare-metal STM32 target for testing.

A TPM offers physical protection of all private keys and benefits from the TPM performance when doing asymmetric operations like signing, verification or shared secrets. All communication to the TPM uses the parameter encryption feature with AES CFB mode.

If desired the PKCS11 keystore can use the TPM NV for storing the encrypted key material.

Typical implementation including TLS support:

If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

Download wolfSSL Now

wolfMQTT Releases v1.18.0

The Christmas release of wolfMQTT, v1.18.0, is now available! This release has several bug fixes and optimizations including:

Release 1.18.0 has been developed according to wolfSSL’s development and QA process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance

Check out the changelog from the download for a full list of features and fixes, or contact us at facts@wolfssl.com with any questions: https://github.com/wolfSSL/wolfMQTT/blob/master/ChangeLog.md

While you’re there, show us some love and give the wolfMQTT project a Star!

Download the latest release or clone directly from our GitHub repository today.

If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

Download wolfSSL Now

wolfSSH 1.4.15 Now Available!

Merry Christmas! The Christmas release of wolfSSH is here, version 1.4.15!

Version 1.4.15 brings with it a fix for a vulnerability, bug fixes, new features, and some enhancements as well! For a description of vulnerabilities fixed, please see our vulnerability page. New features in this release include a wolfSSH client application, support for OpenSSH-style keys, and Zephyr RTOS builds.

We also have a nice round of enhancements which range from better testing, improved portability, terminal enhancements (run vim or tmux!), and more!

A list of new features and enhancements from our ChangeLog is listed below. For a full list of fixes see our complete ChangeLog on GitHub.

Vulnerability Fix

  • Fixes a potential vulnerability described in the paper “Passive SSH Key Compromise via Lattices”. While the misbehavior described hasn’t been observed in wolfSSH, the fix is now implemented. The RSA signature is verified before sending to the peer.

    • Keegan Ryan, Kaiwen He, George Arnold Sullivan, and Nadia Heninger. 2023. Passive SSH Key Compromise via Lattices. Cryptology ePrint Archive, Report 2023/1711. https://eprint.iacr.org/2023/1711.

New Features

  • Added wolfSSH client application.
  • Added support for OpenSSH-style private keys, like those made by ssh-keygen.
  • Added support for the Zephyr RTOS.
  • Added support for multiple authentication schemes in the userauth callback with the error response WOLFSSH_USERAUTH_PARTIAL_SUCCESS.

Improvements

  • Allow override of default sshd user name at build.
  • Do not attempt to copy device files. The client won’t ask, and the server won’t do it.
  • Added more wolfSSHd tests.
  • Portability updates.
  • Terminal updates for shell connections to wolfSSHd, including window size updates.
  • QNX support updates.
  • Windows file support updates for SFTP and SCP.
  • Allow for longer command strings in wolfSSHd.
  • Tweaked some select timeouts in the echoserver.
  • Add some type size checks to configure.
  • Update for changes in wolfSSL’s threading wrappers.
  • Updates for Espressif support and testing.
  • Speed improvements for SFTP. (Fixed unnecessary waiting.)
  • Windows wolfSSHd improvements.
  • The functions wolfSSH_ReadKey_file() and wolfSSH_ReadKey_buffer() handle more encodings.
  • Add function to supply new protocol ID string.
  • Support larger RSA keys.
  • MinGW support updates.
  • Update file use W-macro wrappers with a filesystem parameter.
  • Fixes

    • When setting the file permissions for a file in Zephyr, use the correct permission constants.
    • Fix buffer issue in DoReceive() on some edge failure conditions.
    • Prevent wolfSSHd zombie processes.
    • Fixed a few references to the heap variable for user supplied memory allocation functions.
    • Fixed an index update when verifying the server’s RSA signature during KEX.
    • Fixed some of the guards around optional code.
    • Fixed some would-block cases when using non-blocking sockets in the examples.
    • Fixed some compile issues with liboqs.
    • Fix for interop issue with OpenSSH when using AES-CTR.

    Visit our download page or wolfSSH GitHub repository to download the release bundle, and feel free to email us at facts@wolfSSL.com or support@wolfssl.com, or call us at +1 425 245 8247 with any questions about the wolfSSH embedded SSH library or other products.

    Download wolfSSL Now

    Live Webinar: Getting Started with wolfSSL in 2024

    Welcome to our exclusive webinar, ‘Getting Started with wolfSSL in 2024’. Join us for an insightful session presented by Chris Conlon, wolfSSL Engineering Manager. Scheduled for January 4th at 9 am PT, this webinar is your gateway to mastering wolfSSL, the ultimate Embedded SSL/TLS Library for IoT device security, advanced encryption algorithms and much more.

    wolfSSL has earned a reputation for high-quality, portable, and embedded security software, securing over 2 billion applications and devices.

    Watch the webinar here: Getting Started with wolfSSL in 2024

    Chris will delve into a wide array of topics:

    • Overview of TLS 1.3
    • wolfSSL package structure
    • Building wolfSSL
    • wolfCrypt Test and Benchmark Applications
    • wolfSSL basic API usage
    • Tips on debugging
      And much more

    This is your chance to grasp the essential details of utilizing wolfSSL, learning its fundamentals, and discovering the best practices for leveraging wolfSSL throughout 2024.

    Watch it now!

    If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

    Download wolfSSL Now

    wolfTPM Support for Encrypting Secrets with ECC

    wolfTPM is a portable TPM 2.0 stack with backward API compatibility designed for embedded use, and the newly released wolfTPM v3.0.0 includes support for encrypting secrets with ECC keys.

    TPM’s encrypt secrets to prevent their disclosure to unauthorized entities. And whereas encryption with RSA keys was already supported in wolfTPM, users now have the option to leverage ECC keys.

    This enables using an ECC primary key together with an authenticated session to enable parameter encryption of sensitive data. The TCG specification defines the method for using ECDH and a custom KDF to derive a shared secret between the host and the TPM device to be used for parameter encryption with AES CFB or XOR.

    wolfTPM already has full support for using ECC keys in the TPM for signing/verification (ECDSA) and shared secret ECDH(E) using TPM API’s.

    Finally, don’t forget that if you are intent on adding a TPM to an embedded MCU or MPU design, wolfTPM is the obvious choice, as it runs on everything from bare metal to FreeRTOS, VxWorks, Integrity, QNX, and many others! You can also expect wolfTPM to get qualified for DO-178 in the coming year.

    Contact us at facts@wolfSSL.com or call us at +1 425 245 8247 with any questions, comments or suggestions.

    Download wolfSSL Now

    wolfSSL 5.6.6 Now Available!

    Merry Christmas! The Christmas release of wolfSSL is here, version 5.6.6!

    Version 5.6.6 brings with it fixes for 4 vulnerabilities, bug fixes, new features, and some enhancements as well! For a description of vulnerabilities fixed, please see our vulnerability page. New features in this release include support for additional hardware devices (STM32WL55), new hardware encryption support for ESP32 devices (ESP32-C3, ESP32-C6, ESP32-S2), improved DTLS 1.3 session resumption support, new implementation of SRTP-KDF and SRTCP-KDF, a cache-attack safe bitslice implementation of AES, and support for memcached.

    We also have a nice round of enhancements which range from better testing, disabling TLS 1.1 by default, expanded CMake build support, optimizations and new assembly for our speedy SP math library, and more!

    A list of new features and enhancements from our ChangeLog is listed below. For a full list of fixes see our complete ChangeLog on GitHub.

    New Feature Additions

    • Build option for disabling CRL date checks (WOLFSSL_NO_CRL_DATE_CHECK) (PR 6927)
    • Support for STM32WL55 and improvements to PKA ECC support (PR 6937)
    • Add option to skip cookie exchange on DTLS 1.3 session resumption (PR 6929)
    • Add implementation of SRTP KDF and SRTCP KDF (–enable-srtp-kdf) (PR 6888)
    • Add wolfSSL_EXTENDED_KEY_USAGE_free() (PR 6916)
    • Add AES bitsliced implementation that is cache attack safe (–enable-aes-bitsliced) (PR 6854)
    • Add memcached support and automated testing (PR 6430, 7022)
    • Add Hardware Encryption Acceleration for ESP32-C3, ESP32-C6, and ESP32-S2 (PR 6990)
    • Add (D)TLS 1.3 support for 0.5-RTT data (PR 7010)

    Enhancements and Optimizations

    • Better built in testing of “–sys-ca-certs” configure option (PR 6910)
    • Updated CMakeLists.txt for Espressif wolfSSL component usage (PR 6877)
    • Disable TLS 1.1 by default (unless SSL 3.0 or TLS 1.0 is enabled) (PR 6946)
    • Add “–enable-quic” to “–enable-all” configure option (PR 6957)
    • Add support to SP C implementation for RSA exponent up to 64-bits (PR 6959)
    • Add result of “HAVE___UINT128_T” to options.h for CMake builds (PR 6965)
    • Add optimized assembly for AES-GCM on ARM64 using hardware crypto instructions (PR 6967)
    • Add built-in cipher suite tests for DTLS 1.3 PQC (PR 6952)
    • Add wolfCrypt test and unit test to ctest (PR 6977)
    • Move OpenSSL compatibility crypto APIs into ssl_crypto.c file (PR 6935)
    • Validate time generated from XGMTIME() (PR 6958)
    • Allow wolfCrypt benchmark to run with microsecond accuracy (PR 6868)
    • Add GitHub Actions testing with nginx 1.24.0 (PR 6982)
    • Allow encoding of CA:FALSE BasicConstraint during cert generation (PR 6953)
    • Add CMake option to enable DTLS-SRTP (PR 6991)
    • Add CMake options for enabling QUIC and cURL (PR 7049)
    • Improve RSA blinding to make code more constant time (PR 6955)
    • Refactor AES-NI implementation macros to allow dynamic fallback to C (PR 6981)
    • Default to native Windows threading API on MinGW (PR 7015)
    • Return better error codes from OCSP response check (PR 7028)
    • Updated Espressif ESP32 TLS client and server examples (PR 6844)
    • Add/clean up support for ESP-IDF v5.1 for a variety of ESP32 chips (PR 7035, 7037)
    • Add API to choose dynamic certs based on client ciphers/sigalgs (PR 6963)
    • Improve Arduino IDE 1.5 project file to match recursive style (PR 7007)
    • Simplify and improve apple-universal build script (PR 7025)

    Visit our download page or wolfSSL GitHub repository to download the release bundle. If you have questions about any of the above, feel free to email us at facts@wolfSSL.com or support@wolfSSL.com, or call us at +1 425 245 8247 regarding the wolfSSL embedded SSL/TLS library or any other products.

    Download wolfSSL Now

    wolfSSL on Pi5 Benchmarks

    We at wolfSSL have worked hard to provide exceptional performance for our libraries across all platforms, but we’ve taken extra measures for Intel, ARM, RISC-V and PPC. For common key sizes and curves we’ve implemented inline assembly speedups for most algorithms.

    For example on the new Raspberry Pi5 with a Cortex A57 at 2.4GHz (default) running on a single thread we achieve the following benchmark results on wolfSSL v5.6.4:

    Algorithm key size operation avg ms ops/sec
    RSA 2048 sign 3.387 295.244
    RSA 3072 sign 9.984 100.159
    RSA 4096 sign 21.742 45.995
    RSA 2048 verify 0.079 12646.826
    RSA 3072 verify 0.174 5744.265
    RSA 4096 verify 0.293 3415.934
    ECDHE 256 agree 0.158 6316.186
    ECDHE 384 agree 0.561 1783.881
    ECDHE 521 agree 1.296 771.642
    ECDSA 256 sign 0.066 15179.234
    ECDSA 384 sign 0.225 4436.137
    ECDSA 521 sign 0.584 1712.349
    ECDSA 256 verify 0.169 5925.511
    ECDSA 384 verify 0.598 1672.345
    ECDSA 521 verify 1.4 714.378
    CURVE 25519 agree 0.146 6864.489
    CURVE 448 agree 0.565 1770.784
    ED 25519 sign 0.045 22223.907
    ED 448 sign 0.232 4301.478
    ED 25519 verify 0.166 6018.073
    ED 448 verify 0.691 1448.119

    Note: Above ECC curves are SECP256R1, SECP384R1 and SECP521R1.

    Obtained using:

    ./configure --disable-shared --enable-sp=yes,asm --enable-armasm --enable-keygen --enable-curve25519 --enable-ed25519 --enable-curve448 --enable-ed448
    make
    ./wolfcrypt/benchmark/benchmark -rsa -rsa_sign -ecc -p256
    ./wolfcrypt/benchmark/benchmark -rsa-sz 3072 -rsa_sign -ecc -p384
    ./wolfcrypt/benchmark/benchmark -rsa-sz 4096 -rsa_sign -ecc -p521
    ./wolfcrypt/benchmark/benchmark -x25519 -ed25519 -x448 -ed448
    

    If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

    Download wolfSSL Now

    wolfTPM STM32Cube Expansion Package for STM32 is now available!

    wolfTPM is a portable TPM 2.0 stack with backward API compatibility designed for embedded use, and with the new STM32Cube Expansion Pack, STM32 developers are given a smooth sailing route to wolfTPM integration.

    wolfTPM has had HAL IO Callback examples for STM32CubeMX for a while now, and supports SPI and out-of-the-box I2C for STM32CubeMX projects. The STM32Cube Pack grants easy access to wolfTPM’s features on the STM32. Some of the key features are RSA & ECC encrypt/decrypt, Key Generation/Loading, Sealing/Unsealing, Attestation, PCR Extend/Quote and Secure Root of Trust.

    Download the new STM32Cube Pack from https://www.wolfssl.com/files/ide/I-CUBE-wolfTPM.pack and follow the documentation here to get started.

    You can also reference this webinar for more insight on running wolfSSL on STM32 hardware. How to use wolfSSL software expansion for STM32Cube

    If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

    Download wolfSSL Now

    Live Webinar: Security in Avionics – Tiger Lake and wolfBoot with DO-178C

    Join us for our final 2023 webinar, Security in Avionics – Tiger Lake and wolfBoot with DO-178C! Explore DO-178C Secure Boot with wolfBoot on Tiger Lake UP3 11th Gen Intel® Core™ Processors alongside wolfSSL Lead Embedded Software Engineer, Tesfa Mael, on December 21st at 10 am PT.

    Watch the webinar here: Security in Avionics – Tiger Lake and wolfBoot with DO-178C

    Ensure the safety, functionality, and security of avionics systems with a robust foundation in secure boot and firmware updates. Achieving certifications like DO-178C is crucial, necessitating comprehensive solutions. Join Tesfa as he navigates how to establish this foundation using Intel’s secure hardware solutions alongside wolfBoot, the secure bootloader developed by wolfSSL. wolfBoot, a portable and certifiable bootloader and firmware update solution, harnesses Intel technologies like AES-NI and AVX2 to optimize boot performance and bolster security.

    Don’t miss this opportunity to gain insights into maximizing avionics security through DO-178C Secure Boot with wolfBoot on Tiger Lake UP3 11th Gen Intel® Core™ Processors. Elevate your technical skills and secure your avionics systems effectively with wolfSSL.

    Watch it now!

    If you have questions about any of the above, please contact us at facts@wolfSSl.com or call us at +1 425 245 8247.

    Download wolfSSL Now

    wolfTPM based Root of Trust for Secure Boot

    wolfTPM is a portable TPM 2.0 stack with backward API compatibility designed for embedded use, and the newly released wolfTPM v3.0.0 provides examples for Secure Boot solutions to store a Root of Trust in non-volatile (NV) memory.

    Secure Boot for your microcontroller is essential to protect against malware during the earliest stages of your system boot, and establishing a Root of Trust is the first step towards that direction. The example was implemented with our Secure Boot solution wolfBoot.

    See the documentation examples/boot/README.md and docs/TPM.md for more details on how to set up a Root of Trust with authentication and tamper protection using wolfTPM.

    The design in the example for storage of public key based Root of Trust into TPM entails using AES-CFB parameter encryption for all communication (salted and bound) and deriving a password based on unique device parameters used as “auth” to load NV (authenticate). The approach is to anchor the public key into the TPM NV storage such that it cannot be erased or tampered with. The NV stores a hash of the public key and wolfBoot keeps the public key internally and programs the TPM with the NV if not populated. The platform NV is locked and created under the platform hierarchy. It is recommended to supply a derived “authentication” value to prevent TPM tampering. This authentication value is encrypted on the bus.

    If you have questions about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.

    Download wolfSSL Now

    Posts navigation

    1 2