Code protection method, system and architecture based on security chip and storage medium

By building a security chip in the object-side device and utilizing a security supervision system, the problems of insufficient security, large resource occupation and high authorization difficulties in the existing technology are solved, and stronger code protection and more effective access are achieved. control.

CN118965303AActive Publication Date: 2024-11-15刘增气 +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411121793.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-15
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

The existing code protection technology has problems such as insufficient encryption strength, large resource occupation, limited key distribution, difficult authorization application and insufficient life cycle control, and cannot effectively cover the access control process of code use.

Method used

Using a code protection method based on security chips, the built-in security chip stores mixed code, access control module, trust domain data and ACL in the object-side device to realize identity authentication, permission verification and threat supervision of the code, and use security supervision The system conducts threat level analysis and early warning response.

Benefits of technology

It improves the security strength of code protection, expands the application scope, simplifies authorized applications, can effectively cover the access control process of code use, and realizes effective management of the code life cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118965303A_ABST
    Figure CN118965303A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a code protection method, system and architecture based on a security chip, and a storage medium. The method comprises the following steps: receiving a request of calling a protected code service in the security chip by an object side equipment application program; wherein the request carries a DEV ID, role information, an access type, an application program ID and an application program identity certificate of the object side equipment; the ACL and the trust domain are read in sequence, and the binding result of the DEV ID of the object side equipment and the SEID of the security chip and the identity of the application program are verified respectively; reading the permission result set to verify the application role information, and obtaining permission information corresponding to the application role; performing permission judgment according to the access type to determine request service content; according to the permission judgment result, calling corresponding code resources, and executing corresponding operation; and returning a code execution result to the object end equipment application program. According to the method, the security strength of code protection is improved, and the application range of the protected code is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of information security technology, and in particular to a code protection method, system, architecture, and computer storage medium based on a security chip. Background Art

[0002] Existing code protection mostly adopts technologies such as code mixing and code encryption. Some code mixing and encryption technologies are complex, and these technologies still have the following problems: First, the encryption strength is not enough and it is easy to be reversed; second, it occupies more system resources, affecting the normal use of business applications; third, the distribution of encryption keys is limited, which is not suitable for large-scale promotion; fourth, the authorization application of code protection is difficult and cannot effectively cover the access control process of code use; fifth, there is a lack of supervision on code application, and it is impossible to effectively manage the life cycle of the code. Summary of the invention

[0003] The purpose of the embodiments of the present disclosure is to provide a code protection method, system, architecture and computer storage medium based on a security chip, so as to solve the above-mentioned problems existing in the prior art.

[0004] In order to achieve the above objectives, the technical solutions adopted by the embodiments of the present disclosure are as follows:

[0005] The present disclosure provides a code protection method based on a security chip, the method comprising:

[0006] Applied to a physical end device, the physical end device has a built-in security chip, the security chip stores a mixed code, an access control module, trust domain data, permission domain data and ACL, the mixed code includes a protected code, an encrypted code and a redundant code, and the method includes:

[0007] Receive a request from an application of a physical device to call a protected code service in a security chip, wherein the request carries a DEV ID of the physical device, role information, access type, application ID, and identity certificate of the physical device application;

[0008] Read the ACL and the trust domain in sequence, and verify the binding result of the physical device DEV ID and the security chip SE ID and the application identity respectively; wherein the ACL stores the binding result signature of the physical device DEV ID and the security chip SE ID, and the trust domain stores various PKI certificates and certificate chain data for verification;

[0009] Read the permission result set to verify the application role information and obtain the permission information corresponding to the application role; wherein the permission domain data includes permission rules, the permission rules refer to the correspondence between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules;

[0010] Determine the permissions based on the access type to determine the service content;

[0011] According to the permission determination result, the corresponding code resource is called to perform operations within the corresponding permission range;

[0012] The code execution result is returned to the object-end device application.

[0013] Optionally, before the application of the physical device sends a service request, the security chip is initialized. The specific process includes:

[0014] Initializing the internal structure of the security chip to form a data area and a code area;

[0015] The pre-acquired initial data, namely, the PKI certificate and certificate chain, the trust domain data, the permission rule data, the ACL initial data and the mixed code data, are written into the data area and the code area respectively to initialize the security chip, wherein the mixed code data includes protected code, encrypted code and redundant code, the protected code is the guarded code, the ACL stores the binding result signature of the physical device DEV ID and the security chip SE ID, and the trust domain stores various PKI certificates and certificate chains for verification.

[0016] Optionally, the binding process of the physical end device DEV ID and the security chip SE ID includes:

[0017] Receive security chip registration and binding service request;

[0018] Determine whether the security chip is bound to the physical device. If so, return the binding information; if not, return the security chip SE ID.

[0019] If the security chip SE ID is returned, the Dev ID of the physical device is extracted, and the SE ID and Dev ID are sent to the security supervision system to request activation of the registration binding service;

[0020] Receive the signature data of the binding result between the security chip and the physical terminal device generated after the activation and registration of the security chip returned by the security supervision system;

[0021] The binding result signature is stored in the ACL, and the binding success information is returned.

[0022] Optionally, after returning the code execution result to the object-end device application, the method further includes:

[0023] Respectively obtain protected code access behavior events, protected code running environment perception security events, and protected code application result security disposal events, and send them to the security supervision system;

[0024] The security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the terminal device and perform corresponding disposal according to the threat level.

[0025] Optionally, the security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the object-end device, and performs corresponding disposal according to the threat level, including:

[0026] The security supervision system performs risk weighted calculation for each type of event within a preset time according to the pre-configured corresponding event category score, the pre-configured classification factors of each type of event and the scores corresponding to each classification factor, to obtain the security chip risk threat level score within the corresponding preset time;

[0027] Determine the risk level based on the risk threat level score;

[0028] Take corresponding early warning responses to different levels of security threats, that is, handle different levels of security threats accordingly according to predetermined strategies.

[0029] Optionally, the pre-configured corresponding event category scores, the pre-configured classification factors of each type of event, and the risk threat scores corresponding to each classification factor include:

[0030] The category score of the protected code running environment perception security event is the first score, and the classification factors of the protected code running environment perception security event include data identification anomaly, data flow anomaly, user login anomaly, application anomaly, network intrusion anomaly, network process anomaly, network process anomaly, system vulnerability anomaly and system resource anomaly, and each classification factor is set with a corresponding risk threat score;

[0031] The protected code access behavior event category score is a second score, and the protected code access behavior event classification factors include: insufficient access rights, abnormal frequent access, identity authentication failure, role information mismatch, invalid trust domain, and code access abnormality, and each classification factor is set with a corresponding risk threat score;

