Bluetooth Mesh (Part 3)

Secure Provisioning

In this next part of his article series on Bluetooth mesh, Bob looks at how to create secure provisioning for a Bluetooth Mesh network without requiring user intervention. He also takes a special look at an attack called Man-in-the-Middle which Bluetooth’s asymmetric key encryption is vulnerable to.

By Bob Japenga

Both of our cars are more than 15 years old. My only new car envy is with the lack of a modern audio system. With a rental car, I’m always envious of the Bluetooth support and the seamless way I can connect and reconnect my phone to the car’s system. Most of the new audio systems are well thought out and easy to use. For my birthday, I got a Bluetooth device that would connect my phone to my dumb audio system in both cars. I have been very happy with the devices although they have two quirks. One is that they don’t work when the car has been left outside and it’s below zero. After the car warms up, it will happily function. But it doesn’t like subzero temperatures.

The other quirk—pointed out by my grandchildren—is that when it powers up, it announces: “Waiting for Pairing.” And then when it is paired, it reports “Paired.” The quirk is that instead of saying “Waiting for Pairing” it sounds like it is saying “Waiting for Perry.” The first time my grandkids were in the car, they asked: “Who is Perry and why are we waiting for him?” Now I can only hear “Waiting for Perry” when I turn on the car.
Pairing is the way two standard Bluetooth devices establish the initial link for one-to-one networking (Figure 1). Bluetooth mesh needs a much more sophisticated and secure method of linking the many-to-many network. That method is called provisioning. I introduced Bluetooth mesh provisioning in my last article (Circuit Cellar 345, April 2019) [1]. So, if you haven’t read that article, as a minimum, it will be important to go back to understand the terms that were defined in that article and which I will be using in this article.

Figure 1
Pairing is the way two standard Bluetooth devices establish the initial link for one-to-one networking.

As I mentioned last time, the Bluetooth specification [2] states that only if an Out-of-Band (OOB) public key is used or if an OOB action is taken to pass the public key (using user supplied information), “provisioning is Insecure Provisioning.” This statement will basically jettison any project that does not use one of these two OOB methods when presented to a savvy IT group. It did for us. Imagine presenting to your CEO a new product line using Bluetooth mesh that doesn’t use one of these two methods. Most likely the savvy CEO will ask: “What is the projected return on our investment?” AND “Is it secure?” Would you want to say: “Well, we are using Insecure Provisioning but other than that it is secure?”

I’m not convinced that the specification is entirely accurate in this statement and would appeal to the Bluetooth SIG to reconsider their wording. I want to elaborate on this idea in this article and provide some means for making provisioning secure without using either of the two OOB methods to pass the public keys.

Man-in-the-Middle

As I mentioned last time, Bluetooth uses asymmetric key encryption during the first part of provisioning. Asymmetric key encryption has one basic security flaw. It is subject to what is called a Man-in-the-Middle (MitM) attack. Let me illustrate this attack.

Imagine that Bob and Barbara are happily married. I know, normally everyone uses Alice in these illustrations, but my wife’s name is Barbara. They want to communicate some secret birthday plans about their grandson Sean. So, they both send over clear text their public keys (B1 and B2) (Figure 2). Bob encrypts all of his messages with Barbara’s public key B2, and sends them to Barbara. Barbara decrypts all of Bob’s messages using her private key B2P. Barbara sends all of her messages to Bob using Bob’s public key B1 to encrypt the data. Bob decrypts Barbara’s messages with Bob’s private key B1P.

Figure 2
Shown here is an example exchange that would be insecure because it would be subject to a Man-in-the-Middle attack. However, during normal asymmetric key encryption, the attack can be prevented through authentication.

Imagine that grandson Sean is a curious computer whiz and wants to know what’s he is going to get for his birthday. He intercepts the public key exchange B1 and B2 between his grandparents. Instead of passing on their public keys, he sends them his public key S1. So, when Bob and Barbara send their messages encrypted with S1 to each other he intercepts them and decrypts them using his private key S1P since they are encrypting their messages with his public key S1. He finds out what he is getting for his birthday and then encrypts the messages using Bob and Barbara’s public keys and sends them back to them. Bob and Barbara are clueless to the fact that Sean now knows what he is getting for his birthday.

That example illustrates that, if during the provisioning process, the public keys are not exchanged OOB, the process would be insecure because they would be subject to a MitM attack. However, during normal asymmetric key encryption, the way this can be prevented is through authentication. If Bob can know that a key is authentically from Barbara, he would immediate recognize that the key that Sean sent was not from Barbara. During normal Internet asymmetric key encryption this authentication is done through Certificates of Authority created by a trusted signing authority.

The Bluetooth provisioning process includes authentication of the device as part of the process. Authentication can either be using an OOB technique or without OOB. So, I would contend that if you use some means of authenticating that does not transfer the credentials over the Bluetooth network, your provisioning process would be secure in spite of what the Bluetooth specification says (I am definitely treading on thin ice here!).

Read the full article in the June 347 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Secure Wi-Fi MCU Provides IoT Connectivity Solution

Espressif Systems has announced the release of the ESP32-S2 Secure Wi-Fi MCU, a highly integrated, low-power, 2.4 GHz Wi-Fi SoC supporting Wi-Fi HT40 and 43 GPIOs. Based on the Xtensa single-core 32-bit LX7 processor, ESP32-S2 can be clocked at up to 240 MHz.

With state-of-the-art power management and RF performance, IO capabilities and security features, ESP32-S2 is well suited for a wide variety of IoT or connectivity-based applications, including smart home and wearables. With an integrated 240 MHz Xtensa core, ESP32-S2 is sufficient for building the most demanding connected devices without requiring external MCUs.

