Embedding Protective Code in Machine Instruction Blocks
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If protective code is appended to instruction blocks, then software protection is achieved, but the data size increases
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.
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.
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
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.
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.
4Ease of manufacture
If machine code is used for commercialization, then software distribution is simplified, but vulnerability to hacking increases
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.
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.
Data Source
Figure 1
Figure 2A~2C
Figure 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).