[0032] The category score of the protected code application result security disposal event is a third score, and the classification factors of the protected code application result security disposal event include data is not encrypted and data is signed, and each classification factor is set with a corresponding risk threat score;

[0033] Determining the risk level according to the risk threat level score includes:

[0034] If the risk threat level score of the security chip is less than or equal to the first threshold, the threat level is level one; if the risk threat level score of the security chip is greater than the first threshold and less than the second threshold, the threat level is level two; if the risk threat level score of the security chip is greater than or equal to the second threshold and less than or equal to the third threshold, the threat level is level three; if the risk threat level score of the security chip is greater than the third threshold, the threat level is level four;

[0035] The corresponding early warning responses to security threats of different levels include:

[0036] Reminders are provided for level one threats, warnings are provided for level two, level three and level four threats, and corresponding emergency measures are taken for level three and level four threats based on warnings.

[0037] Optionally, after taking corresponding early warning responses to security threats of different levels, that is, processing security threats of different levels accordingly according to a predetermined strategy, the method further includes:

[0038] Obtain various events, threat levels, and processing data of corresponding physical devices uploaded by each security supervision system, and conduct summary analysis;

[0039] According to the threat level of each physical terminal device, the threat type, threat device, threat situation and penalty disposal analysis are carried out.

[0040] Optionally, the permission rule includes a correspondence between user roles and corresponding permissions, as follows:

[0041] Setting user roles, including visitor, policy administrator, and super administrator;

[0042] Set permission categories, including six categories: code call permission, ACL rule update, permission update, other configuration parameter update, internal code version management, and trust domain management;

[0043] The correspondence between user roles and permission categories is set. The visitor has code call permission; the policy administrator has ACL rule update, permission update and other configuration parameter update permissions; the super administrator has internal code version management and trust domain management permissions.

[0044] Another aspect of the present disclosure provides a code protection system based on a security chip, which is used for a physical end device, wherein the physical end device has a built-in security chip, and the security chip stores mixed code, trust domain data, permission domain data and ACL, wherein the mixed code includes protected code, encrypted code and redundant code, and the system includes:

[0045] A receiving module, used to receive a request from an application of a physical device to call a protected code service in a security chip; wherein the request carries a DEV ID of the physical device, role information, access type, application ID, and identity certificate of the physical device application;

[0046] The first verification module is used to read the ACL and the trust domain, and respectively verify the binding result of the object device DEV ID and the security chip SE ID and the application identity; wherein the ACL stores the binding result signature of the object device DEV ID and the security chip SEID, and the trust domain stores various PKI certificates and certificate chain data for verification;

[0047] The second verification module is used to read the permission result set to verify the application role information and obtain the permission information corresponding to the application role; wherein the permission domain data includes permission rules, the permission rules refer to the corresponding relationship between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules;

[0048] The permission determination module is used to determine the permission according to the access type to determine the service content;

[0049] A calling module, used to call corresponding code resources and perform operations within the corresponding permission range according to the permission determination result;

[0050] The sending module is used to return the code execution result to the application of the object-end device.

[0051] Another aspect of the disclosed embodiment provides a code protection architecture based on a security chip, the architecture comprising: a plurality of physical end devices, a global center arranged on a cloud platform, and at least one management layer, the global center is respectively connected to each of the management layers, and each of the management layers is connected to a plurality of the physical end devices;

[0052] The global center includes: a root key center, a rights management center and a security incident management center;

[0053] Root key center, generates and stores root keys, signs various PKI certificates and certificate chains with root keys, is used to derive the PKI asymmetric cryptographic system at the management level, and provides root key signing services to the PKI asymmetric cryptographic system;

[0054] The authority management center formulates a globally unified authority rule management strategy set, and distributes different authority management strategy subsets to the corresponding management layers according to the differences of various management layers. One authority rule management strategy subset corresponds to one management layer authority management system.

[0055] The security incident management center is used to aggregate the security supervision data transmitted by each management layer, conduct a comprehensive global analysis based on the application code access behavior data of each device, the code running environment security data, the code application result data, and the predicted risk threat level, and conduct a statistical analysis of the distribution and use of security chips of all device devices;

[0056] The management layer includes: PKI asymmetric cryptographic system, authority management system and security supervision system;

[0057] The PKI asymmetric cryptographic system is used to provide application identity certificates for corresponding physical end devices, provide rights management system certificates and rights signature services, and distribute various PKI certificates and certificate chains obtained from the root key center to corresponding physical end devices;

[0058] The authority management system is used to receive the authority management policy issued by the authority management center to provide reliable authorization results to each object-end device application, and issue the results of the authority rules to the corresponding object-end device;

[0059] The security supervision system is used to obtain the protected code access behavior, environment and code application result data uploaded by each object terminal device, and determine the security threat level of the security chip of the object terminal device according to the pre-set security event threat level classification method and make corresponding warnings, so as to supervise each security chip and report the data uploaded by each object terminal device and the threat level data to the security event management center;

[0060] The physical end device includes a security chip, an access control interface API, and a security event probe;

[0061] A security chip is integrated with a mixed code area, an access control module, a trust domain data area, a permission domain data area and an ACL, wherein the mixed code area includes protected code, encrypted code and redundant code, and the protected code is the protected code; wherein the access control module can be used to call other areas and ACL to perform identity authentication and permission verification on application programs and interfaces that access the protected code in the security chip; the trust domain data area includes various PKI certificates and certificate chains for verification, the permission domain data area includes permission rules, and the permission rules refer to the corresponding relationship between user roles and corresponding permissions, and the ACL stores the binding result signature of the object terminal device DEV ID and the security chip SE ID;

[0062] The security event probe is divided into an environmental security perception probe and an access probe, which respectively collects the operating environment data, code access behavior and code application result data of the protected code of the security chip, and outputs the collected data to the management layer.

[0063] Another aspect of the embodiments of the present disclosure provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the security chip code protection method described above are implemented.

[0064] The beneficial effects of the embodiments of the present disclosure are:

[0065] The security chip code protection method of the disclosed embodiment improves the security strength of code protection, expands the application scope of the protected code, makes the authorized application of code protection easier, and can effectively cover the access control process of code use. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic diagram of a code protection architecture structure based on a security chip provided by an embodiment of the present disclosure;

[0067] Figure 2 is a schematic diagram of the structure of a security chip according to an embodiment of the present disclosure;

[0068] Figure 3 is a schematic diagram of the code protection implementation logic of the security chip of the embodiment of the present disclosure;