Features:

  • CPU and Memory
    • Xtensa single-core 32-bit LX7 microcontroller
    • 7-stage pipeline
    • Clock frequency of up to 240 MHz
    • Ultra-low-power co-processor
    • 320 kB SRAM, 128 kB ROM, 16 KB RTC memory
    • External SPIRAM (128 MB total) support
    • Up to 1 GB of external flash support
    • Separate instruction and data cache
  • Connectivity
    • Wi-Fi 802.11 b/g/n
    • 1×1 transmit and receive
    • HT40 support with data rate up to 150 Mbps
    • Support for TCP/IP networking, ESP-MESH networking, TLS 1.0, 1.1 and 1.2 and other networking protocols over Wi-Fi
    • Support Time-of-Flight (TOF) measurements with normal Wi-Fi packets
  • IO Peripherals
    • 43 programmable GPIOs
    • 14 capacitive touch sensing IOs
    • Standard peripherals including SPI, I2C, I2S, UART, ADC/DAC and PWM
    • LCD (8-bit parallel RGB/8080/6800) interface and also support for 16/24-bit parallel
    • Camera interface supports 8 or 16-bit DVP image sensor, with clock frequency of up to 40 MHz
    • Full speed USB OTG support
  • Security
    • RSA-3072-based trusted application boot
    • AES256-XTS-based flash encryption to protect sensitive data at rest
    • 4096-bit eFUSE memory with 2048 bits available for application
    • Digital signature peripheral for secure storage of private keys and generation of RSA signatures
  • Power Consumption
    • ESP32-S2 supports fine resolution power control through a selection of clock frequency, duty cycle, Wi-Fi operating modes and individual power control of its internal components.
    • When Wi-Fi is enabled, the chip automatically powers on or off the RF transceiver only when needed, thereby reducing the overall power consumption of the system.
    • ULP co-processor with less than 5 uA idle mode and 24 uA at 1% duty-cycle current consumption. Improved Wi-Fi-connected and MCU-idle-mode power consumption.
  • Software
    • ESP32-S2 supports Espressif’s software development framework (ESP-IDF), which is a mature and production-ready platform, already used by millions of devices deployed in the field. Availability of common cloud connectivity agents and common product features shortens the time to market.

Engineering samples of ESP32-S2 beta are available this month (June).

Espressif Systems | www.espressif.com

Arm Cortex M23-Based MCUs Feature FreeRTOS Kernel Support

Nuvoton Technology has announced that it is demonstrating the capability of FreeRTOS kernel support with the NuMicro M2351 Series. According to the company, the M2351 is one of the first Arm Cortex-M23 based MCUs that has a preconfigured example that embedded developers can use to run FreeRTOS on the officially supported Armv8-M architecture. Amazon Web Services (AWS) released the latest FreeRTOS kernel that includes a preconfigured example project for the Nuvoton NuMaker-PFM-M2351 evaluation board (shown).
At the beginning of 2019, the M2351 Series had achieved with Arm PSA (Platform System Architecture) Level 1 Certified and PSA Functional Certification. PSA Certified enables device makers to achieve the security required for their use cases through three progressive levels of security assurance, each requiring increasingly rigorous hardware and software evaluation, which are assigned by analyzing the use case threat vectors.

In achieving Arm PSA Functional API Certification, Nuvoton better enables ecosystem software compatibility to PSA standards, independent of hardware platforms. It’s highly configurable to suit target applications on constrained devices. As a very early Armv8-M architecture-based microcontroller vendor, Nuvoton has accumulated several IoT use cases covering a lot of devices connected to the internet with the M2351 Series.

Nuvoton Technology | www.nuvoton.com

Dual-Core MCUs Blend High Performance and Enhanced Security

STMicroelectronics has announced new STM32H7 MCUs which it claims are the industry’s highest-performing Arm Cortex-M general-purpose MCUs, combining dual-core performance with power-saving features and enhanced cyber protection. The new devices leverage a 480 MHz version of the Cortex-M7, the highest performing member of Arm’s Cortex-M family, and add a 240 MHz Cortex-M4 core.

With ST’s smart architecture, efficient L1 cache, and adaptive real-time ART Accelerator, the MCUs set new speed records at 1327 DMIPS and 3224 CoreMark executing from embedded flash. ST’s Chrom-ART Accelerator provides a boost to graphics performance. To maximize energy efficiency, each core operates in its own power domain and can be turned off individually when not needed.
Developers can easily upgrade existing applications through flexible use of the two cores. They can add a sophisticated user interface to an application such as a motor drive formerly hosted on a single-core Cortex-M4 MCU by migrating legacy code to the STM32H7 Cortex-M4 with the new GUI running on the Cortex-M7. Another example is to boost application performance by offloading intensive workloads such as neural networks, checksums, DSP filtering or audio codecs.

The dual-core architecture also helps simplify code development and accelerate time to market in projects where user-interface code may be developed separately from real-time control or communication features.

STM32H7 MCUs come with pre-installed keys and native secure services including Secure Firmware Install (SFI). SFI lets customers order standard products anywhere in the world and have the encrypted firmware delivered to an external programming company without exposing unencrypted code. In addition, built-in support for Secure Boot and Secure Firmware Update (SB-SFU) protects Over the Air (OTA) feature upgrades and patches.

