A method and device for realizing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment

By using standalone signing and digest tools to generate certificate files in open-source operating systems, trusted installation in offline environments is achieved, solving the problems of rampant software piracy and server dependence in open-source operating systems, and ensuring application security and installation flexibility.

CN120408598BActive Publication Date: 2025-12-12WEAPON EQUIP RES INST OF CHINA NAT WEAPON EQUIP GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510929239.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-12-12
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

In open-source operating systems, existing technologies cannot achieve trusted installation of applications in offline environments, and there are problems such as rampant software piracy, reliance on centralized servers and networks, complex processes, and closed ecosystems.

Method used

The developer terminal uses a standalone signing tool and a standalone digest tool to generate signature and digest information files. These files are then combined with the certificate file to recompile and locally verify the application installation package, enabling trusted installation in an offline environment.

Benefits of technology

It ensures application security and authenticity in offline environments, reduces deployment costs, supports diverse development tools and installation scenarios, and avoids dependence on servers and networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408598B_ABST
    Figure CN120408598B_ABST
Patent Text Reader

Abstract

The application provides a method and device for realizing trusted installation of an open source operating system based on a certificate management mechanism in an offline environment. The method comprises a developer side and a user side process: the developer generates an application installation package APP_pack using a development tool, generates a signature information file sign and an abstract information file summary through a single machine signature tool and a single machine abstract tool respectively, combines the two files into a certificate file cert, and finally compiles a secure installation package APP_pack_new. The user side performs local verification through an operating system installation service, checks the certificate integrity, signature specification and conflict records in an installation record table installed_tab, and ensures that the software source is trusted and the content has not been tampered with. The application does not require networking or a centralized server, realizes secure installation in an offline environment through multi-dimensional certificate verification, and is suitable for fields with high security requirements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of application software development, and particularly relates to a method and device for realizing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment. BACKGROUND

[0002] In open source operating systems, the installation of application programs usually lacks strict security checks and normative requirements, leading to rampant pirated software and wrapper software, which seriously threatens the data security and system stability of users. Currently, some solutions rely on centralized application market servers, and all software needs to be uploaded to the server and published in the application market after being audited. Although this approach can curb the problem of pirated and wrapper software to some extent, it has the following significant defects:

[0003] Dependence on centralized servers: server resources must be built and maintained, increasing implementation costs and management burdens.

[0004] Forced online environment: users must be online to download and install software, which cannot meet the needs of offline scenarios.

[0005] Single channel: software release is completely dependent on the application market, limiting the freedom of choice for developers and users.

[0006] Another solution achieves dual audits of developer identity and application software through the coordinated work of a signing server, a developer server, and an application store server, thereby improving the security of software distribution. Specifically, developers need to register and obtain a signing certificate through the developer server, then submit identity information and software packages for audit, and the software can be published to the application store for users to download after passing the audit. Although this approach can effectively curb the spread of unsafe software, it has the following significant defects:

[0007] Dependence on centralized servers and online environment: the entire process must rely on the online coordination of the developer server, signing server, and application store, which cannot run in an offline environment, increasing deployment and operation costs.

[0008] Complex process: developers need to go through multiple registration, signing, and auditing steps, and users must obtain software through the application store, which lacks flexibility.

[0009] Ecological closure: similar to the closed source ecology of iOS, this solution requires developers to use specific tools and certificate systems, making it difficult to adapt to the diverse development environments of open source operating systems.

[0010] Therefore, there is an urgent need for a method capable of realizing trusted installation of open source operating system application programs in an offline environment, which can avoid dependence on servers and networks, ensure the authenticity of software sources and content through a multi-dimensional certificate management mechanism, and be compatible with diversified development tools and installation scenarios. SUMMARY

[0011] To solve the above technical problems, the present application provides a method and device for realizing trusted installation on an open source operating system in an offline environment based on a certificate management mechanism.

[0012] The first aspect of the present application discloses a method for realizing trusted installation on an open source operating system in an offline environment based on a certificate management mechanism; the method comprises:

[0013] Step S1, compiling and outputting an application installation package APP_pack file through a development tool;

[0014] Step S2, generating a signature information file through a standalone signature tool; the signature information file includes enterprise legal person information, software copyright information, developer information, and identification information of the application installation package APP_pack file;