[0069] Figure 4 This is a schematic diagram of the analysis and early warning of the security supervision system in the security chip code protection of the embodiment of the present disclosure;

[0070] Figure 5 It is a schematic diagram of the correspondence between user roles and permission categories in the security chip access rights of an embodiment of the present disclosure;

[0071] Figure 6 This is a schematic diagram of the summary analysis of the security event management center in the security chip code protection of the embodiment of the present disclosure;

[0072] Figure 7 This is a schematic diagram of a code protection method based on a security chip provided by an embodiment of the present disclosure;

[0073] Figure 8 is a schematic diagram of a code access flow of a security chip according to an embodiment of the present disclosure;

[0074] Fig. 9 is a schematic diagram of the initialization process of the security chip according to an embodiment of the present disclosure;

[0075] Fig.10This is a schematic diagram of the binding process between the security chip and the corresponding physical terminal device according to the embodiment of the present disclosure;

[0076] Fig.11 It is a schematic diagram of the analysis process of the security supervision system in the code protection architecture of the security chip of the embodiment of the present disclosure;

[0077] Fig.12 It is a schematic diagram of the structure of a code protection system based on a security chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical solution and advantages of the embodiment of the present disclosure more clear, the embodiment of the present disclosure is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation methods described here are only used to explain the embodiment of the present disclosure and are not used to limit the embodiment of the present disclosure.

[0079] like Figure 1As shown, the embodiment of the present disclosure proposes a code protection architecture based on a security chip, the architecture includes: multiple physical end devices, a global center set on a cloud platform and at least one management layer, the global center is connected to each of the management layers respectively, and each of the management layers is connected to multiple physical end devices; the global center includes: a root key center, a permission management center and a security event management center; the root key center generates and stores root keys, and the root key signs various PKI certificates and certificate chains for deriving the PKI asymmetric cryptographic system of the management layer, and provides root key signing services to the PKI asymmetric cryptographic system; the permission management center formulates a globally unified permission rule management policy set, and according to the differences between various management layers, Different permission management policy subsets are distributed to the corresponding management layers, where one permission rule management policy subset corresponds to one management layer permission management system; the security event management center is used to aggregate the security supervision data transmitted by each management layer, conduct a comprehensive analysis at the global level based on the application code access behavior data of each device, the code running environment security data, the code application result data, and the predicted risk threat level, and conduct a statistical analysis on the distribution and use of security chips of all device devices; the management layer includes: PKI asymmetric cryptographic system, permission management system, and security supervision system; the PKI asymmetric cryptographic system is used to provide the application identity certificate of the corresponding device, provide the permission management system certificate and permission signature The naming service is also used to distribute various PKI certificates and certificate chains obtained from the root key center to the corresponding physical devices; the authority management system is used to receive the authority management policy issued by the authority management center to provide reliable authorization results to the application programs of each physical device, and send the results of the authority rules to the corresponding physical devices; the security supervision system is used to obtain the behavior, environment and code application result data of the protected code access uploaded by each physical device, and determine the security threat level of the physical device security chip according to the preset security event threat level classification method and make corresponding warnings, so as to supervise the process of each security chip, and report the data uploaded by each physical device and the threat level data to the security event management center The object-side device includes a security chip, an access control interface API, and a security event probe; the security chip integrates a mixed code area, an access control module, a trust domain data area, a permission domain data area, and an ACL, wherein the mixed code area includes protected code, encrypted code, and redundant code, and the protected code is the protected code; wherein the access control module can be used to call other areas and ACL to perform identity authentication and permission verification on the application programs and interfaces that access the protected code in the security chip, the trust domain data area includes various PKI certificates and certificate chains for verification, the permission domain data area includes permission rules, and the permission rules refer to the corresponding relationship between user roles and corresponding permissions, and the ACL stores the binding result signature of the object-side device DEV ID and the security chip SEID;The security event probe is divided into an environmental security perception probe and an access probe, which respectively collects the operating environment data, code access behavior and code application result data of the protected code of the security chip, and outputs the collected data to the management layer. ;

[0080] The security chip of the disclosed embodiment can be used for various security terminals of the Internet of Things informatization, and is applicable to various scenarios, such as data compliance of the Internet of Vehicles, security terminals of the urban Internet of Things, and security scenarios of the power Internet of Things. The code protection architecture of the disclosed embodiment is based on the existing security chip and cryptographic technology, takes the cryptographic chip as a prerequisite, and mainly utilizes the relatively high-intensity hardware security protection capabilities of the security chip, as well as the cryptographic encryption and decryption capabilities, to build a micro-trusted computing foundation, and build a trusted execution environment for the code based on the security chip component.

[0081] like Figure 2 As shown in the figure, the security chip module refers to the security protection hardware using cryptographic technology. In addition to the cryptographic circuit and the protection channel attack, the chip also includes other circuits to achieve the protection of the protected code and access control services. The security chip cooperates with other systems to build a trust system for code protection, access control strategy, verification service, protected code, etc.

[0082] like Figure 3 As shown, the security chip code protection method in the embodiment of the present disclosure can be implemented using the above architecture, wherein the management layer is connected to the physical end device, and the management layer is connected to the global center. The global center performs global management, formulates permission management strategies, generates root keys, signs corresponding root certificates, summarizes security events, and conducts overall analysis according to actual conditions, so as to form hierarchical management, strengthen the confidentiality of the security chip, and is suitable for security chips with protected codes with different functions, effectively expanding the application scope of the security chip and being suitable for various physical end device scenarios. The physical end device includes a built-in security chip, a security interface bus, an access control API, an application, an environmental security perception probe, and other security event probes. The application of the physical end device is connected to the access control API through the security interface bus.

[0083] The security chip includes a mixed code area, an access control module, a trust domain data area, a permission domain data area and an ACL. Among them, the mixed code area includes protected code, encrypted code and redundant code, and the protected code is the protected code; the access control module is an application on the security chip, which can call the mixed code area, the trust domain data area, the permission domain data area and the ACL. The trust domain data area includes various root certificates and certificate chains for verification, and the permission domain data area includes permission rules, which refer to the correspondence between user roles and corresponding permissions. The data in the security chip is obtained from the PKI asymmetric cryptographic system and the permission management system respectively during offline initialization. Before use, the PKI asymmetric cryptographic system and the permission management system need to obtain relevant data from the global center to complete initialization before providing initialization data to the security chip, which will not be repeated here. The security chip can also be called a security code chip. The security chip initializes the system through the security code chip, obtains relevant data of the PKI asymmetric cryptographic system and the authority management system, and initializes the security chip. The security code chip initialization system obtains various root certificates, certificate chains, and trust domain signature data from the PKI asymmetric cryptographic system, and obtains permission rule data and ACL initial data from the authority management system. Obtain mixed code from relevant providers.