Compared to flash-less processors, STM32H7 MCUs deliver high performance with the extra advantage of up to 2 MB Flash and 1 MB SRAM on-chip, says ST. This helps to better handle space constraints and simplify the design of smart objects in industrial, consumer and medical applications with real-time performance or AI-processing requirements. Moreover, the Cortex-M7 level 1 cache and parallel and serial memory interfaces offer unlimited and fast access to external memory.

Additional advanced features include Error Code Correction (ECC) for all flash and RAM memory to increase safety, multiple advanced 16-bit ADCs, external ambient-temperature range up to 125°C allowing use in severe environments, an Ethernet controller and multiple FD-CAN controllers giving communication-gateway capabilities, and ST’s latest high-resolution timer for generating precision waveforms.

ST has already extended the STM32Cube ecosystem by adding STM32CubeH7 firmware modules with application source code, including graphical solutions based on TouchGFX and STemWin graphical-stack library. There are also new Evaluation, Discovery and Nucleo boards. Developers can leverage all the standard elements of the STM32Cube development environment, including the ST-MC-SUITE motor-control toolkit, STM32Cube.AI machine-learning toolkit, STM32CubeMX, STM32CubeProgrammer and certified partner solutions for STM32.

STM32H7 dual-core MCUs are entering production and samples are available now. A broad selection of packages is offered, including WLCSP. Budgetary pricing starts at $8.19 for orders of 10,000 pieces The STM32H7 single-core MCUs including the Value line are also available at a budgetary pricing starting from $3.39 for orders of 10,000 pieces.

STMicroelectronics | www.st.com

 

Preventing IoT Edge Device Vulnerabilities

FREE White Paper –
Security issues around IoT edge devices are rarely mentioned in the literature. However, the projected billions of IoT edge devices out in the wild makes for a vast attack surface. Should hardware designers be concerned about security for IoT edge devices? And, is it worth the effort and cost to ensure security at this level? We explore internal design vulnerabilities and 3rd-party attacks on IoT edge devices in this paper in order to answer that question.

Get your copy – here

5 V MCU Family Provides Water Tolerant Touch Integration

NXP Semiconductor has announced its 5 V KE1xZ family of MCUs. Based on the Arm Cortex-M0+ core, the MCUs are suited for embedded control systems in harsh electrical environments and provide an integrated CAN controller and capacitive touch from 32 KB flash. Designed for a wide range of industrial applications, the KE1xZ family offers mixed-signal integration across a range of compact memory variants. The 1-MS/s ADC and FlexTimer modules, combined with NXP’s Freemaster software tools library and Motor Control Application Tuning plugin (MCAT) enable designs of Brushless DC (BLDC) and other motor-control systems.

NXP’s KE1xZ MCU family offers advanced noise immunity, water-tolerant touch and low-power wake-on-touch operation—essential features for the strict electromagnetic compatibility (EMC) standards of the industrial and home appliance markets. NXP’s touch IP, combined with software and tools provide a high level of stability, accuracy and ease of use, with continued responsiveness and functionality through wet conditions. It can sustain 10 V in conducted noise, in alignment with International Electrotechnical Commission (IEC) 6100-4-6 test level 3.

Additional KE1xZ MCU features:

  • Internal 48MHz internal reference clock with 1% accuracy over full operating range
  • Boot ROM with built in bootloader and 128-bit unique device identifier (UID)
  • ADC self-calibration feature
  • Flash Access Control (FAC)
  • Cyclic Redundancy Check (CRC) generator module
  • Internal watchdog (WDOG) with independent clock source and external watchdog monitor (EWM)
  • On-chip clock loss monitoring
  • IEC 60730 Class B safety certification
  • LQFP package with 48- and 44-pin options

The KE1xZ MCU family will be available globally in March 2019 from NXP and its distribution partners with a suggested resale price from $0.79 at 10,000-unit quantities. NXP enables developers through its MCUXpresso software and tools ecosystem, along with its FRDM-KE15Z and FRDM-TOUCH development platforms (see image above), with respective suggested resale prices of $35 and $15. Third-party support is enabled from the broad ARM ecosystem.

NXP Semiconductor | www.nxp.com

 

May Circuit Cellar: Sneak Preview

The May issue of Circuit Cellar magazine is out next week!. We’ve been hard at work laying the foundation and nailing the beams together with a sturdy selection of  embedded electronics articles just for you. We’ll soon be inviting you inside this 84-page magazine.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:

 

Here’s a sneak preview of May 2019 Circuit Cellar:

EMBEDDED COMPUTING AT WORK

Technologies for Digital Signage
Digital signage ranks among the most dynamic areas of today’s embedded computing space. Makers of digital signage players, board-level products and other technologies continue to roll out new solutions for implementing powerful digital signage systems. Circuit Cellar Chief Editor Jeff Child looks at the latest technology trends and product developments in digital signage.

PC/104 and PC/104 Family Boards
PC/104 has come a long way since its inception over 25 ago. With its roots in ISA-bus PC technology, PC/104 evolved through the era of PCI and PCI Express by spinning off its wider family of follow on versions including PC/104-Plus, PCI-104, PCIe/104 and PCI/104-Express. This Product Focus section updates readers on these technology trends and provides a product gallery of representative PC/104 and PC/104-family boards.

TOOLS & TECHNIQUES FOR EMBEDDED ENGINEERING

Code Analysis Tools
Today it’s not uncommon for embedded devices to have millions of lines of software code. Code analysis tools have kept pace with these demands making it easier for embedded developers to analyze, debug and verify complex embedded software. Circuit Cellar Chief Editor Jeff Child explores the latest technology trends and product developments in code analysis tools.

