 Hello, everyone, and welcome to our partner webinar, Wolf SSL for STM32 Cube MX V6, presented by ST Microelectronics Senior Marketing Manager, Louis Chausa, and Wolf SSL Senior Embedded Software Engineer, David Garski. My name is Riley DeGarmo, and I'll be moderating today's webinar. All attendees will be in listen-only mode. If you have any questions, please use the Q&A box at the bottom of your screen. This webinar will be recorded and made available on our YouTube channel at a later date. I invite you to follow ST and Wolf SSL on our socials. And please feel free to email us with additional questions following the presentation. Before I hand it off to the guys, I'm going to give you a brief introduction to Wolf SSL as a company. Wolf SSL is open source embedded security software focused on providing lightweight and embedded security solutions for desktop, enterprise, and cloud environments with an emphasis on speed, size, portability, features, and standards compliance. With SSL TLS products in a crypto library, Wolf SSL is supporting high security designs in automotive, avionics, and other industries as well. In avionics, Wolf SSL supports complete RTCA DO178C DAO level A certification. In automotive, we support MISRC capabilities. For government consumers, Wolf SSL has a strong history in FIPS 140-2 with upcoming FIPS 140-3. Wolf SSL supports industry standards up to the current TLS 1.3 and DTLS 1.2. It's up to 20 times smaller than open SSL, offers a simple API, an open SSL compatibility layer, is backed by the robust WolfCrypt Cryptography Library, 24 by 7 support, and much more. Our products are open source, giving customers the freedom to look under the hood. Wolf SSL was founded in 2004 by Todd Auska and Larry Stefanik when they realized that there wasn't an open source dual-licensed embedded SSL library available. Open SSL existed at the time, but there was a demand for an alternative that was easily portable, smaller, faster, available under a clear commercial license, was equipped with a clean and modern API, and offered commercial style developer support. Wolf SSL was born into this market need with an open SSL compatibility layer that we are constantly expanding. The first instance of Wolf SSL was a clean room implementation for MySQL. Today, Wolf SSL secures over 2 billion connections global. We have more than 1,000 OEM customers and dozens of resellers. Wolf SSL is made up of almost 40 dedicated employees in 2020, most of which are engineers. This progress is supported by a strong partner network with companies like ST that we're thrilled to get to collaborate with. Since the beginning, our engineering team has developed several embedded security products, including WolfCrypt with FIPS certification and a FIPS-ready offering, MQTT up to the V5 specification, SSH V2, a TPM 2.0 portable project, a secure boot loader known as Wolf Boot, as well as Java wrappers and JSSE support. We also offer commercial support for Curl. All of these offerings are accompanied by thorough maintenance and support plans up to the 24 by 7 level. Once again, something you won't find anywhere else. Wolf SSL is dual licensed, which is to say that we can be shipped with your commercial products or licensed in open source projects under GPL V2. If you have any questions in regards to licensing or our company, feel free to send a note to licensing at wolfssl.com, and we'll be happy to help. And now I'll turn it over to David Garski to take a closer look at Wolf SSL technology. Thank you all. Hello, my name is David Garski, and today I'm going to talk about our Wolf SSL libraries. We'll start off talking about our TLS and cryptographic library that are bundled together. Wolf SSL is a lightweight library designed for portability and configurability. It's written in C with many wrappers available. We support all the latest standards for TLS and DTLS. You can be built with a small footprint to conserve flash and memory, or we can scale up to high-end desktop servers. Our library is up to 20 times smaller than OpenSSL. We've been ported to a long list of operating systems and can even be used in bare metal. We have an extensive OpenSSL compatibility layer with over 1,000 APIs. We support integration with many open source projects such as Apache, Lighty, Nginx, MySQL, Curl, OpenVPN, OpenSSH, WPA, Supplicant. That is a long, long list. We have hardware crypto acceleration support for Intel, AES and I, AVX, the ARM V8 crypto extensions, Intel Quick Assist and long list of other things. For STM32, we support the symmetric acceleration of AES and SHA2, and also their PKA, which is public key acceleration for ECC curves. We are NSA Suite B compatible. We've been validated to FIPS 140-2 Level 1, and we're working on FIPS 140-3. We have DO178C certification for aircraft systems, which is like mission critical systems. Here's our list of algorithms supported. This is not a complete list, but it's most of them for our Wolfcrypt library. Common ones are RSA, ECC, AES, GCM, Chacha, 20-poly 1305, Edcurve, for example. For ST, we support the following microcontrollers, their mainstream F1 and G0, the Ultra Low Power L4 and L5, the High Performance Series, which is the F2, F4, F7, and H7, and their wireless series, the WB55. We support the STM32 public key acceleration for ECC on the L5 and the WB55. We also support CryptoCo processors for the STSAFE, A100 and A110, which are ECC authentication chips. They use I2C to accelerate ECC operations and protect the key. We also support the TPM2.0 module, the ST33, which I'll talk about in a second. So quickly, I'm gonna go over the WolfMQGT library. MQGT is a message community telemetry protocol and is a PubSub protocol designed for lightweight systems. So this library was written from scratch in C and supports all the latest standards that are used by all the major cloud providers. So that's version 3.11, version five, and the new sensor node protocol. It supports all the quality of service levels, supports TLS for encrypting communication using WolfSSL. It's written with no external dependencies, small code size, it's got network stack ports for Linux, Windows, free RTOS TCP, LWIP, and there's examples for Azure, IoT Hub, AWS, IBM Watson. We have simple client examples. We also have a firmware update example and an MQGTS example. And this can be used with FIPS VR or WolfCrip FIPS. So MQGT is just a lightweight protocol. It's designed to be able to subscribe to a topic and publish a message and receive those. It really efficiently packs messages together so there's a very low overhead. And with TLS, you can use session resumption to reduce the reconnection time. So WolfSSH is our SSH client server. It's lightweight and embeddable. It supports SSH V2, which is covered by the RFC. It's not tied to any threading model. It supports password or public-based, a public-key-based authentication. Includes support for the secure file transfer protocol and the secure copy protocol. It supports all these algorithms and it has been interop tested against open SSH putty for SSHD and BitVis. And we can support FIPS with it as well. So this protocol is designed for secure remote login. Another secure network services designed to provide secure remote access by users or to other computers. It replaced the plaintext legacy protocols like Telnet, RLogin, RSH. And it adds authentication encryption as typically used on port 22. So the most common use case for our customers is embedded SSH server. So you can go in remotely and run shell commands or transfer files. So Wolf TPM is based on the TPM 2.0 TCG specification. It uses a trusted platform module, which is a cryptographic hardware module that includes key generation and storage capabilities. It was written originally for version 1.1 back in 2001. This Wolf TPM library uses our TPM 2.0 specification released in 2013. So it implements all of the APIs defined by the specification and it supports both the SPY, iSquared C, some other interfaces like the dev TPM or the TPM software simulators as well. It's designed for easy portability to different platforms. He uses native C code, single IO callback for the hardware interface and there's no external dependencies, no mallet freeze. And we have HAL, which is hardware examples for Linux, Raspberry Pi and the STM32 cube HAL. And it's been tested with all the TPM vendor chips including the ST33 TPM module. So we also added wrappers to simplify some really common use cases such as key generation, RSA, NECC type things, non-volatile access like storing keys or data. There's also examples for all of these things including TLS client server benchmarking, getting the timestamp, creating a certificate, all those things. So this is just a comparison of features between two common modules, the ST33 and the Infineon SLB 9670. Just compare some of the algorithms and certifications and power and all those things. You're welcome to review those. This is a benchmark between the two asymmetric benchmarks. This is operations per second for RSA and NECC. So we also have a Wolf boot library which is a secure boot loader. It's a lightweight portable secure boot loader and it's a generic implementation. It's easy to port with the HAL API. It runs on virtually any microcontroller. There is no heat memory used. It's all stack based and it's safe to use in aerospace, medical and automotive. And it's been ported and supported with VO178. It uses a dual bank mechanism where you have two partitions. The boot loader itself handles the update and will perform the swapping of the partitions and it does it in a fail-safe way where if the power is lost, it will resume where it left off when power resumes. It also protects against version downgrade attacks and it has a rollback in case the update fails. It's OS agnostic. So it's running in bare metal and it supports RSA, ECDSA or ed25519 and it can support SHA-256 and SHA-334 as well. So it supports external spy flash. You can also update the boot loader, but that's not power fail-safe. The source code and firmware examples are available. Of course. And it supports all the Cortex-M, the ARM V8 and the risk processors. So it also includes a key generation and signing tools. There's a version for Python also in C and those can be built on any platform. The C version includes a visual studio project for Windows 2. If there is hardware crypto acceleration support in WolfCrypt, then that can be leveraged in WolfBoot as well. So why Wolf has to sell? Well, we'll build our libraries for portability and performance. So you can build and scale it from a small server to a high end, a small embedded microcontroller all the way to a high end server. We have a strong dedication to testing. We do continual testing with static analyzers and fuzzers, a long list of things we do ongoing. We're mature and widely used, securing two billion connections at any one point in time. And we have a commitment to security and features well supported by the community. Thank you so much, David. Let's hand it over to Loïc to introduce ST Company and Technology. Hello, my name is Loïc Chaussat. I work on STM32 ecosystem marketing at ST in charge of embedded software offered for microcontrollers. I'm very pleased to present you today an announcement of the STM32 Cube ecosystem during this webinar organized by our partner, Wolf SSL. I would first of all like to quickly introduce ST Microelectronics and STM32 products. ST Microelectronics is one of the world's largest semiconductor companies with almost 10 billion of revenue, 46,000 employees, over 80 sales and marketing offices serving over 100,000 customers across the globe. ST Microelectronics is delivering a wide range of products, including analog, power conversion ICs, processors and ASICs, MEMS and imaging sensors, discrete and power to sustain the company's strategy. Smart mobility, power and energy Internet of things and 5G. Today's webinar focus on STM32 microcontrollers. STM32 is the leading family of ARM Cortex-M32-bit general purpose microcontrollers. The portfolio organized by series is continuously expanding, bringing more performance and low power consumption following market trends such as wireless connectivity, advanced security or local autonomy with AI. Among the last products introduced on the market, you can find the STM32 WL with integrated sub-gigahertz radio, the STM32 L5 in the ultra low power family with trust zone technology or the STM32 G4 with more analogs and specific timers for power control. On the high performance side, we can also mention the expanding STM32 H7 series of microcontrollers as well as the STM32 MP1 Cortex-A base for Linux developers. This wide STM32 portfolio is complemented by a comprehensive ecosystem including tools, software, documentation and support. Many solutions around the STM32 are also proposed to enable and speed up application development and certification. Many partners are also contributing to this ecosystem with various products, trainings or design services. In today's webinar, we focus on new features of the well-known STM32 CUBE ecosystem. STM32 CUBE ecosystem is now becoming even more user-friendly, more intuitive and offers the possibility to integrate new packages. A new feature enables the integration of partner software solutions in STM32 CUBE projects getting developers up and running faster on their own STM32 prototyping board. WolfSSL has taken advantage of this new feature and has made its popular SSL TLS software component available as an STM32 CUBE expansion pack. The STM32 CUBE ecosystem is a software solution for STM32 microcontrollers and microprocessors created for designers and tested in a free comprehensive development environment and for users looking to integrate STM32 software in their existing IDE such as Kail or IAR IDEs. STM32 CUBE is a combination of software tools and embedded software libraries. It is a full set of PC software tools addressing each step of a complete development project, configuration, development, programming and monitoring as you can see on the left side of the screen. It embeds software bricks enabling advanced functionalities in STM32 microcontrollers and microprocessor from MCU drivers to more advanced application oriented features as shown on the right side of the screen. In this webinar we focus on STM32 CUBE MX and STM32 CUBE IDEA tools and how users can select and configure software components from STM32 CUBE expansion packages announced for STM32 tool set. These expansions are available either from ST, from ST partners or from the community. Indeed, thanks to the announcements in the STM32 tool set and a new STM32 pack creator utility everyone can expand STM32 CUBE tools with his own software components to create one's own STM32 CUBE expansion. This expansion can then be privately shared within a company or with outside stakeholders in the online community or even offered to customers. ST authorized partner WolfSSL is one of the first companies to release such a package making its software components available in STM32 CUBE tool set. David from WolfSSL company will show you shortly how to easily build a new project in STM32 CUBE MX or STM32 CUBE IDEA. STM32 CUBE MX software configuration tool helps users choose and configure STM32 devices thanks to many software wizards including Pinout, Conflict Solver, Peripheral Core Affinity and so on. It can also be used to evaluate different power consumption scenarios thanks to its power consumption calculator. After configuring the embedded software bricks of STM32 CUBE MCU packages including HAL and LL ravers, AirTos and Middleware the project generation settings are defined according to user choices. STM32 CUBE MX will generate a project with initialization C code for STM32 devices which can be opened in the user's preferred IDE including IAR embedded workbench and ArmKyle MDK. On top of this, users can now browse STM32 CUBE expansion in the STM32 CUBE MX tool and open them. It's also possible to import additional packages that are not listed in STM32 CUBE MX tool. Users can select and configure software components from these packages. STM32 CUBE MX will then generate a project including these software components for users' own hardware configuration. There are two ways to use STM32 CUBE tools. The first one on the left is to start with STM32 CUBE MX configuration tool. You can generate project for several ideas including IAR embedded workbench, ArmKyle MDK, or STM32 CUBE IDE. If you are using STM32 CUBE IDE to write, compile, and debug your own code, you can directly start in STM32 CUBE IDE as it integrates all STM32 CUBE MX functionalities to offer all-in-one tool experience. This is option two, which David will be showing you in a few minutes in his demo. In STM32 CUBE expansion packages, you can find ready-to-use project examples you could directly open in your preferred IDE. Pre-configured to compile and run out of the box on specific ST boards. So far, if you were using STM32 CUBE MX tool you had to generate your project after configuring peripherals and middleware and RTOS from STM32 CUBE MCU package. Then, you had to open the project in your IDE and add software components from STM32 CUBE expansion packages manually. That is, all-source and header files. Configuration was also manual in header files. Now, the support of STM32 CUBE expansion packages in STM32 CUBE MX tool will get you up and running faster on your own STM32 board prototype. Importing expansion software components directly in STM32 CUBE MX tool and configuring them before generating the IDE project for your chosen MCU or board target. If you would like to create your own STM32 CUBE expansion a new utility called STM32 pack creator is available in the installation folder of STM32 CUBE MX tool. It can generate a PDF file according to the STM32 pack standard. This file describes software components in the packages with dependencies and can be read by STM32 CUBE MX or CUBE IDE tools or any other tool adopting this standard such as the HarmKyle MDK for instance. In addition, STM32 pack creator allows you to develop the configuration panel and to generate corresponding files for STM32 CUBE MX or STM32 CUBE IDE tool. If you would like to have more information on how to create an STM32 CUBE expansion visit the dedicated STM32 wiki page. You will find three project samples with step-by-step tutorial videos and detailed documentation. If you didn't have the chance to attend the webinar held on September 22 named Accelerating STM32 application development with new STM32 CUBE tools check out the webinar replay. Thank you for your attention. I will now let David continue the session. Hello, welcome to this demonstration of the Wolf SSL CUBE MX pack for the STM32 tools. So this pack makes it easy to install the Wolf SSL and Wolf Crip libraries for supporting the ST microcontrollers. This pack was created using this wiki page right here which is available on the ST website and the STM32 pack creator tool and it was based on a Simpsons pack. And to install the pack the first thing we're going to do is go to the Wolf SSL website so wolfssl.com forward slash docs docs forward slash STM32 and then we'll click on this link here to download the pack. Now I've already done that it's right here so the first thing we're going to do is run the STM32 CUBE MX tool which I already have open right here and we're going to click on this button that says install or remove embedded software packages. So at the top here is the vendor and ours is not here so we're going to install it. So we'll click this from local button and we'll go located in my downloads here and this is based on our latest 4.5.0 release and this is GPL v2 license. We also offer a commercial license for purchase. So as you can see the pack is installed here and we're done with this part of it. So now I'm going to take you over to the CUBE IDE this is just a new workspace and we're going to create a new STM32 project. There's also a way you can do it from an existing IOC file which I'll show you after this. So for this demo I'm going to be using the STM32 F407 discovery board this one right here. It's a Cortex-M4. It runs at 168 megahertz. It's pretty inexpensive. And we're just going to call this a wolf demo and say finish and it's asking me if I want to initialize all the microcontroller peripherals to their default mode. I'm going to say yes and then it's asking me if I want to open the ST CUBE MX device configuration tool which I said yes. Looks like there's a newer packets downloading. So inside here it shows you the actual microcontroller and each of the pins and what they are assigned which functions they're assigned to and once this is done downloading we're going to go to the software packs button up here and we're going to add Wolf as a saline. Oh it still has to download. I'm just going to click cancel. Still let me finish here. Okay. So we're going to go to software packs. We're going to say select components and we'll go down to Wolf as a saline here and you can see the modules. We have the core part and the TLS part and the test part. So I'm going to select all three of these for this example because I want to include the test code. All right. And so that shows up down here and we check this box and you'll get a whole bunch of different configuration options that you can choose. So for this example I'm going to use free RTOS. I'm going to choose our single precision cortex in math which has a bunch of assembly speedups for this chip and everything else is fine. So you can just see all the list of options here and we have more and I'll show you where this gets generated so you can customize it. So I'm also going to turn on free RTOS with the Simpsons V2 and the first thing I'm going to do here is increase the heap space and the next thing I'm going to do is I'm going to add a task for the WolfCrypt demo and this is just for the demo. I think I'm going to use 16K here that's size and words. It's actually a little larger than that but it could be smaller. I'm just giving it lots of space to work with here. WolfCrypt demo is the name of the function and this is an external function so it's in our code. So this is just setting it up so that there's a task that'll get run automatically in this example. So those are the two things that did there. Next we'll want to turn on the RNG peripheral for the random number generation. UART2 is the one used on this board for the printf that we're going to set up. So that's on PA2 and 3 and then let's see, we're going to turn on the RTC just so it's there for certificates. And then we're also going to go into the sys and we're going to change the clock source for the RTOS timer, a timer one. It's just something they want ST likes. And then I wanted to make sure that the speed of the chip is at its full. So it's already there 168 megahertz and that should be everything we need. So let's go ahead and save this and generate the code. Now it's going to switch to the cc++ perspective. Oh, it really, really wants to extract this package here. I must have been an update because I wasn't doing this before. Well, I guess I can let that finish and I'll talk about a few other things. So on this page, some of the instructions that I'm telling you are here. Some are not. One of the things is inside, if you go to github.com and you go into this directory, ID, STM 32 cube, you're going to see some more information about building for the STM 32 targets. And for example, using the hardware crypto acceleration, using the pack. And then in the end, when we get this running, you're going to have a menu like this where you can run different features to validate the board. There's also some benchmarks posted. These were collected for several different boards, which might be useful for you. There is a template for the configuration file that gets generated when this is done, and which I'll show you. And those options in the configuration tool, they get set here. And then it yields these build options below. So for the board, we're using this STM 32 F 407. I think it's in this list somewhere here, right here. Yeah. So what it's doing is defining this build option for this UART on the console. And the other file that's interesting is the main.c. This is just an example for the generated main.c. And there's a couple of interesting bits in here that we'll want to copy paste out that helps set up the printf support. And for whatever reason on this, you know, with the pack and the generated code, the printf doesn't work out of the box. So I had to copy and put in a few chunks of code, specifically these ones, which we'll do in a minute here. Yep. This one right here. And then this is that wiki page I was talking about. All right, it looks like it's done. So this is on the ST website for creating these packs. All right. It's almost done. Okay. So it generated this project. And if you go into this welfare cell directory, you'll see that configuration file I was talking about. And you can see that it'll highlight the F for seven section right here. And this IOC file is actually what is right here. And it's all the configuration information. I'm going to go ahead and close that. And. And then the actual welfare cell code is inside right here. And the demo that is being run is actually in this directory right here. So it's this code. And the other thing is so for this demo, it requires a printf float support. So we're going to go in here into settings and we're going to turn that on for the compiler. Great. Oh, it's right here. These two. And then we'll close that. And then we're going to build the project. And then, you know, you'll want to have your favorite, whatever your favorite software is for connecting to the UART. So with this board, there's a single SD link connection that also has a debug UART on it. And that's what I'm using here. It just shows up as a USB. Serial port. So now that I've built this, I'm going to right click and I'm going to say debug as we're going to run it. Okay. So this will use the SD link debugger to load the application into flash. And it's asking if I want to switch to the debug perspective, I say yes. And this is actually what was loaded on there before. Let me clear that. And we're in the main. Oh, yep. And it's not going to work. I forgot. Okay. So it's trying to print up, but it's not actually going to the right place. And so what we're going to do is what I talked about a second ago, which is we are going to copy a couple pieces of code, specifically this section. And it's going to go right here. If you put it between the user code marks here, the cube MX tool will not override it when it regenerates the code. And then we're going to put this one. Great. And I think we will put it. Just put it right here. Build this again. And we'll load it up one more time. Yes. My fault. I mean, I need to actually change this to this handy. You are macro right here. And then that would be a lot easier for everybody. Yeah. So it's actually you are to change like that. That should build fine. Well, I had not validated that we're going to go to how you are too. This is just saying when a print off character comes in, it's going to send it to this you are before I can include that. All right. So now we're going to go ahead and debug it one more time. And then we're going to go ahead and do the demo and that pretty much concludes it. There is one other thing I will show you while this is happening. And it's the location. So inside your home directory, ST puts all the packs into this SD 32 cube repository directory. And inside here. You can find that Wolf as a cell pack. And there's also some example projects. So for all these different boards, we have put together an IOC file, which I will use directly. And I will demonstrate that very quickly after we run this. So now we should actually have something here. And I can run the Wolf Crip test. And I can also run the benchmark. And one thing to note is I'm in the debug configuration. If you do release, it's significantly fact faster because of the optimizations. So those tests finish and we'll fire off some benchmarks. And if you see these numbers right here come in blank, that means you didn't have the float support for print off turned on. Okay. So that's the basic demo. And there's also some TLS examples. And you know, you can show your cypher sweet list. So the other thing I was going to show was using an existing IOC file. So for this, the steps are very similar except for, we're going to go new STM 32 project from existing IOC. And we're going to go browse into that directory. I was just showing you over here. I'm going to browse into here and we're going to grab this IOC file. You like my blazing fast internet. Some more things to download. All right, we're almost there. So these existing IOC files have already been configured with those settings we went through before. I'm just going to choose the same one right here. So you can just click any of these IOC files. And when you say finish, it's going to give you the same configuration, the cube Mx configuration screen, but all the things that I went through already set up like the, the WolfCrypt demo task, the heap, all those things. They're already set up. And Molf as the cells configured for all these things. So you can just open it and generate the code. And the project is ready to go. It's this one. So another thing that's interesting is there is a template for that generated configuration file. It's called an FTL. And it sits inside this cube Mx templates directory. And this file, which I may perhaps be able to open in here. It looks like this. And if you wanted to add a new platform and have it generate the code automatically, you could do this and just edit this FTL file. The other thing that you could, you can do. So let's say this Wolf demo here, you could actually go in and add a preprocessor macro inside here. You could add one called wolf as a cell user settings. And what you could do is, is actually take this configuration file and make a copy of it and paste it in here and rename it to user settings. Now I haven't tried this, but it worked fine. So this is actually just setting up a custom build file that you can use and it will no longer use the generator one. It'll use this one. So that's, that's an option. So defining that wolf as a cell user settings will, will reroute to this file. And yeah, I think that covers all the really important stuff. It's been great. Thanks for watching this demo. If you have any questions, I'll be happy to answer them. You can always send an email to support at wolf SSL.com. My name is David Garski and it's been a pleasure. Thanks.