[0084] The access control interface API connects the security interface bus of the physical device and the access control module of the security chip respectively. The application APP of the physical device accesses the security chip through the security interface bus and the access control API to realize the communication between the application of the physical device and the security chip.

[0085] The security event probe is an application installed on the physical device to implement collection services to monitor the access behavior of the code. The collected data includes the access behavior data of the code, the code running environment data, etc. After the data is collected, it is sent to the central end, that is, the security event monitoring system for data transmission.

[0086] The design intention of the key in the PKI asymmetric cryptographic system is to build a trust domain, to express the identity of the security chip, user or business APP, to confirm the identity through cryptographic algorithms and technologies, to prevent forgery, and it is the secondary management node of the root key.

[0087] The permission management system is mainly used to grant permissions to users or application APPs. The permissions include access permission, update parameters, and COS upgrade at three levels to control the code in the security chip.

[0088] The security supervision system is used to supervise the operation process of the protected code in the security chip based on the data accessed by the protected code, conduct threat level assessment and corresponding warnings; and report the data accessed by the protected code and the code information supervision data to the security event management center. The code operation process in the security chip is supervised to prevent security risks and problems. The implementation method is to conduct statistical analysis on the user or application APP code access events and environmental information, and then use the level definition of security events to issue warnings, etc. Figure 4 As shown, the environmental security perception probe in the security event probe is used to collect the operating environment data of the protected code of the security chip. The environmental data includes: data identification monitoring, user login, network intrusion monitoring, system resource monitoring, data flow monitoring, application fingerprint monitoring, network traffic monitoring and system vulnerability monitoring. The access probe collects code access events, that is, code access behavior and code application result data. The result data includes encryption and decryption results, etc.

[0089] The security event probe transmits the collected data to the security supervision system of the management level through the security interface bus. The security supervision system conducts statistical analysis on the code running environment data, code access behavior data and code application result data, performs event threat analysis and classification, and takes corresponding emergency measures.

[0090] Root Key Center: Generates and stores root keys, and signs various PKI certificates and certificate chains with root keys. It is used to derive the PKI asymmetric cryptographic system at the management level, and provides root key signing services to the PKI asymmetric cryptographic system. The root key is the trust core of the entire system solution, and establishes a trust chain with the PKI asymmetric cryptographic system, thereby supporting the PKI asymmetric cryptographic system to issue identities for all physical device objects. In actual applications, PKI certificates and certificate chains are generated in advance based on physical devices.

[0091] Permission Management Center: formulate a globally unified permission rule management strategy set, and distribute different permission management strategy subsets to the corresponding management level according to the differences of various management levels, where one permission rule management strategy subset corresponds to one management level permission management system. Code chip access authorization can be set in a hierarchical manner, and permission management can be divided into units of users and application APPs, and multiple permissions can be set and distributed according to the identity of the user or application. Here, one permission management system can correspond to one user, and the user can be an enterprise, institution, company, etc. Each user can have multiple applications, each application is a user role, and different user roles have corresponding permissions.

[0092] Security Incident Management Center: The Security Management Center aggregates data from all security incident monitoring systems, conducts a global comprehensive analysis based on the access and usage data of application programs on physical devices, the security data of the operating environment, and the predicted threat level of risks, and performs statistical analysis on the distribution and use of security chips on all physical devices to predict the possibility of risks.

[0093] like Figure 6 As shown, the Security Incident Management Center aggregates incident and disposal data, and conducts summary analysis, threat type analysis, threat device analysis, threat situation analysis, and penalty disposal analysis based on the threat level statistics compiled by the Security Incident Supervision Center.

[0094] like Figure 7 As shown, on the other hand, the embodiment of the present disclosure proposes a code protection method based on a security chip, which is applied to a physical end device, wherein the physical end device has a built-in security chip, and the security chip stores a mixed code, an access control module, trust domain data, permission domain data and ACL, and the mixed code includes a protected code, an encrypted code and a redundant code, and the method includes:

[0095] Step S100, receiving a request from a physical device application to call a protected code service in a security chip or update / manage corresponding permissions, wherein the request carries the physical device DEV ID, role information, access type, application ID, and physical device application identity certificate.

[0096] The security chip code protection method of the disclosed embodiment is implemented based on the above-mentioned security chip code protection architecture. The physical end device can be a vehicle end device, etc., which is not limited here. The physical end device has a built-in security chip, and the application of the physical end device communicates with the security chip through a security interface bus. The security chip is also a security code chip. Redundant code is invalid code that increases the amount of code to increase the difficulty of decompilation, making it difficult for the protected code to be decompiled. In the disclosed embodiment, the application ID and the application identity certificate are usually used together. Figure 8 As shown, the relevant business application of the physical device, that is, an APP, sends a request for protected code service to the security chip through the security interface bus, and occasionally there are other permission update requests.

[0097] Step S200, read the ACL and the trust domain in sequence, and verify the binding result of the object device DEV ID and the security chip SEID and the application identity respectively. Among them, the ACL stores the binding result signature of the object device DEV ID and the security chip SE ID, and the trust domain stores various PKI certificates and certificate chains for verification.

[0098] Specifically, the access control module in the security chip reads the relevant content pre-stored in the ACL and trust domain by calling the ACL and trust domain, and implements the corresponding verification. That is to say, when downloading the relevant application, it brings its own identity certificate. When the application requests the protected code service or other permission service in the security chip, the PKI certificate and certificate chain pre-stored in the trust domain are used to verify whether the application is credible. If the application identity is credible, proceed to the next step, which will not be repeated here. The DEV ID of the physical device in the disclosed embodiment is the device identifier, which is a code used to uniquely identify a hardware device. Its main purpose is to identify and distinguish different devices; the application ID is also used to determine the application.

[0099] Step S300, read the permission result set to verify the application role information and obtain the permission information corresponding to the application role, wherein the permission domain data includes permission rules, the permission rules refer to the correspondence between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules.

[0100] In step S200, the ACL and the trust domain are read, and the binding result of the physical device DEV ID and the security chip SEID and the application identity are verified respectively. After both are passed, step S300 is performed, and the access control module calls the permission domain data to read the permission result of the permission rule, that is, the user role; the application role information is verified, that is, the user role information of the application is matched with the role list in the permission rule according to the user role information of the application. If they match, the corresponding permission is obtained.