Transistor Basics
In this day and age of highly integrated ICs, what is the relevance of the lone, discrete transistor? It’s true that most embedded systems can be solved by chip level solutions. But electronic component vendors do still make and sell individual transistors because there’s still a market for them. In this article, Stuart Ball reviews some important basics about transistors and how you can use them in your embedded system design.

Pressure Sensors
Over the years, George Novacek has done articles examining numerous types of sensors that measure various physical aspects of our world. But one measurement type he’s not yet discussed in the past is pressure. Here, George looks at pressure sensors in the context of using them in an electronic monitoring or control system. The story looks at the math, physics and technology associated with pressure sensors.

MICROCONTROLLERS DO IT ALL

Robotic Arm Plays Beer Pong
Simulating human body motion is a key concept in robotics development. With that in mind, learn how these Cornell graduates Daniel Fayad, Justin Choi and Harrison Hyundong Chang accurately simulate the movement of a human arm on a small-sized robotic arm. The Microchip PIC32 MCU-based system enables the motion-controlled, 3-DoF robotic arm to take a user’s throwing motion as a reference to its own throw. In this way, they created a robotic arm that can throw a ping pong ball and thus play beer pong.

Fancy Filtering with the Teensy 3.6
Signal filtering entails some tricky tradeoffs. A fast MCU that provides hardware-based floating-point capability eases some of those tradeoffs. In the past, Brian Millier has used the Arm-based Teensy MCU modules to serve meet those needs. In this article, Brian taps the Teensy 3.6 Arm MCU module to perform real-time audio FFT-convolution filtering.

Real-Time Stock Monitoring Using an MCU
With today’s technology, even very simple microcontroller-based devices can fetch and display data from the Internet. Learn how Cornell graduates David Valley and Saelig Khatta built a system using that can track stock prices in real-time and display them conveniently on an LCD screen. For the design, they used an Espressif Systems ESP8266 Wi-Fi module controlled by a Microchip PIC32 MCU. Our fun little device fetches chosen stock prices in real-time and displays them on a screen.

… AND MORE FROM OUR EXPERT COLUMNISTS

Attacking USB Gear with EMFI
Many products use USB, but have you ever considered there may be a critical security vulnerability lurking in your USB stack? In this article, Colin O’Flynn walks you through on example product that could be broken using electromagnetic fault injection (EMFI) to perform this attack without even removing the device enclosure.

An Itty Bitty Education
There’s no doubt that we’re living in a golden age when it comes to easily available and affordable development kits for fun and education. With that in mind, Jeff Bachiochi shares his experiences programming and playing with the Itty Bitty Buggy from Microduino. Using the product, you can build combine LEGO-compatible building blocks into mobile robots controlled via Bluetooth using your cellphone.

Low-Power Wireless MCUs Provide Real-Time Performance

STMicroelectronics (ST) has announced its latest Bluetooth offering, its STM32WBx5 dual-core wireless MCUs. The devices come with Bluetooth 5, OpenThread and ZigBee 3.0 connectivity combined with ultra-low-power performance. Fusing features of ST’s STM32L4 Arm Cortex-M4 MCUs and in-house radio managed by a dedicated Cortex-M0+, the STM32WBx5 is power-conscious yet capable of concurrent wireless-protocol and real-time application execution. It is well suited to remote sensors, wearable trackers, building automation controllers, computer peripherals, drones and other IoT devices.
Security features of the STM32WBx5 MCUs include Customer Key Storage (CKS), Public Key Authorization (PKA), and encryption engines for the radio MAC and upper layers. The MCUs have up to 1 MB of on-chip flash and a Quad-SPI port for efficient connection to external memory, if needed. Additional features include crystal-less Full-Speed USB, 32 MHz RF oscillator with trimming capacitors, a touch-sense controller, LCD controller, analog peripherals and multiple timers and watchdogs. The balun for antenna connection is also integrated.

Leveraging ultra-low-power technologies of the STM32L4 line, STM32WBx5 MCUs feature multiple power-saving modes including 13 nA shutdown mode, adaptive voltage scaling, and the adaptive real-time (ART) accelerator to maximize energy efficiency and ensure long-lasting performance in self-powered applications. The integrated radio transmitter is optimized for high RF performance and low power consumption to maximize battery runtime. The RF output power is programmable up to +6 dBm in 1 dB increments, and the MCU draws only 5.2 mA when transmitting at 0 dB. Receive sensitivity is -96 dBm for BLE communication at 1mbps. Designed for a link budget of 102 dB, the radio ensures robust communication over long connection distances and includes support for an external Power Amplifier (PA).

STMicroelectronics | www.st.com

 

April Circuit Cellar: Sneak Preview

The April issue of Circuit Cellar magazine is out next week (March 20th)!. We’ve worked hard to cook up a tasty selection of in-depth embedded electronics articles just for you. We’ll be serving them up to in our 84-page magazine.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:

 

Here’s a sneak preview of April 2019 Circuit Cellar:

VIDEO AND DISPLAY TECHNOLOGIES IN ACTION

Video Technology in Drones
Because video is the main mission of the majority of commercial drones, video technology has become a center of gravity in today’s drone design decisions. The topic covers everything including single-chip video processing, 4k HD video capture, image stabilization, complex board-level video processing, drone-mounted cameras, hybrid IR/video camera and mesh-networks. In this article, Circuit Cellar’s Editor-in-Chief, Jeff Child, looks at the technology and trends in video technology for drones.

Building an All-in-One Serial Terminal
Many embedded systems require as least some sort of human interface. While Jeff Bachiochi was researching alternatives to mechanical keypads, he came across the touchscreen display products from 4D Systems. He chose their inexpensive, low-power 2.4-inch, resistive touch screen as the basis for his display subsystem project. He makes use of the display’s Espressif Systems ESP8266 processor and Arduino IDE support to turn the display module into a serial terminal with a serial TTL connection to other equipment.

