Code Watermarking via Whitespace Encoding for Attribution Persistence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for watermarking code to identify its origin or author are ineffective as they can be easily removed or altered, and do not maintain attribution during copying or compilation processes.

Innovation Solution

A method that encodes identification data into whitespace characters within code, replacing or inserting them based on the number of existing whitespace characters, allowing for embedded attribution without altering the code's visual appearance or functionality.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If copyright statements are placed within comments to watermark code, then identification data is embedded in the code, but the identification data can be easily removed by users when copying the code

Engineering Contradiction:
Improvepersistence of identification dataVSAvoidease of removal of identification data
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The patent merges the identification data with the functional code by encoding it into whitespace characters that are integral to the code structure. Unlike separate comments, the whitespace-encoded identification is embedded within the code flow itself, making it inseparable from the functional portions that users need to copy.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent creates multiple copies of the identification data distributed throughout the code at different locations. When users copy functional portions of the code, they inadvertently copy multiple instances of the embedded identification data, ensuring persistence even if some instances are missed.

Inventive Principle:
Principle #26Copying

2Loss of information

If identification data is embedded in visible form in code, then attribution is clear, but the visual appearance and readability of the code are altered

Engineering Contradiction:
Improveclarity of attributionVSAvoidhuman readability of code
Core Design Contradiction:
Loss of informationVSEase of operation

Solution Approach 1:

The patent uses whitespace characters (spaces, tabs, newlines) as the encoding medium, which are invisible or imperceptible to human readers. This is analogous to changing the 'color' or visual properties of the embedded data to be imperceptible, thereby maintaining code readability while embedding identification information.

Inventive Principle:
Principle #32Color changes

3Reliability

If traditional watermarking methods are used, then identification data can be added to code, but the watermarking can be easily removed or altered during copying or compilation

Engineering Contradiction:
Improvepersistence of attributionVSAvoidintegrity of identification data
Core Design Contradiction:
ReliabilityVSStability of the object's composition

Solution Approach 1:

The identification data is merged with the functional code structure through whitespace encoding. Since whitespace characters are essential to code formatting and structure, removing or altering them would corrupt the code's functionality, thereby protecting the embedded identification data from removal or alteration.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

Multiple copies of the identification data are embedded at different locations within the code. This redundancy ensures that even if some instances are removed or altered, other copies remain intact to maintain attribution integrity.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11580200B2Code identification
Publication Date: 2023.02.14 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11580200B2 patent drawing
  • US11580200B2 patent drawing
  • US11580200B2 patent drawing

AI summary

Systems and method for watermarking portions of code for the purposes of identification are described. A computer-implemented method of watermarking a portion of code with identification data includes: determining, by a computing device, a number of existing whitespace characters in the portion of code; encoding, by the computing device, the identification data using a set of reference whitespace characters; and embedding, by the computing device, the encoded identification data into the portion of code, wherein the embedding the encoded identification data includes, based on the determined number of existing whitespace characters, either replacing existing whitespace characters in the portion of code with the encoded identification data or inserting the encoded identification data characters into the portion of code.