[0101] like Figure 5 As shown in FIG. 1 , as a specific example of a permission rule, the permission rule includes a correspondence between a user role and a corresponding permission, as follows:

[0102] Setting user roles, including visitor, policy administrator, and super administrator;

[0103] Set permission categories, including six categories: code call permission, ACL rule update, permission update, other configuration parameter update, internal code version management, and trust domain management;

[0104] The correspondence between user roles and permission categories is set. The visitor has code call permission; the policy administrator has ACL rule update, permission update and other configuration parameter update permissions; the super administrator has internal code version management and trust domain management permissions.

[0105] Specifically, internal code version management refers to the update of protected code, and permission update refers to the update of specific permission content in permission rules. Other configuration parameter update permissions can include redundant code update, API update and other configuration parameters. Permission rules can be set according to actual conditions.

[0106] In the disclosed embodiment, after the security chip is initialized, during the application process, the data in the code area and data area inside the security chip can be updated, and only the corresponding user role can perform the corresponding update. The disclosed embodiment sets different permissions according to different user roles, which can better protect the security chip.

[0107] Step S400: Perform authority determination based on the access type to determine the requested service content.

[0108] It should be noted that the access type includes the role and specific permission category to determine the specific access content. Figure 5 As shown in the figure, for example, if the access type is visitor / R0 and code call permission / 01, then it is an access code, which is also a frequent access request; for another example, if the access type is policy administrator / R1 and ACL rule update / 11, then it is a request to update the ACL. In this way, the specific request service content is determined.

[0109] Step S500: According to the permission determination result, the corresponding code resource is called to perform operations within the corresponding permission range.

[0110] That is to say, if the protected code service is requested, the corresponding code is called from the code file and the corresponding operation is performed. If the operation is of other permission categories, the corresponding permission operation is also performed.

[0111] Step S600: Return the code execution result to the object-end device application.

[0112] Specifically, the code execution result is transmitted to the application program through the access control module and the security interface bus.

[0113] like Fig. 9 As shown, before the application of the physical device sends a service request, the security chip needs to be initialized. The specific method includes:

[0114] Step S10: Initialize the internal structure of the security chip to form a data area and a code area.

[0115] The disclosed embodiment adopts a chip writing tool, and the chip initialization system initializes the internal structure of the security chip to form an initialized data area and a code area; the data area is used to store trust domain data, permission domain data, ACL, etc., and the code area is used to store encrypted mixed code.

[0116] Step S20: write the pre-acquired initial data, namely, the PKI certificate and certificate chain, the trust domain data, the permission rule data, the ACL initial data and the mixed code data, into the data area and the code area respectively to initialize the security chip, wherein the mixed code data includes the protected code and the redundant code, the protected code is the guarded code, the ACL stores the binding result signature of the physical device DEV ID and the security chip SE ID, and the trust domain stores various PKI certificates and certificate chains for verification.

[0117] The chip writing tool, that is, the security chip initialization system obtains various root certificates and certificate chain data summarized by the root key center. The various PKI certificates and certificate chain data of the root key center are first sent to the PKI asymmetric cryptographic system, and then transmitted to the security chip initialization system via the PKI asymmetric cryptographic system; obtains signature data such as trust domain summarized from the PKI asymmetric cryptographic system; obtains permission rule data, ACL initial data, etc. summarized from the permission system; obtains mixed code data from relevant providers, and the mixed code data is the encrypted protected code data. The chip writing tool pours the aforementioned data obtained into the security chip to initialize the security chip. Specifically, the root certificate, trust domain signature data, permission rule data, and ACL initial data are written into the data area, and the code data is written into the code area.

[0118] like Fig.10 As shown in FIG. 1 , as a specific example of the security chip registration and binding process, the binding process of the security chip carrier device DEV ID and the security chip SE ID includes:

[0119] Step S210: receiving a security chip registration and binding service request.

[0120] The security interface bus of the embodiment of the present disclosure sends a security code chip registration and binding service request to the security chip, and the access control module of the security chip receives the request.

[0121] Step S220: determine whether the security chip is bound to the physical device. If so, return the binding information; if not, return the unique identifier SE ID of the security chip.

[0122] The access control module of the security chip of the disclosed embodiment sends a request to the ACL inside the security chip, and determines whether the chip is registered and bound by reading and retrieving whether there is a binding signature between the security chip and the physical end device. The unique identifier SE ID (Secure Element ID) inside the security chip is usually used to ensure the uniqueness and security of each chip. This identifier is solidified inside the chip when it is manufactured and cannot be changed. It provides hardware-level identity proof of the chip itself. If it has been bound, the binding information is returned to the security chip, and the process ends. If it has not been bound, the unique identifier SE ID of the security chip is returned to the access control module of the security chip.

[0123] Step S230: If the security chip SE ID is returned, extract the unique identifier Dev ID of the physical terminal device, send the SE ID and Dev ID to the security supervision system, and request to activate the registration binding service.

[0124] Specifically, the access control module of the security chip extracts the unique identifier Dev ID of the object terminal device. The access control module of the security chip sends the SE ID and Dev ID to the security supervision system to request activation registration binding. The security supervision system performs activation registration based on the security chip SE ID and the object terminal device Dev ID, and generates the signature data of the binding result between the security chip and the object terminal device. The signature data of the binding result between the security chip and the object terminal device is sent to the security chip through the security interface bus.

[0125] Step S240: receiving the signature data of the binding result between the security chip and the physical terminal device generated after the registered security chip is activated and returned by the security supervision system.

[0126] The security supervision system of the disclosed embodiment will also have an identity certificate, which also comes from the PKI asymmetric cryptographic system. The security chip ID and the physical device ID are combined and signed through this identity certificate, and then the result is returned to the security chip and stored in the ACL storage area. The access control module of the security chip receives the signature data of the binding result between the security chip and the physical device.

[0127] Step S250: Store the binding result signature into the ACL and return binding success information.

[0128] The access control module of the security chip of the disclosed embodiment stores the binding result signature into the ACL, and the ACL returns the binding success information to the access control module. The access control module of the security chip returns the registration binding success to the security interface bus, and ends the binding process. The security chip receives the security chip registration activation request sent by the security interface bus, activates the registration through the above steps S220 to S250, binds the corresponding relationship between the security chip and its physical end device, and returns the registration binding result to the security interface bus.

[0129] like Figure 4 As shown, as a specific example after the code execution result is returned to the application, after returning the code execution result to the object-end device application, the method further includes:

[0130] Step S700: respectively obtain protected code access behavior events, protected code running environment perception security events, and protected code application result security disposal events, and send them to the security supervision system.