MICROCONTROLLERS ARE EVERYWHERE

Product Focus: 32-Bit Microcontrollers
As the workhorse of today’s embedded systems, 32-bit microcontrollers serve a wide variety of embedded applications-including the IoT. MCU vendors continue to add more connectivity, security and I/O functionality to their 32-bit product families. This Product Focus section updates readers on these trends and provides a product album of representative 32-bit MCU products.

Build a PIC32-Based Recording Studio
In this project article, learn how Cornell students Radhika Chinni, Brandon Quinlan, Raymond Xu built a miniature recording studio using the Microchip PIC32. It can be used as an electric keyboard with the additional functionality of recording and playing back multiple layers of sounds. There is also a microphone that the user can use to make custom recordings.

WONDERFUL WORLD OF WIRELESS

Low-Power Wireless Comms
The growth in demand for IoT solutions has fueled the need for products and technology to do wireless communication from low-power edge devices. Using technologies including Bluetooth Low-Energy (BLE), wireless radio frequency technology (LoRa) and others, embedded system developers are searching for ways to get efficient IoT connectivity while drawing as little power as possible. Circuit Cellar Chief Editor Jeff Child explores the latest technology trends and product developments in low-power wireless communications.

Bluetooth Mesh (Part 2)
Continuing his article series on Bluetooth mesh, this month Bob Japenga looks at the provisioning process required to get a device onto a Bluetooth mesh network. Then he examines two application examples and evaluates the various options for each example.

Build a Prescription Reminder
Pharmaceuticals prescribed by physicians are important to patients both old and young. But these medications will only do their job if taken according to a proper schedule. In this article, Devlin Gualtieri describes his Raspberry-Rx Prescription Reminder project, a network-accessible, the Wi-Fi connected, Raspberry Pi-based device that alerts a person when a particular medication should be administered. It also keeps a log of the actual times when medications were administered.

ENGINEERING TIPS, TRICKS AND TECHNIQUES

The Art of Current Probing
In his February column, Robert Lacoste talked about oscilloscope probes—or more specifically, voltage measurement probes. He explained how selecting the correct probe for a given measurement, and using it as it properly, is as important as having a good scope. In this article, Robert continues the discussion with another common measurement task: Accurately measuring current using an oscilloscope.

Software Engineering
There’s no doubt that achieving high software quality is human-driven endeavor. No amount of automated code development can substitute for best practices. A great tool for such efforts is the IEEE Computer Society’s Guide to the Software Engineering Body of Knowledge. In this article, George Novacek discusses some highlights of this resource, and why he has frequently consulted this document when preparing development plans.

HV Differential Probe
A high-voltage differential probe is a critical piece of test equipment for anyone who wants to safely examine high voltage signals on a standard oscilloscope. In his article, Andrew Levido describes his design of a high-voltage differential probe with features similar to commercial devices, but at a considerably lower cost. It uses just three op amps in a classic instrumentation amplifier configuration and provides a great exercise in precision analog design.

Side-Channel Power Analysis

Easy Path to Proof

Side-channel power analysis is a method of breaking security on embedded systems, and something Colin has covered extensively in his column. This time Colin shows how you can prove some of the fundamental assumptions that underpin side-channel power analysis. He uses the open-source ChipWhisperer project with Jupyter notebooks for easy interactive evaluation.

By Colin O’Flynn

This month I thought I’d bring you an introduction to side-channel power analysis (again). I’ve covered this in past articles, but it’s been a few years and I know new readers are going to be picking up this issue of Circuit Cellar. But don’t worry—I’m doing more than just giving you a rehash of old material. My open-source ChipWhisperer project has recently had the Version 5.0 release, which uses a new interactive Python interface (using something called Jupyter notebooks). As part of this release, several new tutorials are available, and some of them cover aspects I haven’t previously shown you.

In particular, I’m going to show you how some of the fundamental assumptions around side-channel power analysis can be easily proven. It’s not something for which you have to take my word. It’s something you can test yourself, and experiment with the differences that show up for various firmware code you might be running.

Simple Power Analysis

My intro is going to push through all sorts of examples. The first thing we’ll talk about is simple power analysis (SPA). This form of power analysis commonly refers to the fact that you can see the flow of data through a system. This can be used to break code that has an execution path that depends on the secret data being processed. What sort of code might that be? We’ll take a look at a simple password check as shown in Listing 1. That might look straight-forward—but what if you could see the loop execution time? Power analysis lets us do exactly that, meaning that we could discover which character of our password was incorrect.

Listing 1
An example of a simple password check, where if one could figure out the loop count, one could recover the password byte-by-byte.

The code from Listing 1 also contains a trigger_high() and trigger_low() call. Those actually provide an added piece of instrumentation being used only for our demonstration. Using a resistor in the power pin, we could see how the power is varying, as in Figure 1. I’m doing that with my ChipWhisperer platform, but you could use an oscilloscope or other similar piece of gear. You can see in Figure 2 the loop has an obvious pattern, and we see four iterations through the loop.

Figure 1
Power consumption can be measured with a resistor in the VCC line of the device. Here I’ve also removed decoupling capacitors to improve the strength of the signal. We AC-couple the measurement to remove the high-DC bias, since we are looking at small variations only.

Figure 2 A power trace of the loop execution helps you understand how many iterations through the loop your code ran, which could break the password check in Listing 1.

