Checksum Verification for Code Integrity Between Generator and Compiler

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Code generated by code generators can be tampered with between the time it is stored and when it is compiled, compromising security as malicious entities can alter the code stored on unsecure locations without detection.

Innovation Solution

Implementing checksums, specifically cryptographic hash functions, to securely verify the integrity of code between the code generator and the compiler, ensuring that only unaltered code is compiled or loaded by using secure channels to isolate and compare checksums generated by both entities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If code is stored on persistent storage in an unsecure location, then storage accessibility and ease of operation are improved, but security and reliability deteriorate as the code may be altered by malicious entities

Engineering Contradiction:
Improvecode accessibilityVSAvoidcode integrity
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system performs preliminary actions by generating checksums of the code immediately after the code generator creates it and before the code is stored on persistent storage. These checksums are provided to the compiler through a secure channel in advance, establishing a baseline for detecting any subsequent tampering with the code.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces checksums as an intermediary mechanism to verify code integrity. The checksums act as a mediator between the code generator and compiler, allowing the compiler to verify whether the code has been altered without directly trusting the unsecure storage location.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If checksum verification is implemented between code generator and compiler, then code security and reliability are improved, but device complexity and processing overhead increase

Engineering Contradiction:
Improvecode securityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the security verification function into a separate, dedicated mechanism using checksums. Instead of embedding complex security protocols within the code generator and compiler themselves, the system uses standalone checksum generation and verification processes that operate independently but coordinate through secure channels.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system creates a cryptographic copy of the code's essential characteristics through checksums. Rather than duplicating the entire code or implementing complex verification logic, the patent uses checksums as simplified representations that capture the code's integrity state, making verification efficient and manageable.

Inventive Principle:
Principle #26Copying

3Measurement precision

If checksums are generated and compared to verify code integrity, then detection precision of tampering is improved, but processing time and loss of time increase

Engineering Contradiction:
Improvetampering detection accuracyVSAvoidverification time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent transforms the code into a different parameter representation through checksum generation. Instead of comparing the entire code between the code generator and compiler, the system converts the code into compact checksum values that preserve integrity information but require minimal processing time for comparison and verification.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11431727B2Security of code between code generator and compiler
Publication Date: 2022.08.30 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11431727B2 patent drawing
  • US11431727B2 patent drawing
  • US11431727B2 patent drawing

AI summary

Techniques are described herein that are capable of providing security for code between a code generator and a compiler. The code generator generates source code. The code generator generates a first checksum of a file that includes the source code. The code generator provides the first checksum to the compiler via a secure channel. The compiler generates a second checksum of the file that includes the source code. The compiler determines whether to compile the source code based at least in part on whether the first checksum and the second checksum are the same. The first checksum and the second checksum being the same indicates that the source code is to be compiled. The first checksum and the second checksum being different indicates that the source code is not to be compiled.