[0131] The physical end device of the disclosed embodiment is provided with various security event collection probes, namely, environmental security perception probes and access probes, which respectively collect data related to the execution operation of the physical end device application on the protected code. The environmental security perception probe collects the operating environment data of the protected code of the security chip, and the access probe collects the code access behavior and code application result data. The security event collection probe transmits the collected various events to the security supervision system through the security interface bus. The security supervision system analyzes and divides the security threat level according to various security events, and makes corresponding processing.

[0132] Step S800: The security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the physical terminal device, and performs corresponding disposal according to the threat level.

[0133] The security monitoring system of the disclosed embodiment obtains data related to code access events uploaded by multiple physical-end devices, and performs a security threat level analysis of the protected code access for each physical-end device.

[0134] Before analyzing the security threat level of protected code access on each physical device, Fig.11As shown, the security event preprocessing module configures type scores, classification factors, and corresponding risk threat scores for each split factor for the protected code access behavior type events, the protected code running environment perception type security events, and the protected code application result security disposal type events, and stores them in the threat analysis and grading module. For example, the protected code running environment perception type security events include: data identification monitoring, user login, network intrusion monitoring, system resource monitoring, data flow monitoring, application fingerprint monitoring, network traffic monitoring, and system vulnerability monitoring data. If the data of each factor in each type of event is normal, the score is not considered or the score is 0. If one or more factor data are abnormal, the score of this type of event is calculated according to the abnormal factor, and the scores of each type of event are summarized to obtain the risk threat level score within the preset time. The threat analysis and grading module of the security supervision system forms the object-side code threat grading data for various types of events to be summarized and weighted uploaded by each object-side device.

[0135] The security event preprocessing module configures corresponding classification factors for various security events according to the different functional attributes of the protected code, which are used to weight the security risks, that is, to set corresponding type scores for various events, set corresponding classification factors for each event, and set corresponding risk threat scores for each classification factor. The category score of the protected code running environment perception type security event is the first score, which is 3 points. The classification factors of the protected code running environment perception type security events and the scores of each factor are: data identification anomaly, score 0.5; data flow anomaly, score 2; user login anomaly, score 0.5; application anomaly, score 2; network intrusion anomaly, score 2; network process anomaly, score 1; network process anomaly, score 0.5; system vulnerability anomaly, score 0.5; and system resource anomaly, score 0.5.

[0136] The score for the protected code access behavior event category is the second score, which is 4 points; the classification factors and scores of the protected code access behavior event are: insufficient access rights, score of 0.5; abnormally frequent access, score of 1; identity authentication failure, score of 0.5; role information mismatch, score of 0.5; invalid trust domain, score of 0.5; and code access abnormality, score of 2.

[0137] The score of the protected code application result security disposal event category is the third score, which is 2 points. The classification factors and scores of the protected code application result security disposal event are: the data is not encrypted, the score is 0.5; and the data is signed, the score is 0.5.

[0138] Users can define the risk weighting table based on the protected code attributes and abnormal threats.

[0139] like Fig.11 As shown in the figure, as a specific example of security supervision, the security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the object-side device, and performs corresponding disposal according to the threat level, including:

[0140] Step S810: The security supervision system performs risk-weighted calculation on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events within a preset time, according to the pre-configured event category scores, the pre-configured classification factors of each type of event, and the scores corresponding to the classification factors, to obtain a security chip risk threat level score within the corresponding preset time.

[0141] Analyze the risk weighting of security events to form a security threat score for the security code chip of each physical device within a certain period of time. The calculation method is: risk threat score = category score + category item score. For example, if the probe collects identity authentication failure, which belongs to the code access behavior event, the risk threat score is the sum of the identity authentication failure and the event type score to which it belongs, which is 4.5 points; if the probe collects data flow abnormalities, user login abnormalities, and abnormally frequent access, then the risk threat score is the sum of the scores of data flow abnormalities, user login abnormalities, and abnormally frequent access and the event category score to which they belong, which is 10.5.

[0142] Step S820: Determine the risk level according to the risk threat level score.

[0143] Specifically, if the risk threat score of the security chip is less than or equal to the first threshold, the threat level is level one; if the risk threat score of the security chip is greater than the first threshold and less than the second threshold, the threat level is level two; if the risk threat score of the security chip is greater than or equal to the second threshold and less than or equal to the third threshold, the threat level is level three; if the risk threat score of the security chip is greater than the third threshold, the threat level is level four.

[0144] According to the risk threat score, the threat security level is formed: if the risk threat score is less than or equal to 4, the threat level is level 1; if the risk threat score is greater than or equal to 4 and less than or equal to 5, the threat level is level 2; if the risk threat score is greater than or equal to 5 and less than or equal to 7, the threat level is level 3; if the risk threat score is greater than or equal to 7, the threat level is level 4. Users can also define the security level themselves.

[0145] Step S830: Take corresponding early warning responses to security threats of different levels, that is, handle security threats of different levels accordingly according to predetermined strategies.

[0146] Specifically, the early warning response module of the security supervision system will issue reminders for level one threats, issue alarms for level two, level three and level four threats, and perform corresponding emergency disposal for level three and level four threats based on the alarm disposal. The emergency disposal may be followed up by dedicated personnel.

[0147] After taking corresponding early warning responses to security threats of different levels, that is, processing security threats of different levels accordingly according to a predetermined strategy, the method further includes:

[0148] Step S900: Obtain various events, threat levels, and processing data of corresponding physical devices uploaded by each security supervision system, and perform summary analysis.

[0149] In the disclosed embodiment, each security supervision system uploads the acquired data of each physical device and the security threat level and disposal data to the security event management center, which then performs further analysis.

[0150] Step S900A: According to the threat level of each physical terminal device, analyze the threat type, threat device, threat situation and penalty disposal.

[0151] like Figure 6 As shown, after each security supervision system processes the corresponding data of each object end, it further summarizes the processed data and the original data and reports it to the security event management center. The security event management center receives the processing result data of each security supervision system, and summarizes and analyzes the threat type analysis, threat device analysis, threat situation analysis, and punishment and disposal according to the four threat levels to facilitate better management. The disclosed embodiment is applicable to various security chips, so that the security chip can be applied to various terminal devices, and different permission management is formulated according to the code protection architecture of the security chip to authorize the corresponding application to access the security chip, and further protect the security chip through the trust system. Through the security chip access events fed back by the object end devices, analysis and summary are carried out to achieve post-event supervision and improve the operation management of the security chip.