[0015] Step S3, generating an abstract information file through a standalone abstract tool;

[0016] Step S4, combining the signature information file and the abstract information file to generate a certificate file through the development tool, and recompiling the application installation package APP_pack file according to the certificate file to output an application installation package APP_pack_new file;

[0017] Step S5, verifying and installing the application installation package APP_pack_new file through an operating system installation service according to the certificate file.

[0018] According to the method of the first aspect of the present application, the development tool, the standalone signature tool, and the standalone abstract tool independently run on the developer terminal without the need for networking or server support.

[0019] According to the method of the first aspect of the present application, the operating system installation service runs on the user terminal to realize trusted installation in an offline environment through local verification.

[0020] According to the method of the first aspect of the present application, in step S3, the abstract information file includes the software name, identification information, function introduction, title, content, business type, constituent elements, and valid time.

[0021] According to the method of the first aspect of the present application, in step S5, the operating system installation service verifies and installs the application installation package APP_pack_new file according to the certificate file, specifically including:

[0022] The operating system installation service checks whether the signature information file and the digest information file are contained in the application installation package APP_pack_new file;

[0023] If yes, the local database stored installation record table is queried to check whether the same record as the digest information file in the application installation package APP_pack_new file exists;

[0024] If yes, the content of the signature information file in the application installation package APP_pack_new file is checked;

[0025] If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, direct installation is performed without updating the installation record table.

[0026] According to the method of the first aspect of the present application, if the same record as the digest information file in the application installation package APP_pack_new file does not exist in the installation record table, it is queried whether a similar record as the digest information file in the application installation package APP_pack_new file exists in the installation record table; wherein if the content of any record in the installation record table is partially the same as the content of the digest information file in the application installation package APP_pack_new file, it is determined that a similar record as the digest information file in the application installation package APP_pack_new file exists in the installation record table;

[0027] If it is determined that a similar record as the digest information file in the application installation package APP_pack_new file exists in the installation record table, it is prompted that there is risky software.

[0028] According to the method of the first aspect of the present application, if it is determined that a similar record as the digest information file in the application installation package APP_pack_new file does not exist in the installation record table, the content of the signature information file in the application installation package APP_pack_new file is checked;

[0029] If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, direct installation is performed, and a record is inserted in the installation record table after the installation is successful.

[0030] The second aspect of the present application discloses a device for realizing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment, and the device comprises:

[0031] The development tool is configured to compile an application installation package APP_pack file, combine a signature information file and a summary information file to generate a certificate file, recompile the application installation package APP_pack file according to the certificate file, and output an application installation package APP_pack_new file.

[0032] The single machine signature tool is configured to generate a signature information file; the signature information file includes enterprise legal person information, software copyright information, developer information and identification information of the application installation package APP_pack file.

[0033] The single machine summary tool is configured to generate a summary information file.

[0034] The operating system installation service is configured to verify and install the application installation package APP_pack_new file according to the certificate file.

[0035] The third aspect of the present application discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the method for realizing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to any one of the first aspect of the present application.

[0036] The fourth aspect of the present application discloses a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for realizing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to any one of the first aspect of the present application.

[0037] In summary, the scheme proposed by the present application has the following technical effects:

[0038] Offline available: no server or network is needed, and local certificate verification is used to ensure safety;

[0039] Lightweight: the developer tool and the installation service are single machine running, reducing deployment cost;

[0040] Multi-dimensional verification: combined with signature (sign), summary (summary) and installation record table triple verification, to prevent tampering and repeated installation risk. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0042] Figure 1 A flow chart of a method for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to an embodiment of the present application;

[0043] Figure 2 A structural diagram of an apparatus for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to an embodiment of the present application;

[0044] Figure 3 A structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0046] According to an embodiment of the present application, a first aspect provides a method for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment. Please refer to Figure 1 , the method comprises:

[0047] Step S1, compiling and outputting an application installation package APP_pack file through a development tool;

[0048] Step S2, generating a signature information file through a single machine signature tool; the signature information file includes enterprise legal person information, software copyright information, developer information and identification information of the application installation package APP_pack file;

[0049] Step S3, generating an abstract information file through a single machine abstract tool;

