Firmware Integrity Verification Using Random Memory Padding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing solutions for verifying the integrity of program code in embedded systems are inadequate, particularly in scenarios where unauthorized modifications can occur, and hardware upgrades are costly or impractical, as they either rely on secure micro-controllers or naive digest calculations that can be defeated by attackers.

Innovation Solution

Filling unused memory on accessory devices with high entropy random data and using a secure hash function to generate a digest from unpredictable memory ranges, which is then validated by the host system, preventing unauthorized changes and ensuring the integrity of the program code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If secure micro-controllers are used to authenticate program code, then security and reliability are improved, but device complexity and cost increase

Engineering Contradiction:
Improveprogram code integrityVSAvoidhardware complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent uses software-based authentication mechanisms instead of expensive secure hardware, treating the authentication system as a disposable software layer that can be updated and replaced without hardware changes. This eliminates the need for secure micro-controllers while maintaining security through software-only solutions.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Solution Approach 2:

The patent replaces the mechanical/hardware-based secure micro-controller authentication system with a software-based digest verification system. Instead of using hardware security modules, the invention uses software hashing algorithms (MD5, SHA-1, etc.) to verify program code integrity, substituting physical security mechanisms with computational ones.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If all program code is transmitted to host system for verification, then verification accuracy is improved, but communication time and bandwidth requirements increase

Engineering Contradiction:
Improveverification accuracyVSAvoidverification time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent extracts only the essential verification information (digest/hash value) from the complete program code and transmits this condensed representation to the host system. Instead of transmitting or processing the entire program code, the invention extracts a compact digest that represents the entire code base, enabling fast verification without handling the full code volume.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent transforms the program code from its original large-size form into a compact digest representation through hashing operations. This parameter transformation changes the code from a large binary blob into a small fixed-size hash value, making verification efficient and bandwidth-friendly while maintaining verification accuracy through cryptographic properties of the hash function.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If digest verification is implemented without memory padding, then ease of operation is improved, but security against code alteration is worsened

Engineering Contradiction:
Improveverification simplicityVSAvoidsecurity against alteration
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent performs preliminary padding of unused memory spaces with random data before the authentication process. This advance preparation ensures that when digest verification occurs, all memory spaces including previously unused areas are included in the verification, preventing attackers from altering code in unused spaces without detection. The padding is done in advance as part of the firmware image preparation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent converts the potential harm of unused memory spaces (which could be exploited by attackers to hide altered code) into a benefit by filling these spaces with random padding data. The previously harmful unused spaces become security assets that enhance verification reliability, as any alteration to these padded spaces will be detected during digest verification.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

Data Source

PatentUS8566791B2Retrofitting authentication onto firmware
Publication Date: 2013.10.22 MALIKIE INNOVATIONS LTD
  • US8566791B2 patent drawing
  • US8566791B2 patent drawing
  • US8566791B2 patent drawing

AI summary

The present invention provides an inexpensive, software-based security-retrofit solution to verify the integrity of program code in embedded systems, or accessories, without resorting to expensive hardware changes. All unused memory on an accessory that could be used to store a program code image is filled with random data. A host system also locally stores a copy of the accessory's program image containing the random data. The host system sends the accessory a list of memory addresses or memory ranges on the accessory, which is always different and random in nature. The accessory will then produce a digest using values stored in the memory addresses as inputs to a secure hash function. The host system verifies the integrity of the embedded program code by verifying the resulting digest produced by and returned from the accessory.