How does that help us crack a password? We could monitor the power consumption of the device and send every possible first character of the password. When we see a change in the power trace, we know that suddenly another code path was taken. Most likely this “other code path” is in fact the loop going into the second iteration. We don’t need to be clever or look for a specific signature. We just look for “different.”

Listing 2
An example of a time-independent password check that could be broken by looking at power consumption of the device.

It’s hard to hide this difference. If we add a random delay afterward, we can still see the time at which the power traces changed. We can notice that at this point in time whether it seems to go into a busy-wait loop or continues processing data. If you don’t believe me, there is an exact example of this in the open-source ChipWhisperer Jupyter.
So, if you think you’re clever, you’ll implement the code as in Listing 2. This takes the same amount of time, no matter what code is executed. Let’s see how to break that.

Data Affects Power

What if I told you that the very data being processed affect the power consumption? The theory behind this is fairly simple. Internal to the device, a data bus consists of wires over a ground plane. Changing the voltage on this is equivalent to charging and discharging a capacitor. As a nice feature, most internal data-buses go to an intermediate state between valid data transmissions. These intermediate states mean that every time we send a value across the data-bus, we have to charge a certain number of data lines to the ‘1’ state. If we looked at the power consumed on the VCC rail, we would expect to see spikes related to the data being sent across a bus. If all the bits of the data-bus were going high, we would expect to see larger spikes than when only one or two lines went high. You can see our expected results in Figure 3.

Figure 3
Different numbers of bits being set to ‘1’ on the power trace result in different power consumption on each clock cycle.

But how could we test that? We could send some data to a chip, and try to find a location where, for example, we see a strong difference in the power being used that depends on the data. Since we expect our signal to be very weak, we might need to average a number of such traces over time.  …

Read the full article in the March 344 issue of Circuit Cellar
(Full article word count: 2133 words; Figure count: 7 Figures.)

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

VDOO Offers Certified Security Engineer Program

The world we live in is rapidly becoming connected on every possible level, from cars to security cameras, from HVAC systems to doors. While connectivity provides multiple product benefits, it also introduces a great security challenge to product developers, engineers and managers.

Devising security for connected devices is a daunting task that can no longer be overlooked. Finding the subject matter experts or internally gaining the unique knowledge and skills needed to develop secure-by-design embedded systems is difficult and costly.

With all that in mind, VDOO, a provider of an end-to-end IoT security solutions, has launched the VDOO Certified Security Engineer (VCSE) program to share its knowledge and research across the IoT industry. The VCSE program is a formal, hands-on training that provides extensive insight into how to integrate security into the development of IoT devices within two days. By actively taking part in sessions on threats, security implementation and testing methodologies, including hands-on lab experience, attendees will gain the fundamental security knowledge necessary to develop secure IoT devices.

After successfully completing the program, attendees will gain security expertise recognition and join an exclusive global network of IoT security professionals. The certification will help the attendees to become the focal point for the embedded system’s security in their organizations. In addition, the organization will earn two free consulting hours with VDOO’s top embedded security experts, to allow effective and practical implementation of the program’s contents.

To qualify for the VCSE training, one must have at least one year of actual development work experience with embedded products. Additionally, this training is not for experienced security professionals but rather for those looking to learn the fundamental building blocks of IoT security.

The upcoming workshops will take place in EU, US and Japan.

For more details, reach out to training@vdoo.com or visit the program’s webpage: https://www.vdoo.com/certified-security-engineer/

VDOO | www.vdoo.com

March Circuit Cellar: Sneak Preview

The March issue of Circuit Cellar magazine is out next week!. We’ve rounded up an outstanding selection of in-depth embedded electronics articles just for you, and rustled them all into our 84-page magazine.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:

 

Here’s a sneak preview of March 2019 Circuit Cellar:

POWER MAKES IT POSSIBLE

Power Issues for Wearables
Wearable devices put extreme demands on the embedded electronics that make them work—and power is front and center among those demands. Devices spanning across the consumer, fitness and medical markets all need an advanced power source and power management technologies to perform as expected. Circuit Cellar Chief Editor Jeff Child examines how today’s microcontroller and power electronics are enabling today’s wearable products.

Power Supplies for Medical Systems
Over the past year, there’s been an increasing trend toward new products that have some sort of application or industry focus. That means supplies that include either certifications, special performance specs or tailored packaging intended for a specific application area such as medical. This Product Focus section updates readers on these technology trends and provides a product gallery of representative medical-focused power supplies.

DESIGN RESOURCES, ISSUES AND CHALLENGES

Flex PCB Design Services
While not exactly a brand-new technology, flexible printed circuit boards are a critical part of many of today’s challenging embedded system applications from wearable devices to mobile healthcare electronics. Circuit Cellar’s Editor-in-Chief, Jeff Child, explores the Flex PCB design capabilities available today and whose providing them.

Design Flow Ensures Automotive Safety
Fault analysis has been around for years, and many methods have been created to optimize evaluation of hundreds of concurrent faults in specialized simulators. However, there are many challenges in running a fault campaign. Mentor’s Doug Smith presents an improved formal verification flow that reduces the number of faults while simultaneously providing much higher quality of results.

Cooling Electronic Systems
Any good embedded system engineer knows that heat is the enemy of reliability. As new systems cram more functionality at higher speeds into ever smaller packages, it’s no wonder an increasing amount of engineering mindshare is focusing on cooling electronic systems. In this article, George Novacek reviews some of the essential math and science around cooling and looks are several cooling technologies—from cold pates to heat pipes.

MICROCONTROLLER PROJECTS WITH ALL THE DETAILS