[0152] According to the actual situation, threat types, threat devices, threat situation and punishment disposal analysis are carried out. For example, threat types may include: Data leakage: Unauthorized data access or transmission may lead to the leakage of sensitive information such as personal identity information, health records or corporate secrets. Device hijacking: Attackers control IoT devices, such as smart cameras, door locks, etc., for monitoring or illegal operations. Denial of service (DoS) and distributed denial of service (DDoS): Paralyze devices or networks through excessive requests. Man-in-the-middle attack (MITM): Intercept communications, tamper with or monitor information during data transmission. Software vulnerabilities: Unpatched software vulnerabilities may be exploited, resulting in system intrusion. Physical security threats: Devices are physically destroyed or stolen, resulting in data loss or loss of device function. Threat devices may include: smart home devices (such as smart bulbs, smart locks); industrial control systems (such as SCADA systems); wearable devices (such as smart watches, fitness trackers); medical devices (such as remote patient monitoring systems); vehicles (such as self-driving cars), etc.

[0153] Threat landscape analysis, which may include: Frequency: Some threats may be more common than others, such as software vulnerabilities and data breaches. Scope of impact: The threat may affect a single device or the entire network. Potential damage: From a minor data breach to a large-scale infrastructure outage. Response time: How quickly the threat is detected and responded to, the faster the better.

[0154] Analysis of penalties and dispositions may include: Emergency response: Immediately disconnect infected devices from the network to prevent the threat from spreading. Software updates and patches: Regularly update device software to fix known security vulnerabilities. Encryption and authentication: Ensure data transmission and storage encryption, and use multi-factor authentication to enhance security. Physical security: Protect devices from physical damage or theft. Monitoring and auditing: Continuously monitor network traffic and device activity to identify abnormal behavior.

[0155] like Fig.12 As shown, the embodiment of the present disclosure proposes a security chip-based code protection system on the other hand, which is applied to a security chip. The security chip stores mixed code, access control module, trust domain data, permission domain data and ACL. The mixed code includes protected code, encrypted code and redundant code. The system includes:

[0156] The receiving module 100 is used to receive a request from an application of a physical device to call a protected code service in a security chip; wherein the request carries a DEV ID of the physical device, role information, access type, application ID, and an identity certificate of the physical device application;

[0157] The first verification module 200 is used to read the ACL and the trust domain, and respectively verify the binding result of the object device DEV ID and the security chip SEID and the application identity; wherein the ACL stores the binding result signature of the object device DEV ID and the security chip SEID, and the trust domain stores various PKI certificates and certificate chain data for verification;

[0158] The second verification module 300 is used to read the permission result set to verify the application role information and obtain the permission information corresponding to the application role; wherein the permission domain data includes permission rules, the permission rules refer to the correspondence between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules;

[0159] The authority determination module 400 is used to determine the authority according to the access type to determine the service content;

[0160] A calling module 500 is used to call corresponding code resources and perform operations within the corresponding authority scope according to the authority determination result;

[0161] The sending module 600 is used to return the code execution result to the object-end device application.

[0162] Each module in the security chip code protection system of the disclosed embodiment implements the protected code access control process in the security chip, improves the code protection capability, and makes the security chip more resistant to attacks.

[0163] On the other hand, an embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the security chip code protection method described above are implemented.

[0164] By adopting the above technical solution disclosed in the embodiment of the present disclosure, the following beneficial effects are obtained:

[0165] 1. Stronger anti-attack effect; 2. More comprehensive code protection capabilities; 3. More effective authorized access control; 4. More effective code security promotion methods.

[0166] The above is only a preferred implementation of the embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiment of the present disclosure. These improvements and modifications should also be considered as the protection scope of the embodiment of the present disclosure.

Claims

1. A code protection method based on a security chip, applied to a physical end device, wherein the physical end device has a built-in security chip, characterized in that: The security chip stores a mixed code, an access control module, trust domain data, permission domain data and ACL, the mixed code includes a protected code, an encrypted code and a redundant code, and the method includes: Receive a request from an application on a physical device to call a protected code service in a security chip; wherein the request carries the physical device DEV ID, role information, access type, application ID, and identity certificate of the physical device application; Sequentially, read the ACL and the trust domain, and verify the binding result of the object device DEV ID and the security chip SEID and the application identity respectively; wherein the ACL stores the binding result signature of the object device DEVID and the security chip SEID, and the trust domain stores various PKI certificates and certificate chain data for verification; Read the permission result set to verify the application role information and obtain the permission information corresponding to the application role; wherein the permission domain data includes permission rules, the permission rules refer to the correspondence between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules; Determine the permissions based on the access type to determine the requested service content; According to the permission determination result, the corresponding code resource is called to perform operations within the corresponding permission range; The code execution result is returned to the object-end device application.

2. The method according to claim 1, characterized in that Before the application of the physical device sends a service request, the security chip is initialized. The specific process includes: Initializing the internal structure of the security chip to form a data area and a code area; The pre-acquired initial data, namely, the PKI certificate and certificate chain, the trust domain data, the permission rule data, the ACL initial data and the mixed code data, are written into the data area and the code area respectively to initialize the security chip, wherein the mixed code data includes protected code, encrypted code and redundant code, the ACL stores the binding result signature of the physical device DEV ID and the security chip SE ID, and the trust domain stores various PKI certificates and certificate chain data for verification.

3. The method according to claim 1, characterized in that The binding process of the physical end device DEV ID and the security chip SEID includes: Receive security chip registration and binding service request; Determine whether the security chip is bound to the physical device. If so, return the binding information; if not, return the security chip SE ID. If the security chip SE ID is returned, the DevID of the physical device is extracted, and the SE ID and DevID are sent to the security supervision system to request activation of the registration binding service; Receive the signature data of the binding result between the security chip and the physical terminal device generated after the activation and registration of the security chip returned by the security supervision system; The binding result signature is stored in the ACL, and the binding success information is returned.

4. The method according to any one of claims 1 to 3, characterized in that: After returning the code execution result to the object-end device application, the method further includes: Respectively obtain protected code access behavior events, protected code running environment perception security events, and protected code application result security disposal events, and send them to the security supervision system; The security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the terminal device and perform corresponding disposal according to the threat level.

5. The method according to claim 4, characterized in that The security supervision system performs statistical analysis on the protected code access behavior events, the protected code running environment perception events, and the protected code application result security disposal events to obtain the threat level of the security chip of the object-side device, and performs corresponding disposal according to the threat level, including: The security supervision system performs risk weighted calculation for each type of event within a preset time according to the pre-configured corresponding event category score, the pre-configured classification factors of each type of event and the scores corresponding to each classification factor, to obtain the security chip risk threat level score within the corresponding preset time; Determine the risk level based on the risk threat level score; Take corresponding early warning responses to different levels of security threats, that is, handle different levels of security threats accordingly according to predetermined strategies.