[0050] According to the method of the first aspect of the present application, in the step S3, the abstract information file includes a software name, identification information, a function introduction, a title, content, a business type, a constituent element and a valid time.

[0051] Step S4, combining the signature information file and the abstract information file to generate a certificate file through the development tool, and recompiling the application installation package APP_pack file according to the certificate file to output an application installation package APP_pack_new file;

[0052] Step S5, according to the certificate file, the application installation package APP_pack_new file is checked and installed by the operating system installation service.

[0053] According to the method of the first aspect of the application, in step S5, according to the certificate file, the application installation package APP_pack_new file is checked and installed by the operating system installation service, specifically including:

[0054] The operating system installation service checks whether the application installation package APP_pack_new file contains the signature information file and the digest information file;

[0055] If yes, it is queried whether there is a record in the installation record table stored in the local database which is the same as the digest information file in the application installation package APP_pack_new file;

[0056] If yes, it is checked whether the content of the signature information file in the application installation package APP_pack_new file is standard;

[0057] If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, it is directly installed without updating the installation record table.

[0058] According to the method of the first aspect of the application, if there is no record in the installation record table which is the same as the digest information file in the application installation package APP_pack_new file, it is queried whether there is a record in the installation record table which is similar to the digest information file in the application installation package APP_pack_new file; wherein if the content of any record in the installation record table is partially the same as the content of the digest information file in the application installation package APP_pack_new file, it is determined that there is a record in the installation record table which is similar to the digest information file in the application installation package APP_pack_new file;

[0059] If it is determined that there is a record in the installation record table which is similar to the digest information file in the application installation package APP_pack_new file, it is prompted that there is risky software.

[0060] According to the method of the first aspect of the application, if it is determined that there is no record in the installation record table which is similar to the digest information file in the application installation package APP_pack_new file, it is checked whether the content of the signature information file in the application installation package APP_pack_new file is standard;

[0061] If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, it is directly installed, and a record is inserted in the installation record table after the installation is successful.

[0062] According to the method of the first aspect of the application, the development tool, the single-machine signing tool, and the single-machine summary tool are independently run on the developer terminal without the need for networking or server support.

[0063] According to the method of the first aspect of the application, the operating system installation service is run on the user terminal to achieve trusted installation in an offline environment through local verification.

[0064] Embodiment 1: Developer-side certificate generation and software packaging

[0065] Step 1: Generate an application installation package (APP_pack)

[0066] The developer compiles the source code using a conventional development tool (such as GCC, CMake, etc.) to generate a standard application installation package file (such as.deb,.rpm, or a binary executable file), denoted as APP_pack.

[0067] Step 2: Generate a signature information file (sign)

[0068] The developer runs the single-machine signing tool (an independent program without the need for networking) and inputs the following information:

[0069] Enterprise legal person information (such as a unified social credit code)

[0070] Software copyright information (such as a registration number)

[0071] Developer identity (such as a digital certificate or PGP public key)

[0072] Application unique identifier (such as a package name and version number)

[0073] The signing tool generates a digital signature using an asymmetric encryption algorithm (such as RSA or ECC) and outputs a sign file. This file ensures that the software source is trusted and has not been tampered with.

[0074] Step 3: Generate a summary information file (summary)

[0075] The developer runs the single-machine summary tool (also independently run) and inputs the following metadata:

[0076] Software name and version number

[0077] Function introduction and dependencies

[0078] Business type (such as finance, medical treatment, etc.)

[0079] Valid time (such as an expiration date)

[0080] The summary tool generates a summary file using a hash algorithm (such as SHA-256) for content verification during subsequent installation.

[0081] Step 4: Combine the certificate file (cert) and generate the final installation package

[0082] The developer uses the application development tool to package the sign and summary files into the certificate file cert, and recompiles with the original APP_pack to generate the final secure installation package APP_pack_new.

[0083] Example 2: User-side installation verification (no conflict scenario)

[0084] Step 1: Installation package parsing

[0085] The user runs the installation command (such as sudo dpkg -i APP_pack_new), and the operating system installation service first checks whether APP_pack_new contains the sign and summary files. If either file is missing, the installation is terminated and an error is reported: "Certificate incomplete, installation denied".

