How embedded security helps devices and cybersecurity

Cybersecurity is abundant in the software domain and primarily helps protect online systems from viruses, malware, release of confidential data, and other cyberthreats. But what about hardware? We currently live in an IoT-centric world where it seems that an increased amount of hardware devices has become wirelessly connected. And depending on the application, a lot of these devices can contain confidential information such as banking details, medical history, and other stored, personal details such as name, birthdate, age, sex, and address.

Though software is generally the first line of defense against digital attacks, having a last line of defense at the hardware level can greatly help reduce the risk of theft and release of sensitive information.

Software vs. hardware cybersecurity

Before we get into specific examples of embedded security applications, let’s quickly go over the similarities and differences between firmware-based and software-based security. For this comparison, we should assume that software includes programs that typically execute in a real-time operating system and on a PC or computer system with highly advanced processing (32 bits/64 bits) running at 1 GHz+. Firmware is code that has been compiled for lower-level processors or microcontrollers ranging from 8 bits to 32 bits, running on embedded devices that are more hardware-centric and at much lower clock rates. A peripheral device containing firmware could connect to a system running software and contain additional levels of defense or be used in a standalone configuration but still contain a high level of security.

Software security comes in all shapes and sizes, ranging from firewalls and other network-monitoring systems to anti-intrusion programs that fight off malicious software like malware, viruses, and keylogging programs.

Let’s start with the typical firewall program (shown in Figure 1). A firewall program is designed to keep an eye on every bit of network traffic that passes both in and out of the local domain. While most firewalls are software-based, there are some sophisticated hardware systems that can be implemented external to a computer, server, or any other online system and act as a network gateway. The software firewalls consist of several different types, such as static or dynamic packet filters that assist in fending off IP spoofing, source routing (re-directing packets to different addresses), and other IP and pathway threats.

Additional common firewall protection consists of application gateways, where proxy servers are created to separate the end user from the website they might be browsing and provide an intermediate hub for processing requests, web filtering, and providing privacy and a unique IP address.

1020 Cybersecurity for Embedded Devices Image 1

Figure 1: Diagram of a typical firewall program

Firewalls are a great guard against intrusion, but they certainly don’t catch everything. Supplemental software such as anti-spyware and anti-virus programs can be crucial to sensitive systems. Spyware is tricky and often takes the form of keylogging, which can be an essential part of a normal system’s operation because of password and authentication management. Spyware and viruses are harder to catch because they try to take the place of normal operations, and so detection of these often requires a detailed comparison between core programs and those that might be considered foreign. Other countermeasures for fighting off keylogging and viruses consist of one-time passwords, on-screen keyboards, automatic form-filling features for sensitive information, and even software that produces random keystrokes to make it harder for keyloggers to transcribe information.

While software cybersecurity typically protects against harmful programs that enter by connection from an external network, techniques for embedded device security on hardware are a bit more “cryptic” and central (or local) to the device. Because most hardware security doesn’t have the processing resources that PCs or server systems have, they often take the form of encryption and can even be implemented on something as simple as an 8-bit microcontroller.

Improving embedded systems security using cryptography for microcontrollers

There are various types of encryption protocols for embedded devices containing MCUs, and some can be very similar to those found on major CPUs. If the MCU has enough program memory, RAM, and processing speed, it can run full-sized encryption algorithms such as the Data Encryption Standard (DES) or even Triple DES (3DES). The DES algorithm, which has been around for almost 50 years, is less common these days, as it’s not as secure, although it does demonstrate fundamentals of crypto properties found in many other cryptography applications. Understanding DES will help with comprehending how most other methods of cryptography work, so let’s dive in.

DES cryptography employs a “text data” approach wherein it uses a 56-bit long key, a key block cipher, and an encryption and decryption process. During encryption, plain text and the keys are converted into binary bit data blocks of 64 bits each. These data blocks are then randomized based on an Initial Permutation (IP) table, stripped of each eighth bit (reduced to 56 bits), sent through a permutation table (PC-1), separated into two 28-bit data blocks, and then each half goes through several rounds (as many as 16 total rounds) of a circular left shift before passing through yet another Permutation table (PC-2). The combined result of each round is used as an input to the encryption algorithm (a 48-bit encryption key) along with the original 64-bit plain text. So far, we’ve produced the key and encrypted some data, but this is just the first part of the process — now we need the key block cipher, which is much more involved.