6. The method according to claim 5, characterized in that The pre-configured corresponding event category scores, the pre-configured classification factors of each type of event, and the risk threat scores corresponding to each classification factor include: The category score of the protected code running environment perception security event is the first score, and the classification factors of the protected code running environment perception security event include data identification anomaly, data flow anomaly, user login anomaly, application anomaly, network intrusion anomaly, network process anomaly, network process anomaly, system vulnerability anomaly and system resource anomaly, and each classification factor is set with a corresponding risk threat score; The protected code access behavior event category score is a second score, and the protected code access behavior event classification factors include: insufficient access rights, abnormal frequent access, identity authentication failure, role information mismatch, invalid trust domain, and code access abnormality, and each classification factor is set with a corresponding risk threat score; The category score of the protected code application result security disposal event is a third score, and the classification factors of the protected code application result security disposal event include data is not encrypted and data is signed, and each classification factor is set with a corresponding risk threat score; Determining the risk level according to the risk threat level score includes: If the risk threat level score of the security chip is less than or equal to the first threshold, the threat level is level one; if the risk threat level score of the security chip is greater than the first threshold and less than the second threshold, the threat level is level two; if the risk threat level score of the security chip is greater than or equal to the second threshold and less than or equal to the third threshold, the threat level is level three; if the risk threat level score of the security chip is greater than the third threshold, the threat level is level four; The corresponding early warning responses to security threats of different levels include: Reminders are provided for level one threats, warnings are provided for level two, level three and level four threats, and corresponding emergency measures are taken for level three and level four threats based on warnings.

7. The method according to any one of claims 1 to 3, characterized in that: The permission rules include the corresponding relationship between user roles and corresponding permissions, as follows: Setting user roles, including visitor, policy administrator, and super administrator; Set permission categories, including six categories: code call permission, ACL rule update, permission update, other configuration parameter update, internal code version management, and trust domain management; The correspondence between user roles and permission categories is set. The visitor has code call permission; the policy administrator has ACL rule update, permission update and other configuration parameter update permissions; the super administrator has internal code version management and trust domain management permissions.

8. A security chip-based code protection system, applied to a physical end device, wherein the physical end device has a built-in security chip, characterized in that: The security chip stores mixed codes, access control modules, trust domain data, authority domain data and ACL, the mixed codes include protected codes, encrypted codes and redundant codes, and the system includes: A receiving module, used to receive a request from an application of a physical device to call a protected code service in a security chip; wherein the request carries a DEV ID of the physical device, role information, access type, application ID, and identity certificate of the physical device application; The first verification module is used to read the ACL and the trust domain to verify the binding result of the object-side device DEV ID and the security chip SEID and the application identity; wherein the ACL stores the binding result signature of the object-side device DEV ID and the security chip SEID, and the trust domain stores various PKI certificates and certificate chain data for verification; The second verification module is used to read the permission result set, verify the application role information respectively, and obtain the permission information corresponding to the application role; wherein the permission domain data includes permission rules, the permission rules refer to the corresponding relationship between user roles and corresponding permissions, and the permission result set refers to all user roles in the permission rules; The permission determination module is used to determine the permission according to the access type to determine the service content; A calling module, used to call corresponding code resources and perform operations within the corresponding permission range according to the permission determination result; The sending module is used to return the code execution result to the application of the object-end device.

9. A code protection architecture based on a security chip, characterized in that: The architecture includes: a plurality of physical end devices, a global center arranged on a cloud platform, and at least one management layer, wherein the global center is respectively connected to each of the management layers, and each of the management layers is connected to a plurality of the physical end devices; The global center includes: a root key center, a rights management center and a security incident management center; Root key center, generates and stores root keys, signs various PKI certificates and certificate chains with root keys, is used to derive the PKI asymmetric cryptographic system at the management level, and provides root key signing services to the PKI asymmetric cryptographic system; The authority management center formulates a globally unified authority rule management strategy set, and distributes different authority management strategy subsets to the corresponding management layers according to the differences of various management layers. One authority rule management strategy subset corresponds to one management layer authority management system. The security incident management center is used to aggregate the security supervision data transmitted by each management layer, conduct a comprehensive global analysis based on the application code access behavior data of each device, the code running environment security data, the code application result data, and the predicted risk threat level, and conduct a statistical analysis of the distribution and use of security chips of all device devices; The management layer includes: PKI asymmetric cryptographic system, authority management system and security supervision system; The PKI asymmetric cryptographic system is used to provide application identity certificates for corresponding physical end devices, provide rights management system certificates and rights signature services, and distribute various PKI certificates and certificate chains obtained from the root key center to corresponding physical end devices; The authority management system is used to receive the authority management policy issued by the authority management center to provide reliable authorization results to each object-end device application, and issue the results of the authority rules to the corresponding object-end device; The security supervision system is used to obtain the protected code access behavior, environment and code application result data uploaded by each object terminal device, and determine the security threat level of the security chip of the object terminal device according to the pre-set security event threat level classification method and make corresponding warnings, so as to supervise each security chip and report the data uploaded by each object terminal device and the threat level data to the security event management center; The physical end device includes a security chip, an access control interface API, and a security event probe; A security chip is integrated with a mixed code area, an access control module, a trust domain data area, a permission domain data area and an ACL, wherein the mixed code area includes protected code, encrypted code and redundant code, and the protected code is the protected code; wherein the access control module can be used to call other areas and ACL to perform identity authentication and permission verification on application programs and interfaces that access the protected code in the security chip; the trust domain data area includes various PKI certificates and certificate chains for verification, the permission domain data area includes permission rules, and the permission rules refer to the corresponding relationship between user roles and corresponding permissions, and the ACL stores the binding result signature of the object terminal device DEV ID and the security chip SEID; The security event probe is divided into an environmental security perception probe and an access probe, which respectively collects the operating environment data, code access behavior and code application result data of the protected code of the security chip, and outputs the collected data to the management layer.

10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the code protection method based on the security chip according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Multi-service-domain authority management method, device and platform and readable storage medium

    CN109670768A

  • Software security sensing method and device, terminal equipment and storage medium

    CN116502191A

  • Encryption protection method and device of chip, equipment and storage medium

    CN116756781A

  • Identity verification method and device of encryption service, electronic equipment and storage medium

    CN117668807A

  • Integrated-Chip-Based Data Processing Method, Computing Device, and Storage Media

    US20190377907A1