MCU-Based Solution Links USB to Legacy PC I/O
In PCs, serial interfaces have now been just about completely replaced by USB. But many of those interfaces are still used in control and monitoring embedded systems. In this project article, Hossam Abdelbaki describes his ATSTAMP design. ATSTAMP is an MCS-51 (8051) compatible microcontroller chip that can be connected to the USB port of any PC via any USB-to-serial bridge currently available in the market.

Pet Collar Uses GPS and Wi-Fi
The PIC32 has proven effective for a myriad of applications, so why not a dog collar? Learn how Cornell graduates Vidya Ramesh and Vaidehi Garg built a GPS-enabled pet collar prototype. The article discusses the hardware peripherals used in the project, the setup, and the software. It also describes the motivation behind the project, and possibilities to expand the project in the future.

Guitar Video Game Uses PIC32
While music-playing video games are fun, their user interfaces tend leave a lot to be desired. Learn how Cornell students Jake Podell and Jonah Wexler designed and built a musical video game that’s interfaced with using a custom-built wireless guitar controller. The game is run on a Microchip PIC32 MCU and uses a TFT LCD display to show notes that move across the screen towards a strum region.

… AND MORE FROM OUR EXPERT COLUMNISTS

Non-Evasive Current Sensor
Gone are the days when you could do most of your own maintenance on your car’s engine. Today they’re sophisticated electronic systems. But there are some things you can do with the right tools. In his article, By Jeff Bachiochi talks about how using the timing light on his car engine introduced him to non-contact sensor technology. He talks about the types of probes available and how to use them to read the magnitude of alternating current (AC

Impedance Spectroscopy using the AD5933
Impedance spectroscopy is the measurement of a device’s impedance (or resistance) over a range of frequencies. Brian Millier has designed many voltammographs and conductivity meters over the years. But he recently came across the Analog Devices AD5933 chip made by which performs most all the functions needed to do impedance spectroscopy. In this article, explores the technology, circuit design and software that serve these efforts.

Side-Channel Power Analysis
Side-channel power analysis is a method of breaking security on embedded systems, and something Colin O’Flynn has covered extensively in his column. This time Colin shows how you can prove some of the fundamental assumptions that underpin side-channel power analysis. He uses the open-source ChipWhisperer project with Jupyter notebooks for easy interactive evaluation.

Firms Team Up to Provide End-to-End LoRa Security Solution

Microchip Technology, in partnership with The Things Industries, has announced the what it claims is industry’s first end-to-end security solution that adds secure, trusted and managed authentication to LoRaWAN devices at a global scale. The solution brings hardware-based security to the LoRa ecosystem, combining the MCU- and radio-agnostic ATECC608A-MAHTN-T CryptoAuthentication device with The Things Industries’ managed join servers and Microchip’s secure provisioning service.

The joint solution significantly simplifies provisioning LoRaWAN devices and addresses the inherent logistical challenges that come with managing LoRaWAN authentication keys from inception and throughout the life of a device. Traditionally, network and application server keys are unprotected in the edge node, and unmonitored, as LoRaWAN devices pass through various supply chain steps and are installed in the field.

The Common Criteria Joint Interpretation Library (JIL) “high”-rated ATECC608A comes pre-configured with secure key storage, keeping a device’s LoRaWAN secret keys isolated from the system so that sensitive keys are never exposed throughout the supply chain nor when the device is deployed. Microchip’s secure manufacturing facilities safely provision keys, eliminating the risk of exposure during manufacturing. Combined with The Things Industries’ agnostic secure join server service to the LoRaWAN network and application server providers, the solution decreases the risk of device identity corruption by establishing a trusted authentication when a device connects to a network.

Similar to how a prepaid data plan works for a mobile device, each purchase of an ATECC608A-MAHTN-T device comes with one year of managed LoRaWAN join server service through The Things Industries. Once a device identifies itself to join a LoRaWAN network, the network contacts The Things Industries join server to verify that the identity comes from a trusted device and not a fraudulent one. The temporary session keys are then sent securely to the network server and application server of choice. The Things Industries’ join server supports any LoRaWAN network, from commercially operated networks to private networks built on open-source components. After the one-year period, The Things Industries provides the option to extend the service.

Microchip and The Things Industries have also partnered to make the onboarding process of LoRaWAN devices seamless and secure. LoRaWAN device identities are claimed by The Things Industries’ join server with minimal intervention, relieving developers from needing expertise in security. Customers can not only choose any LoRaWAN network but can also migrate to any other LoRaWAN join server by rekeying the device. This means there is not a vendor lock-in and customers have full control over where and how the device keys are stored.

The ATECC608A is agnostic and can be paired with any MCU and LoRa radio. Developers can deploy secure LoRaWAN devices by combining the ATECC608A with the SAM L21 MCU, supported by the Arm Mbed OS LoRaWAN stack, or the recently-announced SAM R34 System-in-Package with Microchip’s LoRaWAN stack. For rapid prototyping, designers can use the CryptoAuthoXPRO socket board and The Things Industries provisioned parts in samples with the SAM L21 Xplained Pro (atsamd21-xpro) or SAM R34 Xplained Pro (DM320111).

The ATECC608A-MAHTN-T device for The Things Industries, including the initial year of prepaid TTN service, is available in volume production for $0.81 each in 10,000-unit quantities.

Microchip Technology | www.microchip.com

 

Free IoT Security Platform Runs on OpenWrt Routers and the Raspberry Pi

By Eric Brown

At the Consumer Electronics Show (CES) in Las Vegas, Minim announced a free spin-off of Minim, its cloud-managed Wi-Fi and security Software as a Service (SaaS) platform. Minim Labs is designed to work with a new open source software agent called Unum that runs on Raspbian and OpenWrt Linux devices. Optimized images are available for the OpenWrt-based Gli.Net GL-B1300 router and Raspberry Pi. The first 50 sign-ups will get the B1300 router for free (see below).


Minim Labs setup screen
(click image to enlarge)
The Minim Labs toolkit “secures and manages all connected devices in the home, such as the Google Home Hub, Sony Smart TV, and FreeRTOS devices,” providing “device fingerprinting, security scans, AI-powered recommendations, router management, analytics, and parental controls,” says Minim. By signing up to a Minim Labs account you receive a MAC address to register an Unum-enabled device.

The GitHub hosted Unum agent runs on the Linux router where it identifies connected devices and securely streams device telemetry to the Minim platform. Users can open a free Minim Labs account to register up to 10 Unum-enabled devices, offering access to Minim WiFi management apps and APIs. Alternately, you can use Unum with your own application server.

The GL-B1300 and Raspberry Pi builds are designed to walk “home network tinkerers” through the process of protecting devices with Unum and Minim Labs. More advanced developers can download a Unum SDK to modify the software for any OpenWrt-based router.

“By open sourcing our agent and giving technologists free access to our platform, we hope to build a global community that’ll contribute valuable product feedback and code,” stated Jeremy Hitchcock, Founder and CEO of Minim.

Gli.Net’s OpenWrt routers

Gli.Net’s GL-B1300 router runs OpenWrt on a quad-core, Cortex-A7 Qualcomm Atheros IPQ4028 SoC clocked to 717 MHz. The SoC is equipped with a DSP, 256MB RAM, 32 MB flash, and dual-band 802.11ac with 2×2 MIMO. The SoC and supports up to 5-port Ethernet routers abd provides Qualcomm TEE, Crypto Engine, and Secure Boot technologies.


 
GL-B1300 (left) and GL-AR750S
(click images to enlarge)
The GL-B1300 router has dual GbE ports, a WAN port, and a USB 3.0 port. The $89 price includes a 12V adapter and Ethernet cable.

The testimonial quote below says that the GL-AR750S Slate router, which is a CES 2019 Innovation Awards Honoree, will also support Unum and Minim Labs out of the box. The $70 GL-AR750S Slate runs on a MIPS-based, 775MHz Qualcomm QCA9563 processor and is equipped with 128MB RAM, 128MB NAND flash, and a microSD slot.

The Slate router provides 3x GbE ports and dual-band 802.11ac with dual external antennas. Other features include USB 2.0 and micro-USB power ports plus a UART and GPIO. The router supports WireGuard, OpenVPN, and Cloudflare DNS over TLS.


Gli.Net router comparison chart, including GL-B1300 and GL-AR750S
(click image to enlarge)
In addition to its routers, Gli.Net also sells the OpenWrt-on-Atheros/MIPS Domino Core computer-on-module. The Domino Core shipped in a Kickstarter launched Domino.IO IoT kit back in 2015.

“We are glad that Minim is going to launch open-source tools for DIY users and increase awareness of personal Internet security,” stated GL.iNet CTO Dr. Alfie Zhao. “This initiative shows shared value and vision with GL.iNet. We are happy to provide support for Minim tools on our GL-AR750S Slate router and GL-B1300 router, both of which have support to the latest OpenWrt.”

Further information

The free Minim Labs security platform is available for signup now, and the open source Unum agent is available for download. Minim is offering the first 50 Minim Labs signups with a free startup kit containing the GL-B1300 router. More information may be found at the Minim Labs product page.

This article originally appeared on LinuxGizmos.com on January 9.

Minim | www.minim.co

 

Building Automation LON-IP Standard Earns ANSI/CTA Approval

The Consumer Technology Association(CTA) and LonMark International have announced that the ANSI/CTA-709.7 LON IP is now approved as a new American National Standard (ANS) by the American National Standards Institute (ANSI). The new standard focuses on the interoperability of Internet of Things (IoT) devices and provides a complete model for implementing LON IP device-to-device and device-to-application communication interoperability.
This new standard will provide multiple parties – including users, developers, vendors, integrators and specifiers of open building control systems – a mechanism to develop and deliver a higher level of interoperability using native Ethernet/IP based devices. The new standard describes the complete set of requirements for vendors to develop LON devices with native IP communications, which offers higher speed and better IT integration flexibility. As more building control networks require more data and more IoT application interfaces, this new media type for LON control networks provides all of the benefits and functionality to meet this growing demand.

The ANSI/CTA-709.7 Implementation Guidelines define the application layer requirements for interoperable devices to communicate directly on Ethernet. It defines the addressing requirements for both IPv4 and IPv6. LonMark will offer full interoperability testing of any device utilizing the new channel type. The standard defines all of the timing parameters, configuration, and interface requirements to the full 709.1 protocol stack.

A few years prior the ANSI/CTA-709.6 Application Elements built upon the ANSI/CTA-709.5 Implementation Guidelines by providing a catalog of more than 100 common device profiles, with more than 380 specific implementation options. These profiles define the mandatory and optional design requirements for standard data variables, standard configuration properties, enumeration types and standard interface file requirements. This extensive library of device profiles includes definitions for a broad collection of devices for HVAC, indoor and outdoor (roadway) lighting, security, access, metering, energy management, fire and smoke control, gateways, commercial and industrial I/O, gas detection, generators, room automation, renewable energy, utility, automated food service, semiconductor fabrication, transportation, home appliances and others.

LonMark International | www.lonmark.org