Embedding Protective Code in Machine Instruction Blocks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software protection methods are vulnerable to hacking and require significant additional memory and costly modifications to programmable circuits, lacking efficient and cost-effective solutions for embedding protective codes within machine code without increasing data size.

Innovation Solution

The method involves generating a protective code with a predefined relationship to an instruction block, identifying free ranges within the block, and embedding the code within these ranges, using entropy coding and digital signatures to ensure integrity and authenticity without increasing memory requirements, allowing for protection of software at moderate cost.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If protective code is embedded within machine code instructions, then software protection is achieved without increasing data size, but the complexity of code generation and analysis increases

Engineering Contradiction:
Improvedata sizeVSAvoidcode generation complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The machine code is divided into instruction blocks, and the protective code is segmented and embedded within specific free ranges of these blocks. This segmentation allows the protective code to be integrated without increasing the overall data size, as it utilizes previously unused spaces within the instruction structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Free ranges are identified and marked in advance during code generation, before the protective code is embedded. This preliminary identification of available spaces simplifies the subsequent embedding process and reduces the complexity of integrating protection mechanisms into the existing code structure.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If protective code is appended to instruction blocks, then software protection is achieved, but the data size increases

Engineering Contradiction:
Improvesoftware protectionVSAvoiddata size
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The protective code is nested within the existing instruction block structure by embedding it in free ranges. This nesting approach allows the protection mechanism to be contained within the original data boundaries, preventing any increase in data size while maintaining software protection.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

Different parts of the instruction block are assigned different functions: some bits carry original instruction information while other bits (free ranges) carry protective code information. This local differentiation allows simultaneous preservation of original functionality and addition of protection without increasing overall data size.

Inventive Principle:
Principle #3Local quality

3Quantity of substance

If free ranges are identified and used for embedding protective code, then data size is minimized, but the analysis process becomes more complex

Engineering Contradiction:
Improvedata sizeVSAvoidfree range identification difficulty
Core Design Contradiction:
Quantity of substanceVSDifficulty of detecting and measuring

Solution Approach 1:

Free ranges are identified and marked during the code generation phase, before execution. This preliminary identification simplifies the embedding process by having all necessary information prepared in advance, reducing the complexity of detecting and measuring free ranges during subsequent operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The code generating device acts as an intermediary that automatically identifies free ranges and embeds protective code without requiring complex analysis during execution. This intermediary process transfers the complexity from runtime detection to compile-time generation, where it can be handled more efficiently.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Ease of manufacture

If machine code is used for commercialization, then software distribution is simplified, but vulnerability to hacking increases

Engineering Contradiction:
Improvesoftware distributionVSAvoidhacking vulnerability
Core Design Contradiction:
Ease of manufactureVSObject-affected harmful factors

Solution Approach 1:

The protective code is merged with the machine code by embedding it within the instruction block structure. This merging maintains the original machine code format for simplified distribution while integrating protection mechanisms that increase resistance to hacking and unauthorized modification.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

Protective code is embedded in advance within the machine code to prevent hacking and unauthorized modification before distribution. This preliminary anti-action incorporates security measures directly into the distributed software, maintaining ease of distribution while preemptively countering potential security threats.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentEP2404254B1Software protection
Publication Date: 2015.11.11 NXP BV
  • EP2404254B1 patent drawingFigure 1
  • EP2404254B1 patent drawingFigure 2A~2C
  • EP2404254B1 patent drawingFigure 3

AI summary

A program (MC), which can be executed by a programmable circuit, is protected in the following manner. An instruction block (IB) is provided on the basis of at least a portion (MC-P) of the program. A protective code (DS) is generated that has a predefined relationship with the instruction block (IB). The instruction block (IB) is analyzed (ANL) so as to identify free ranges (FI) within the instruction block that are neutral with respect to an execution of the instruction block. The free ranges comprise at least one of the following types: bit ranges and value ranges. The free ranges that have been identified are used for embedding (SEB) the protective code (DS) within the instruction block (IB).