[0086] Step 2: Signature verification

[0087] If the file parsing finds that both sign and summary exist, the initial verification passes, and the following verification steps are performed:

[0088] Query the installed record table installed_tab in the local database to see if there is a record identical to the summary. If there is, the installation service uses the pre-installed public key (such as the system's built-in CA certificate) to verify the legality of the sign file:

[0089] If the check passes, the installation is directly overwritten without updating the installed record table installed_tab table;

[0090] If the check does not pass, the user is prompted that the new installation package APP_pack_new information is incomplete, and the prompt information can be: "Software signature verification failed, possible risk".

[0091] When the installation service parses the sign file, it finds one of the following problems:

[0092] Developer certificate has been revoked

[0093] Software copyright information does not match the summary

[0094] Valid time has expired

[0095] Handling:

[0096] Terminate the installation and record the security log;

[0097] Prompt the user: "The software certificate is invalid, please contact the developer for an updated version".

[0098] Example 3: User-side installation verification (conflict scenario)

[0099] Scenario: Similar software is detected (summary')

[0100] There is a record similar to summary but not exactly the same in installed_tab (such as different business types, otherwise the same), indicating that there may be a conflict. At this time:

[0101] A pop-up window is prompted to the user: "Similar software [Software A] has been detected, do you want to uninstall and install the new version [Software A']?"

[0102] User selection:

[0103] Keep the old version: terminate installation.

[0104] Uninstall and install: uninstall the old version, continue to install APP_pack_new, and update the installed_tab record.

[0105] If there is no summary', then start checking the content specification of the sign file, if the check is passed, directly install and insert a record summary in the installed_tab record table after the installation is successful;

[0106] The second aspect of the application discloses a device for realizing trusted installation of an open source operating system based on a certificate management mechanism in an offline environment, please refer to Figure 2 , the device comprises:

[0107] A development tool configured to compile an application installation package APP_pack file, combine a signature information file and a digest information file to generate a certificate file, and recompile the application installation package APP_pack file according to the certificate file to output an application installation package APP_pack_new file;

[0108] A standalone signature tool configured to generate a signature information file; the signature information file includes: enterprise legal information, software copyright information, developer information, and identification information of the application installation package APP_pack file;

[0109] A standalone digest tool configured to generate a digest information file;

[0110] An operating system installation service configured to verify and install the application installation package APP_pack_new file according to the certificate file.

[0111] The third aspect of the present application discloses an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the method for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to any one of the first aspect of the present application.

[0112] Figure 3 As shown in a structural diagram of an electronic device according to an embodiment of the present application, Figure 3 The electronic device comprises a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0113] Those skilled in the art can understand that, Figure 3 The structure shown in the figure is only a structural diagram of part of the technical solution of the present application, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device can comprise more or fewer components than those shown in the figure, or some components can be combined, or have a different arrangement of components.

[0114] The fourth aspect of the present application discloses a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to any one of the first aspect of the present application.

[0115] In summary, the technical solution proposed by the present application has the following technical effects:

[0116] Offline availability: all tools (signature, digest, installation service) run independently, without the need for a server or network, and the security is ensured through local certificate verification;

[0117] Lightweight: the developer tools and installation services run independently, reducing deployment costs;

[0118] Multi-dimensional verification: combined signature (sign), summary and installation record table triple verification, prevent tampering and repeated installation risk;

[0119] Compatibility: supports multiple open source package formats (such as DEB, RPM), and adapts to different Linux distributions.

[0120] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for implementing trusted installation on open source operating system based on certificate management mechanism in offline environment, characterized in that, The method comprises: Step S1, compiling an application installation package APP_pack file through a development tool; Step S2, generating a signature information file through a single machine signature tool; the signature information file comprises enterprise legal person information, software copyright information, developer information and identification information of the application installation package APP_pack file; Step S3, generating an abstract information file through a single machine abstract tool; the development tool, the single machine signature tool and the single machine abstract tool independently run on a developer terminal and do not need to be connected to a network or supported by a server; in the step S3, the abstract information file comprises a software name, identification information, a function introduction, a title, content, a business type, a constituent element and a valid time; Step S4, combining the signature information file and the abstract information file to generate a certificate file through the development tool, and recompiling the application installation package APP_pack file according to the certificate file to output an application installation package APP_pack_new file; Step S5, verifying and installing the application installation package APP_pack_new file through an operating system installation service according to the certificate file; the operating system installation service runs on a user terminal and realizes trusted installation in an offline environment through local verification; In the step S5, the operating system installation service verifies and installs the application installation package APP_pack_new file according to the certificate file, and the verification and installation specifically comprises: The operating system installation service checks whether the signature information file and the abstract information file are contained in the application installation package APP_pack_new file; If yes, the operating system installation service checks whether a record identical to the abstract information file in the application installation package APP_pack_new file exists in an installation record table stored in a local database; If yes, the operating system installation service checks whether the content of the signature information file in the application installation package APP_pack_new file is standard; If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, the application installation package APP_pack_new file is directly overwritten and installed, and the installation record table does not need to be updated; If no record identical to the abstract information file in the application installation package APP_pack_new file exists in the installation record table, the operating system installation service checks whether a record similar to the abstract information file in the application installation package APP_pack_new file exists in the installation record table; if the content of any record in the installation record table is partially identical to the content of the abstract information file in the application installation package APP_pack_new file, it is determined that a record similar to the abstract information file in the application installation package APP_pack_new file exists in the installation record table; If it is determined that a record similar to the abstract information file in the application installation package APP_pack_new file exists in the installation record table, it is prompted that there is a risk software.

2. The method for implementing trusted installation on open source operating system based on certificate management mechanism in offline environment according to claim 1, characterized in that, If it is determined that no record similar to the abstract information file in the application installation package APP_pack_new file exists in the installation record table, the operating system installation service checks whether the content of the signature information file in the application installation package APP_pack_new file is standard; If it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, the application installation package APP_pack_new file is directly installed, and a record is inserted in the installation record table after the installation is successful.

3. An apparatus for implementing trusted installation on open source operating system based on certificate management mechanism in offline environment, characterized in that, The device comprises: a development tool configured to compile an application installation package APP_pack file, combine a signature information file and a digest information file to generate a certificate file, and recompile the application installation package APP_pack file according to the certificate file to output an application installation package APP_pack_new file; a single-machine signature tool configured to generate the signature information file; the signature information file comprises enterprise legal person information, software copyright information, developer information and identification information of the application installation package APP_pack file; a single-machine digest tool configured to generate the digest information file; the development tool, the single-machine signature tool and the single-machine digest tool independently run on a developer terminal without the need of networking or server support; the digest information file comprises a software name, identification information, a function introduction, a title, content, a business type, a constituent element and a valid time; an operating system installation service configured to verify and install the application installation package APP_pack_new file according to the certificate file; the operating system installation service runs on a user terminal to realize trusted installation in an offline environment through local verification; specifically comprising: the operating system installation service checks whether the application installation package APP_pack_new file contains the signature information file and the digest information file; if yes, the operating system installation service queries whether there is a record identical to the digest information file in the application installation package APP_pack_new file in an installation record table stored in a local database; if yes, the operating system installation service checks whether the content of the signature information file in the application installation package APP_pack_new file is standard; if it is determined that the content of the signature information file in the application installation package APP_pack_new file is standard, the application installation package APP_pack_new file is directly installed without the need of updating the installation record table; if there is no record identical to the digest information file in the application installation package APP_pack_new file in the installation record table, the operating system installation service queries whether there is a record similar to the digest information file in the application installation package APP_pack_new file in the installation record table; wherein, if the content of any record in the installation record table is partially identical to the content of the digest information file in the application installation package APP_pack_new file, it is determined that there is a record similar to the digest information file in the application installation package APP_pack_new file in the installation record table; if it is determined that there is a record similar to the digest information file in the application installation package APP_pack_new file in the installation record table, it is prompted that there is a risk software.

4. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method for realizing trusted installation of an open-source operating system in an offline environment based on a certificate management mechanism according to any one of claims 1 to 2 when executing the computer program.

5. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps in the method for implementing trusted installation on an open source operating system based on a certificate management mechanism in an offline environment according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Android application installation package signing and signature verification methods

    CN107463806A

  • Software package management method and device, equipment and storage medium

    CN119829114A