Microcontroller Program Protection via Cycle Counter Timing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing solutions for protecting digital values in microcontrollers from hacking attempts through fault injection are not transparent to users and require additional mechanisms for fraud detection, which can be detectable by hackers.

Innovation Solution

A method that starts a time counter during the execution of a main program, ensuring that critical instructions are executed at the correct time by transferring them to a secondary program, resulting in incorrect outputs if a trap occurs, thus protecting the main program without additional detection mechanisms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a signature calculation mechanism is added to protect program execution, then program protection capability is improved, but device complexity increases

Engineering Contradiction:
Improveprogram protection capabilityVSAvoidprotection mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system uses its own existing resources (cycle counter, instruction pointers, program counters) to provide protection functionality. The cycle counter that already exists for timing purposes is repurposed to detect execution flow anomalies, and the existing instruction/memory pointers are used to verify execution correctness without adding external monitoring components.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Existing single-function components are made multi-functional. The cycle counter serves both its original timing function and the new protection detection function. The instruction pointer and memory pointer, originally just addressing components, now also serve as verification elements for detecting unauthorized execution flow changes.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If multiple parallel program executions with coherence checking are implemented, then program protection capability is improved, but use of energy increases

Engineering Contradiction:
Improveprogram protection capabilityVSAvoidenergy consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

Instead of fully duplicating program execution multiple times in parallel, the system performs a partial verification by monitoring execution flow parameters. The cycle counter tracks the expected number of cycles, and the instruction/memory pointers are checked for consistency, providing protection without the full energy cost of complete parallel re-execution.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If a fraud detection mechanism is added to detect trap attempts, then program protection capability is improved, but device complexity increases

Engineering Contradiction:
Improvefraud detection capabilityVSAvoiddetection mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The detection mechanism uses the system's own existing components (cycle counter, instruction pointer, memory pointer) to detect fraud attempts. No separate detection hardware or software layer is needed - the existing execution parameters serve as both operational data and verification data for detecting unauthorized modifications.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The protection and detection functions are merged into the existing execution framework. The cycle counter that normally tracks execution time is also used to detect timing anomalies caused by trap attempts. The instruction and memory pointers that normally guide execution are also used to verify that execution flow has not been unauthorized diverted.

Inventive Principle:
Principle #5Merging (Combining)

4Ease of operation

If existing protection mechanisms are made transparent to users, then ease of operation is improved, but reliability may deteriorate

Engineering Contradiction:
Improveuser transparencyVSAvoidprotection effectiveness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The protection mechanism operates autonomously using existing system components without requiring user configuration or intervention. The cycle counter automatically tracks execution, and the pointer verification occurs transparently during normal operation, maintaining both user simplicity and protection reliability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7941639B2Protection of the execution of a program
Publication Date: 2011.05.10 STMICROELECTRONICS FRANCE
  • US7941639B2 patent drawing
  • US7941639B2 patent drawing

AI summary

A method for protecting the execution of a main program against possible traps, including, on occurrence of an instruction from the main program, starting a time counter of a given count according to next instructions of the main program, and executing, once the counter has reached its count, at least one instruction of a secondary program from which the result of the main program depends.