Binary File Open-Source Package Identification via Hash Matching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Verifying the open-source license for software is challenging when the source code is compiled into binary files, as it is difficult for users to identify the original open-source software package and its license information from the binary code.
Innovation Solution
A method and system that extract hash values from both reference open-source files and target binary files, using a database to match and identify the corresponding open-source software package, including classification by CPU architectures and operating systems, and utilizing similarity hash values to determine the matching software package.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If source code is compiled into binary files, then software execution efficiency is improved, but license verification capability deteriorates
Solution Approach 1:
The system performs preliminary actions by extracting and storing hash values of source code files and their corresponding binary files before compilation. This creates a reference database that preserves the relationship between source code and binary outputs, enabling later verification without needing to access the original source code.
Solution Approach 2:
The system creates a copy of the verification capability by storing hash values (digital fingerprints) of both source code and binary files. Instead of requiring access to the actual source code for verification, the system uses these copied hash representations to identify and verify the binary file's origin and license status.
2Measurement precision
If hash value matching is performed across multiple CPU architectures and operating systems, then identification accuracy is improved, but system complexity increases
Solution Approach 1:
The system segments the verification process by creating separate database entries for different CPU architectures (x86, ARM, MIPS, PowerPC) and operating systems. Each architecture-OS combination is handled as an independent segment with its own hash value sets, allowing precise matching without cross-contamination and simplifying the overall matching logic.
Solution Approach 2:
The system achieves universality by designing a unified database structure and matching algorithm that can handle multiple CPU architectures and operating systems simultaneously. The same hash extraction and matching process works across all platforms, eliminating the need for architecture-specific verification logic while maintaining high identification accuracy.
Data Source
AI summary
The present disclosure provides a method and system for identifying an open-source software package from a binary file for which an open-source license is to be checked. The method includes: accessing an open-source database generated to include a plurality of reference binary files and a plurality of reference open-source software packages having a plurality of reference open-source files, based on a plurality of first hash values extracted from the plurality of reference binary files generated from the plurality of reference open-source files; receiving the target binary file; extracting a plurality of second hash values including at least two general hash values from the target binary file; extracting at least two first hash values corresponding to the plurality of second hash values among the plurality of first hash values; and identifying a reference open-source software package corresponding to the at least two first hash values based on the open-source database.


