Code Obfuscation for Block Diagram Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing graphical modeling environments generate code that can be easily read by humans, posing a challenge when users want to share source code with third parties without revealing the underlying algorithm, as the code needs to be intelligible to compilers but not to humans.

Innovation Solution

A method to obfuscate code generated from block diagrams, making it unintelligible to humans while maintaining its compilability, by using techniques such as converting strings, renaming non-system header files, replacing numeric constants, removing loops, and applying a one-way hash function, ensuring the obfuscated code retains the original code's behavior.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code is generated from block diagrams for sharing with third parties, then code compilability is maintained, but code intelligibility to humans is compromised

Engineering Contradiction:
Improvecode compilabilityVSAvoidalgorithm intelligence
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent introduces an obfuscation layer as an intermediary between the original algorithm code and the shared code. This intermediary transforms the code into an obfuscated form that maintains compilability while hiding the underlying algorithmic logic, allowing third parties to use the code without understanding the original implementation details

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent applies parameter changes by transforming code elements such as variable names, function names, and control structures into equivalent but semantically different representations. The obfuscated code uses transformed parameters that preserve the functional behavior while eliminating human-readable meaning, thus resolving the contradiction between compilability and algorithm intelligibility

Inventive Principle:
Principle #35Parameter changes

2Reliability

If code is made unintelligible to humans through obfuscation, then algorithm protection is improved, but code readability and debugging capability deteriorate

Engineering Contradiction:
Improvealgorithm protectionVSAvoidcode readability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent applies local quality by selectively obfuscating only specific portions of the code while leaving other portions readable. This allows different parts of the codebase to have different levels of obfuscation based on their sensitivity, enabling algorithm protection for critical sections while maintaining readability for utility functions and interfaces

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements dynamic obfuscation where the degree of obfuscation can be adjusted based on operational context. The system can dynamically control which code segments are obfuscated and which remain readable, allowing developers to balance algorithm protection with debugging capability based on the specific operational requirements

Inventive Principle:
Principle #15Dynamics

3Reliability

If multiple obfuscation techniques are applied to code, then algorithm protection is enhanced, but code complexity increases

Engineering Contradiction:
Improvealgorithm protectionVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies segmentation by dividing the obfuscation process into distinct, modular techniques that can be applied independently. Each obfuscation technique operates on specific code elements separately, making the overall process more manageable and allowing selective application based on the specific protection needs of different code regions

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8832646B1Obfuscation of automatically generated code
Publication Date: 2014.09.09 MATHWORKS INC
  • US8832646B1 patent drawing
  • US8832646B1 patent drawing
  • US8832646B1 patent drawing

AI summary

A method is provided for obfuscating code generated from a block diagram model in a graphical programming environment. The obfuscation may be removed through the use of a password. Incorporating the obfuscated code in a block diagram allows for code to be generated from the block diagram incorporating the obfuscated code.