To save ourselves more confusion, let’s just take a look at Figure 2, which demonstrates how the 48-bit keys are used as part of the encryption process and how the key block cipher (area inside the dotted lines), otherwise known as the “F” or “Feistel function,” is used to generate cipher text (Li and Ri). For decryption, the cipher text and subkeys are used the same way, just in reverse order.

1020 Cybersecurity for Embedded Devices Image 2

Figure 2: Flowchart of a standard DES algorithm

Triple DES can be done a few different ways, but it is essentially the same as a DES process, just with two or three 56-bit keys instead of one. DES and 3DES encryption is commonly found in authentication hardware such as RFID or ATM machines.

Another major, full-sized cipher algorithm is the Advanced Encryption Standard (AES), and unlike the DES algorithm (its predecessor), it uses fixed block sizes of 128 bits and three key size variants of 128, 192, or 256 bits, and it operates without the use of a Feistel function. AES has three phases: initial round, main rounds, and final round (shown in Figure 3). After the initial round, where the round key and plain text data get Exclusive-Ored (XORed), several mixing and splitting operations per main round occur: SubBytes, ShiftRows, MixColumns, and an AES Key Schedule that produces a number of round keys (based on the chosen key variant) from the initial key. The final round is the same as the main rounds except without the MixColumns operation.

1020 Cybersecurity for Embedded Devices Image 3

Figure 3: Structure of AES encryption and decryption

Beyond the standard methods of data encryption, there are many other lighter-weight forms of cryptography that can be used to improve an embedded device’s security through the microcontroller, including authenticated encryption, block ciphers, stream ciphers, hash algorithms, public key algorithms, and random-number generation. Libraries for these kinds of algorithms are scattered throughout the web and are generally portable from one processor to the next, but all require varying amounts of memory and speed.

There are also standalone encryption/decryption integrated circuits (ICs) that work in conjunction with an MCU to protect data before transmitting or receiving/storing. For example, the ATECC608A (Microchip) provides secure, hardware-based key storage for algorithms requiring keys and random-number generation. NXP also offers authenticator ICs, such as the A71CH “Plug and Trust” family of chips that serve the IoT space by providing authentication, encryption, and key storage for connectivity applications.

And finally, many advanced processors typically include security features such as cryptographic acceleration (which helps with speed/memory optimization for highly computational encryption), secure storage, device identity with unique keys and addresses, support for network security and interface, IP protection, and boot-up/programming authentication. Examples of this can be found on Texas Instruments’ “Sitara” Processors, STMicroelectronics’ “ST31/ST33” security-dedicated processors, and the “SHARC+” Dual Core family of processors by Analog Devices.

Future of cybersecurity for embedded systems

For embedded systems security applications that involve storing or transferring sensitive data, using anything from portable, lightweight crypto algorithms to dedicated crypto ICs equipped with several security features can offer a great deal of protection. And where will the world of embedded cybersecurity be in 10 or 20 years from now? As processors are pushing the boundaries of memory and speed, cybersecurity will likely follow.


newsletter 1


Neue Beiträge

Leider ergab Ihre Suche kein Ergebnis

Aktuelles über Elektronikkomponenten­

Wir haben unsere Datenschutzbestimmungen aktualisiert. Bitte nehmen Sie sich einen Moment Zeit, diese Änderungen zu überprüfen. Mit einem Klick auf "Ich stimme zu", stimmen Sie den Datenschutz- und Nutzungsbedingungen von Arrow Electronics zu.

Wir verwenden Cookies, um den Anwendernutzen zu vergrößern und unsere Webseite zu optimieren. Mehr über Cookies und wie man sie abschaltet finden Sie hier. Cookies und tracking Technologien können für Marketingzwecke verwendet werden.
Durch Klicken von „RICHTLINIEN AKZEPTIEREN“ stimmen Sie der Verwendung von Cookies auf Ihrem Endgerät und der Verwendung von tracking Technologien zu. Klicken Sie auf „MEHR INFORMATIONEN“ unten für mehr Informationen und Anleitungen wie man Cookies und tracking Technologien abschaltet. Das Akzeptieren von Cookies und tracking Technologien ist zwar freiwillig, das Blockieren kann aber eine korrekte Ausführung unserer Website verhindern, und bestimmte Werbung könnte für Sie weniger relevant sein.
Ihr Datenschutz ist uns wichtig. Lesen Sie mehr über unsere Datenschutzrichtlinien hier.