Method and system for secure access to processor privileged resources
By generating pre-authentication and authentication identifiers, and combining asymmetric and shared key signature and verification mechanisms, the access permissions of privileged tools are restricted, solving the problems of reverse analysis and system crashes when dedicated debugging tools access processor privileged resources, and achieving fine-grained protection of intellectual property modules.
Patent Information
- Application Number
- CN202210755904.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In existing technologies, dedicated debugging tools pose risks of reverse engineering and system crashes when accessing privileged resources of the processor, and cannot effectively protect the internal architecture design of intellectual property modules.
By generating pre-authentication and authentication identifiers, and combining asymmetric and shared key signature and verification mechanisms, access permissions for privileged tools are limited. The "authentication + proxy + whitelist" mechanism enables fine-grained control over privileged resources and prevents direct manipulation of sensitive resources.
It effectively prevents reverse analysis through debugging pathways, prevents system crashes, protects the internal architecture design of intellectual property modules, and achieves more granular security access control.
Smart Images

Figure CN115168814B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the chip technical field, and particularly to a processor privilege resource secure access method and system thereof. BACKGROUND
[0002] The processor in the server usually adopts the SOC (System on Chip) design. As shown in the processor SOC design architecture, in addition to the general-purpose computing unit (CU) integrated in the processor, the security module and a plurality of IP (Intellectual Property) modules are built-in. Some of the IP modules have privilege resources, and the security module controls the access of the general-purpose computing unit to the privilege resources. Specifically, the security module controls the access of the general-purpose computing unit to the privilege resources in the IP module through the security policy module in the IP module. These privilege resources are related to the protection of the internal architecture design of the IP module or affect the stability of the system, and therefore the access of the general-purpose computing unit to the privilege resources is prohibited in the product environment. Only in the debugging environment, the security policy is adjusted by the security module to allow the general-purpose computing unit to access the privilege resources. Figure 1
[0003] Currently, in the debugging environment, the special debugging tool accesses the privilege resources through the general-purpose computing unit. The special debugging tool is usually secured by unlocking the chip (Secure Unlock) through the special debugging tool. After the authentication of the identity through the interaction with the security module, the security module is closed to allow the debugging tool to access all the privilege resources in the IP module through the general-purpose computing unit. That is, after the security unlocking, the special debugging tool can obtain all the state information inside the IP module through the debugging channel such as JTAG (Joint Test Action Group), which is an international standard test protocol mainly used for chip internal testing. Malicious attackers may use this means to do reverse analysis of the internal architecture design of the IP module, which is not conducive to the protection of the internal architecture design of the IP module. At the same time, the debugging tool may directly operate some sensitive privilege resources in the IP module, which may cause the system to crash. SUMMARY
[0004] The present application provides a processor privilege resource secure access method and system thereof, which is conducive to the protection of the internal architecture design of the IP module, and also prevents the debugging tool from directly operating some sensitive privilege resources in the IP module, which may cause the system to crash.
[0005] In a first aspect, the present application provides a method for secure access to processor-privileged resources, wherein a processor is built-in with a security module and a plurality of intellectual property modules, and at least part of the intellectual property modules are built-in with a plurality of privileged resources. The method comprises: a privileged tool sending an authentication request containing its identity information to the security module; the security module generating a pre-authentication identifier according to the authentication request, and returning the pre-authentication identifier to the privileged tool; the pre-authentication identifier at least containing a processor identifier uniquely identifying the processor; the privileged tool sending the authentication purpose and the pre-authentication identifier to an authentication server; the authentication server adding a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, obtaining an authentication identifier, and returning the authentication identifier to the privileged tool; the privileged tool sending the authentication identifier to the security module; the security module verifying the legality of the authentication identifier; after the verification of the legality of the authentication identifier is passed, the security module marking each privileged resource in the list of privileged resources as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module proxy according to each privileged resource category in the list of privileged resources, and returning the marked list of privileged resources to the privileged tool; the privileged tool directly accessing the corresponding privileged resource or accessing the corresponding privileged resource through the security module proxy according to the marked list of privileged resources.
[0006] In the above scheme, the security module generates a pre-authentication identifier after receiving the authentication request sent by the privileged tool, and the authentication server adds a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, thereby limiting the range of privileged resources that the privileged tool can access. By controlling the category and quantity of privileged resources in the privileged resource list, the granularity of the zero or all permissions that can access all privileged resources or cannot access all privileged resources in the traditional way can be reduced to a specific single privileged resource, thereby greatly reducing the granularity of the permission control. Then the security module marks each privileged resource in the privileged resource list as a privileged resource that can be directly accessed or a privileged resource that needs to be accessed by the security module proxy, thereby forming a marked privileged resource list. Thus, the privileged tool can determine whether to directly access the corresponding privileged resource or access the corresponding privileged resource through the security module proxy according to the marked privileged resource list. Compared with the traditional way, the technical solution does not need to close the security policy module and perform security unlocking. Some privileged resources allow the privileged tool to directly access, while some privileged resources need to be accessed by the security module proxy, that is, without performing security unlocking, the mechanism of "authentication + proxy + whitelist (privileged resource list)" is used to achieve a single privileged resource of the processor privileged resource for a more fine-grained security access control. When accessing the privileged resource through the security module proxy, there is no need to open the debugging channel between the privileged tool and the privileged resource, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module through the debugging channel, and is conducive to the protection of the internal architecture design of the intellectual property module. Through the whitelist authentication mechanism, the chip manufacturer sets the privileged resource list through the controlled authentication server, which can effectively reduce the authorization granularity range from the entire intellectual property module to a specific single privileged resource, strictly control the authorization range, and prevent the system from crashing due to the privileged tool directly operating some sensitive privileged resources in the intellectual property module. Through the above-mentioned scheme, it can be adapted to the actual application scene. During the functional test of the chip, different privileged resource list ranges can be set according to different functional test scenes to perform more fine-grained security access control and better protect the internal architecture design of the intellectual property module.
[0007] In one specific embodiment, the authentication server adds a list of privileged resources authorized for the privileged tool to access in the pre-authentication identity according to the authentication purpose, to obtain the authentication identity, including: the authentication server adds a list of privileged resources authorized for the privileged tool to access in the pre-authentication identity according to the authentication purpose, and signs the pre-authentication identity after adding the list of privileged resources using the private key in the asymmetric key, to obtain the authentication identity. The security module verifies the legality of the authentication identity, including: the security module verifies the legality of the authentication identity using the public key in the asymmetric key after receiving the authentication identity. By embedding the signature and verification mechanism of the asymmetric key in the transmission process of the authentication identity, the integrity and tamper resistance of the authentication identity can be ensured.
[0008] In one specific embodiment, the security module generates the pre-authentication identity according to the authentication request, and further includes: encrypting the pre-authentication identity using the public key in the asymmetric key to generate the encrypted pre-authentication identity. The authentication server decrypts the encrypted pre-authentication identity using the private key in the asymmetric key after receiving the encrypted pre-authentication identity, to obtain the pre-authentication identity. By encrypting the pre-authentication identity using the public key in the asymmetric key during transmission, and decrypting the pre-authentication identity using the private key in the asymmetric key, the ciphertext transmission of the pre-authentication identity is realized, and the pre-authentication identity is prevented from being leaked.
[0009] In one specific embodiment, after the security module generates the pre-authentication identity according to the authentication request, it also generates a unique corresponding hash value according to the pre-authentication identity, encrypts the pre-authentication identity and the hash value using a shared key, and returns the encrypted pre-authentication identity and hash value to the privileged tool, which forwards them to the authentication server; wherein the shared key is a key shared between the authentication server and the security module. The authentication server also decrypts the encrypted pre-authentication identity and hash value using the shared key after receiving them, and verifies the legality of the pre-authentication identity using the hash value; after the pre-authentication identity passes the legality verification, it adds a list of privileged resources in the pre-authentication identity according to the authentication purpose. By using the shared key and hash value, the pre-authentication identity is transmitted in ciphertext and its integrity is verified, preventing the pre-authentication identity from being leaked, while also ensuring the integrity and tamper resistance of the pre-authentication identity, and ensuring the authenticity of the pre-authentication identity.
[0010] In one specific embodiment, the authentication server adds a list of privileged resources in the pre-authentication identity, and after obtaining the authentication identity, generates a unique corresponding hash value according to the authentication identity, encrypts the authentication identity and the hash value using a shared key, and returns the encrypted authentication identity and hash value to the privileged tool, which forwards them to the security module; wherein the shared key is a key shared between the authentication server and the security module. The security module verifies the legality of the authentication identity, including: after receiving the encrypted authentication identity and hash value, the security module decrypts the encrypted authentication identity and hash value according to the shared key, and verifies the legality of the authentication identity using the hash value. By using the shared key and the hash value, the authentication identity is transmitted in ciphertext and integrity is verified, preventing the authentication identity from being leaked, while also ensuring the integrity and tamper resistance of the authentication identity, ensuring the authenticity of the authentication identity.
[0011] In one specific embodiment, the security module generates a pre-authentication identity according to the authentication request, and then adds the public key in the first asymmetric key in the pre-authentication identity, encrypts the pre-authentication identity using the public key in the second asymmetric key, and forwards the encrypted pre-authentication identity to the authentication server through the privileged tool. After receiving the encrypted pre-authentication identity, the authentication server also decrypts the encrypted pre-authentication identity according to the private key in the second asymmetric key to obtain the pre-authentication identity. After generating the authentication identity, the authentication server also encrypts the authentication identity using the public key in the first asymmetric key, and forwards the encrypted authentication identity to the security module through the privileged tool. The security module verifies the legality of the authentication identity, including: after receiving the encrypted authentication identity, the security module verifies the legality of the encrypted authentication identity using the private key in the first asymmetric key. By using two pairs of asymmetric keys, the pre-authentication identity and the authentication identity are encrypted and decrypted, realizing the ciphertext transmission of the pre-authentication identity and the authentication identity, preventing the pre-authentication identity and the authentication identity from being leaked, while also ensuring the integrity and tamper resistance of the pre-authentication identity and the authentication identity, ensuring the authenticity of the pre-authentication identity and the authentication identity.
[0012] In one specific embodiment, the pre-authentication identifier further comprises a time identifier; the authentication server further adds an authorized validity period of the authorization privilege tool to access the privileged resources listed in the privilege resource list in the pre-authentication identifier according to the pre-authentication identifier. After receiving the authentication identifier, the security module further checks whether the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and confirms whether the current time is within the authorized validity period. When the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and the current time is within the authorized validity period, the security module marks each privileged resource in the privilege resource list as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module according to each privileged resource category in the privilege resource list. By adding the authorized validity period, the security module verifies the processor identifier and the current time before marking the privilege resource list, filters out the inconsistent information in advance, ensures that the marking is performed under correct information, and further improves the security access control of the privileged tool to the privileged resources.
[0013] In one specific embodiment, the intellectual property module with the built-in privileged resources further comprises a security policy module. The security module marks each privileged resource in the privilege resource list as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module according to each privileged resource category in the privilege resource list, and further configures the security policy module of the corresponding intellectual property module to control the privileged tool to directly access a certain privileged resource or access a certain privileged resource through the security module.
[0014] In one specific embodiment, the privileged resource is a debug register, a performance detection register, a special function register, or an initialization operation module of the intellectual property module. The phenomenon of system downtime caused by the debug tool directly operating sensitive privileged resources such as sensitive registers or sensitive function modules in the intellectual property module is prevented.
[0015] In the second aspect, the application further provides another security access method of a processor privileged resource, which is applied to a privileged tool. The processor is built-in with a security module and a plurality of intellectual property modules, and at least part of the intellectual property modules are built-in with a plurality of privileged resources. The security access method comprises the following steps: sending an authentication request comprising identity information of the privileged tool to the security module; receiving a pre-authentication identifier returned by the security module; sending the authentication request and the pre-authentication identifier to an authentication server; receiving an authentication identifier returned by the authentication server, and sending the authentication identifier to the security module; receiving a marked privilege resource list returned by the security module; and directly accessing a corresponding privileged resource or accessing a corresponding privileged resource through the security module according to the marked privilege resource list.
[0016] In the above scheme, by making the privileged tool determine whether to directly access the corresponding privileged resource or to access the corresponding privileged resource through the security module agent according to the marked privileged resource list. Compared with the traditional way, some privileged resources allow the privileged tool to directly access, and some privileged resources need to be accessed by the security module agent, that is, without performing security unlocking, through the "authentication + agent + whitelist" mechanism, the single privileged resource is realized. The security access control of the processor privileged resource is realized. When accessing the privileged resource through the security module agent, there is no need to open the debugging channel between the privileged tool and the privileged resource, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module through the debugging channel, and is beneficial to the protection of the internal architecture design of the intellectual property module. Through the whitelist authentication mechanism, the privileged resource list is set by the authentication server controlled by the chip manufacturer, which can effectively reduce the authorization granularity range from the entire intellectual property module to a specific single privileged resource, can strictly control the authorization range, and prevent the system from being directly operated by the privileged tool. Some sensitive privileged resources in the intellectual property module cause system downtime.
[0017] In a third aspect, the application further provides another processor privileged resource security access method, which is applied to a security module. The processor is built-in with a security module and a plurality of intellectual property modules, and at least part of the intellectual property modules are built-in with a plurality of privileged resources. The security access method comprises: receiving an authentication request sent by a privileged tool; generating a pre-authentication identifier according to the authentication request, and returning the pre-authentication identifier to the privileged tool, wherein the pre-authentication identifier at least contains a processor identifier for uniquely identifying the processor; receiving an authentication identifier sent by the privileged tool; verifying the legality of the authentication identifier; after the legality verification of the authentication identifier is passed, marking each privileged resource in the privileged resource list as a directly accessible privileged resource or a privileged resource accessed by the security module agent according to each privileged resource category in the privileged resource list in the authentication identifier; and returning the marked privileged resource list to the privileged tool.
[0018] In the above scheme, after receiving the authentication request sent by the privileged tool, the security module generates a pre-authentication identifier, and the authentication server adds a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, thereby limiting the range of privileged resources that the privileged tool can access. By controlling the category and quantity of privileged resources in the list of privileged resources, the granularity of the permission control in the traditional manner, which can access all privileged resources or cannot access all privileged resources, can be reduced to a specific single privileged resource, thereby greatly reducing the granularity of the permission control. Then, the security module marks each privileged resource in the list of privileged resources as a privileged resource that can be directly accessed or a privileged resource that needs to be accessed by the security module, thereby forming a marked list of privileged resources. Thus, the privileged tool can determine whether to directly access the corresponding privileged resource or access the corresponding privileged resource through the security module according to the marked list of privileged resources. Compared with the traditional manner, the technical solution does not need to close the security policy module and perform security unlocking. Some privileged resources allow the privileged tool to directly access, and some privileged resources need to be accessed by the security module. That is, without performing security unlocking, the mechanism of "authentication + proxy + whitelist" is used to achieve a relatively fine-grained security access control for the processor privileged resources to a single privileged resource. When accessing the privileged resource through the security module, the debug channel between the privileged tool and the privileged resource does not need to be opened, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module through the debug channel, and is beneficial to the protection of the internal architecture design of the intellectual property module. Through the whitelist authentication mechanism, the chip manufacturer sets the list of privileged resources through the controlled authentication server, which can effectively reduce the authorized granularity range from the entire intellectual property module to a specific single privileged resource, can strictly control the authorized range, and can prevent the system from being shut down due to the direct operation of some sensitive privileged resources in the intellectual property module by the privileged tool.
[0019] In one specific embodiment, when the authentication server signs the pre-authentication identifier after adding the list of privileged resources using the private key in the asymmetric key, the authentication identifier is obtained, and the legality of the authentication identifier is verified. After receiving the authentication identifier, the legality of the authentication identifier is verified using the public key in the asymmetric key. By embedding the signature and verification mechanism of the asymmetric key in the transmission process of the authentication identifier, the integrity and tamper resistance of the authentication identifier can be ensured.
[0020] In one specific embodiment, generating the pre-authentication identity according to the authentication request and returning the pre-authentication identity to the privileged tool comprises: encrypting the pre-authentication identity using a public key in the asymmetric key, generating an encrypted pre-authentication identity, and returning the encrypted pre-authentication identity to the privileged tool. By encrypting the pre-authentication identity using the public key in the asymmetric key during transmission of the pre-authentication identity and decrypting using the private key in the asymmetric key, ciphertext transmission of the pre-authentication identity is achieved, preventing leakage of the pre-authentication identity.
[0021] In one specific embodiment, after generating the pre-authentication identity according to the authentication request, the secure access method further comprises: generating a unique corresponding hash value according to the pre-authentication identity; encrypting the pre-authentication identity and the hash value using a shared key, and returning the encrypted pre-authentication identity and hash value to the privileged tool together, which is forwarded to the authentication server by the privileged tool, wherein the shared key is a key shared between the authentication server and the secure module. By using the shared key and the hash value, the pre-authentication identity is transmitted in ciphertext and integrity is checked, preventing leakage of the pre-authentication identity, while also ensuring the integrity and tamper resistance of the pre-authentication identity, ensuring the authenticity of the pre-authentication identity.
[0022] In one specific embodiment, when the authentication server generates a unique corresponding hash value according to the authentication identity, encrypts the authentication identity and the hash value using a shared key, and returns the encrypted authentication identity and hash value to the privileged tool, verifying the legality of the authentication identity comprises: after receiving the encrypted authentication identity and hash value, also decrypting the encrypted authentication identity and hash value according to the shared key, and verifying the legality of the authentication identity using the hash value, wherein the shared key is a key shared between the authentication server and the secure module. By using the shared key and the hash value, the authentication identity is transmitted in ciphertext and integrity is checked, preventing leakage of the authentication identity, while also ensuring the integrity and tamper resistance of the authentication identity, ensuring the authenticity of the authentication identity.
[0023] In one specific embodiment, the secure access method further comprises: after the pre-authentication identifier is generated, adding a public key in the first asymmetric key into the pre-authentication identifier, encrypting the pre-authentication identifier using a public key in the second asymmetric key, and sending the encrypted pre-authentication identifier to the privileged tool. When the authentication server encrypts the authentication identifier using the public key in the first asymmetric key, verifying the legality of the authentication identifier comprises: after receiving the encrypted authentication identifier, verifying the legality of the encrypted authentication identifier using a private key in the first asymmetric key to obtain the authentication identifier. By using two pairs of asymmetric keys to encrypt and decrypt the pre-authentication identifier and the authentication identifier respectively, the ciphertext transmission of the pre-authentication identifier and the authentication identifier is realized, the leakage of the pre-authentication identifier and the authentication identifier is prevented, the integrity and tamper resistance of the pre-authentication identifier and the authentication identifier are ensured, and the credibility of the pre-authentication identifier and the authentication identifier is ensured.
[0024] In one specific embodiment, the pre-authentication identifier further contains a time identifier; and the pre-authentication identifier further adds an authorized valid period of the privileged tool accessing the privileged resources listed in the privileged resource list. After receiving the authentication identifier, the secure access method further comprises: verifying whether the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and confirming whether the current time is within the authorized valid period; when the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier and the current time is within the authorized valid period, marking each privileged resource in the privileged resource list as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module according to each privileged resource category in the privileged resource list. By adding the authorized valid period, the security module verifies the processor identifier and whether the current time is within the valid period before marking the privileged resource list, filters out inconsistent information in advance, ensures that the marking is performed under correct information, and further improves the secure access control of the privileged tool to the privileged resources by explicitly specifying the authorized valid period of each privileged resource list.
[0025] In one specific embodiment, the intellectual property module with the built-in privileged resources further has a security policy module. While marking each privileged resource in the privileged resource list as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module according to each privileged resource category in the privileged resource list, the secure access method further comprises: configuring the security policy module corresponding to the intellectual property module respectively, so as to control the privileged tool to directly access a certain privileged resource or access a certain privileged resource through the security module.
[0026] In a fourth aspect, the present application further provides another method for securely accessing processor-privileged resources, which is applied to an authentication server. The authentication server has a security module and a plurality of intellectual property modules built-in, and at least part of the intellectual property modules have a plurality of privileged resources built-in. The method comprises: receiving an authentication purpose and a pre-authentication identifier sent by a privileged tool; adding a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier; and returning the authentication identifier to the privileged tool.
[0027] In the above scheme, the authentication server adds a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, to limit the range of privileged resources that the privileged tool can access. The granularity of the permission control can be reduced from zero or all the permissions to access all the privileged resources in the traditional way to a specific single privileged resource, greatly reducing the granularity of the permission control. Through the white list authentication mechanism, the chip manufacturer sets the list of privileged resources through the controlled authentication server, which can effectively reduce the authorized granularity range from the entire intellectual property module to a specific single privileged resource, strictly control the authorized range, and prevent the system from crashing due to the privileged tool directly operating some sensitive privileged resources in the intellectual property module. Through the above scheme, the application can adapt to the actual application scenario, set different ranges of the list of privileged resources according to different functional test scenarios during the functional test of the chip, and perform more fine-grained secure access control to better protect the internal architecture design of the intellectual property module.
[0028] In a specific embodiment, adding a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose to obtain an authentication identifier comprises: adding a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, and signing the pre-authentication identifier after adding the list of privileged resources using a private key in the asymmetric key to obtain an authentication identifier. By embedding the signature and verification mechanism of the asymmetric key in the transmission process of the authentication identifier, the integrity and tamper resistance of the authentication identifier can be ensured.
[0029] In a specific embodiment, when the security module encrypts the pre-authentication identifier using a public key in the asymmetric key to generate an encrypted pre-authentication identifier, the secure access method further comprises: after receiving the encrypted pre-authentication identifier, decrypting the encrypted pre-authentication identifier using a private key in the asymmetric key to obtain the pre-authentication identifier. By encrypting the pre-authentication identifier using a public key in the asymmetric key during transmission and decrypting it using a private key in the asymmetric key, the ciphertext transmission of the pre-authentication identifier is realized, and the pre-authentication identifier is prevented from being leaked.
[0030] In one specific embodiment, when the security module generates a uniquely corresponding hash value according to the pre-authentication identifier, encrypts the pre-authentication identifier and the hash value using a shared key, and returns the encrypted pre-authentication identifier and hash value to the privileged tool, the secure access method further comprises: after receiving the encrypted pre-authentication identifier and hash value, decrypting the pre-authentication identifier and the hash value according to the shared key, and verifying the legality of the pre-authentication identifier using the hash value; wherein the shared key is a key shared between the authentication server and the security module; after the pre-authentication identifier passes the legality verification, adding a list of privileged resources in the pre-authentication identifier according to the authentication purpose. By using the shared key and the hash value, the pre-authentication identifier is transmitted in ciphertext and integrity-verified, preventing the pre-authentication identifier from being leaked, while also ensuring the integrity and tamper resistance of the pre-authentication identifier, and ensuring the trustworthiness of the pre-authentication identifier.
[0031] In one specific embodiment, after obtaining the authentication identifier, the secure access method further comprises: generating a uniquely corresponding hash value according to the authentication identifier; encrypting the authentication identifier and the hash value using a shared key, and returning the encrypted authentication identifier and hash value to the privileged tool; wherein the shared key is a key shared between the authentication server and the security module. By using the shared key and the hash value, the authentication identifier is transmitted in ciphertext and integrity-verified, preventing the authentication identifier from being leaked, while also ensuring the integrity and tamper resistance of the authentication identifier, and ensuring the trustworthiness of the authentication identifier.
[0032] In one specific embodiment, when the security module adds the public key in the first asymmetric key in the pre-authentication identifier, encrypts the pre-authentication identifier using the public key in the second asymmetric key, and forwards the encrypted pre-authentication identifier to the authentication server through the privileged tool, the secure access method further comprises: after receiving the encrypted pre-authentication identifier, decrypting the encrypted pre-authentication identifier according to the private key in the second asymmetric key to obtain the pre-authentication identifier; after generating the authentication identifier, also encrypting the authentication identifier using the public key in the first asymmetric key, and sending the encrypted authentication identifier to the privileged tool. By using two pairs of asymmetric keys, the pre-authentication identifier and the authentication identifier are encrypted and decrypted respectively, realizing the ciphertext transmission of the pre-authentication identifier and the authentication identifier, preventing the pre-authentication identifier and the authentication identifier from being leaked, while also ensuring the integrity and tamper resistance of the pre-authentication identifier and the authentication identifier, and ensuring the trustworthiness of the pre-authentication identifier and the authentication identifier.
[0033] In one specific embodiment, the pre-authentication identifier further comprises a time identifier. When adding the list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier, the authorized validity period of the privileged tool to access the privileged resources listed in the list of privileged resources is also added. By adding the authorized validity period, the security module verifies the processor identifier and whether the current time is within the validity period before marking the list of privileged resources, which filters out the inconsistent information in advance, ensures that the marking is performed under correct information, and also explicitly indicates the authorized validity period of each list of privileged resources, which further improves the security access control of the privileged tool to the privileged resources.
[0034] In a fifth aspect, the present application further provides a security access system of processor privileged resources, which comprises a processor, and a security module and a plurality of intellectual property modules built in the processor, each of at least part of the intellectual property modules comprises a plurality of privileged resources. The security access system further comprises a privileged tool and an authentication server. The privileged tool is configured to send an authentication request comprising its identity information to the security module. The security module is configured to generate a pre-authentication identifier according to the authentication request, and return the pre-authentication identifier to the privileged tool, and the privileged tool is configured to send the authentication purpose and the pre-authentication identifier to the authentication server. The pre-authentication identifier at least comprises a processor identifier for uniquely identifying the processor. The authentication server is configured to add a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier, and return the authentication identifier to the privileged tool, and the privileged tool is configured to forward the authentication identifier to the security module. The security module is further configured to mark each privileged resource in the list of privileged resources as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module proxy according to each privileged resource category in the list of privileged resources, and return the marked list of privileged resources to the privileged tool. The privileged tool is further configured to directly access the corresponding privileged resource or access the corresponding privileged resource through the security module according to the marked list of privileged resources.
[0035] In the above scheme, the security module generates a pre-authentication identifier after receiving the authentication request sent by the privileged tool, and the authentication server adds a list of privileged resources that the privileged tool is authorized to access in the pre-authentication identifier according to the authentication purpose, thereby limiting the range of privileged resources that the privileged tool can access. By controlling the category and quantity of privileged resources in the privileged resource list, the granularity of the permission control in the traditional way, which can access all privileged resources or cannot access all privileged resources, can be reduced to a specific single privileged resource, thereby greatly reducing the granularity of the permission control. Then, the security module marks each privileged resource in the privileged resource list as a privileged resource that can be directly accessed or a privileged resource that needs to be accessed by the security module, thereby forming a marked privileged resource list. Thus, the privileged tool can determine whether to directly access the corresponding privileged resource or access the corresponding privileged resource through the security module according to the marked privileged resource list. Compared with the traditional way, the technical solution does not need to close the security policy module and perform security unlocking. Some privileged resources allow the privileged tool to directly access, and some privileged resources need to be accessed by the security module. That is, without performing security unlocking, the mechanism of “authentication + proxy + whitelist” is used to achieve a single privileged resource for the security access control of the processor privileged resource. When the privileged resource is accessed through the security module, the debug channel between the privileged tool and the privileged resource does not need to be opened, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module through the debug channel, and is beneficial to the protection of the internal architecture design of the intellectual property module. Through the whitelist authentication mechanism, the chip manufacturer sets the privileged resource list through the controlled authentication server, which can effectively reduce the authorization granularity range from the entire intellectual property module to a specific single privileged resource, strictly control the authorization range, and prevent the system from crashing due to the direct operation of some sensitive privileged resources in the intellectual property module by the privileged tool. Through the above-mentioned scheme, the chip can be adapted to the actual application scenario. During the functional test of the chip, different privileged resource list ranges can be set according to different functional test scenarios, thereby achieving more fine-grained security access control and better protecting the internal architecture design of the intellectual property module. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 A processor SOC design architecture diagram is shown for the prior art;
[0037] Figure 2 A method for the privileged tool to access the privileged resource is shown for the embodiment of the present application;
[0038] Figure 3 Another method for the privileged tool to access the privileged resource is shown for the embodiment of the present application;
[0039] Figure 4A flowchart of a security access method of a processor privileged resource provided by an embodiment of the present application is shown in the figure.
[0040] Figure 5 A flowchart of another security access method of a processor privileged resource provided by an embodiment of the present application is shown in the figure.
[0041] Reference signs:
[0042] 10 - processor 11 - security module 12 - intellectual property module
[0043] 13 - general computing unit 121 - security policy module
[0044] 122 - privileged resource 20 - privileged tool 30 - authentication server DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of 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 skilled in the art without creative labor fall within the scope of protection of the present application.
[0046] In order to facilitate understanding of the security access method of a processor privileged resource provided by the embodiments of the present application, the application scenario of the security access method provided by the embodiments of the present application will be described first below. The security access method is applied in a security access control process of a processor privileged resource. Referring to Figure 2 , the processor is built-in with a security module 11 and a plurality of intellectual property modules 12, i.e. the number of the intellectual property modules 12 can be any number such as 1, 2, 3, 5, 10, etc. At least part of the intellectual property modules 12 are built-in with a plurality of privileged resources 122. Specifically, all of the intellectual property modules 12 can be built-in with the privileged resources 122, or part but not all of the intellectual property modules 12 can be built-in with the privileged resources 122. The number of the privileged resources 122 built-in in the intellectual property modules 12 can be any value such as 1, 2, 3, 4, 5, etc. The security access method of the processor privileged resource will be described in detail below with reference to the drawings.
[0047] Referring to Figure 2 , Figure 3 and Figure 4 , the security access method of the processor privileged resource provided by the embodiments of the present application includes:
[0048] The privileged tool 20 sends an authentication request containing its identity information to the security module 11;
[0049] The security module 11 generates a pre-authentication identity according to the authentication request, and returns the pre-authentication identity to the privileged tool 20;
[0050] The pre-authentication identity at least contains a processor 10 identity uniquely identifying the processor 10;
[0051] The privileged tool 20 sends the authentication purpose and the pre-authentication identity to the authentication server 30;
[0052] The authentication server 30 adds a list of privileged resources 122 (such as a white list as shown in Figure 2 、 Figure 3 and Figure 4 ) that the privileged tool 20 is allowed to access in the pre-authentication identity according to the authentication purpose, to obtain an authentication identity, and returns the authentication identity to the privileged tool 20;
[0053] The privileged tool 20 sends the authentication identity to the security module 11;
[0054] The security module 11 verifies the legality of the authentication identity; after the verification of the legality of the authentication identity is passed, the security module 11 marks each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to each privileged resource 122 category in the list of privileged resources 122, and returns the marked list of privileged resources 122 to the privileged tool 20;
[0055] The privileged tool 20 directly accesses the corresponding privileged resource 122 or accesses the corresponding privileged resource 122 through the security module 11 according to the marked list of privileged resources 122.
[0056] In the above scheme, the security module 11 generates a pre-authentication identifier after receiving the authentication request sent by the privileged tool 20, and the authentication server 30 adds a list of privileged resources 122 that the privileged tool 20 is authorized to access in the pre-authentication identifier according to the authentication purpose, limiting the range of privileged resources 122 that the privileged tool 20 can access. By controlling the category and quantity of privileged resources 122 in the list of privileged resources 122, the granularity of the permission control in the traditional way, which can access all privileged resources 122 or cannot access all privileged resources 122, can be reduced to a specific single privileged resource 122, greatly reducing the granularity of the permission control. Then the security module 11 marks each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that needs to be accessed by the security module 11, forming a marked list of privileged resources 122, so that the privileged tool 20 determines whether to directly access the corresponding privileged resource 122 or access the corresponding privileged resource 122 through the security module 11 according to the marked list of privileged resources 122. Compared with the traditional way, the technical scheme does not need to close the security policy module 121 and perform security unlocking. Some privileged resources 122 allow the privileged tool 20 to directly access, and some privileged resources 122 need to be accessed by the security module 11, that is, without performing security unlocking, through the mechanism of "authentication + proxy + whitelist (list of privileged resources 122)", the security access control of the processor privileged resource is realized to a single privileged resource 122. When accessing the privileged resource 122 through the security module 11, there is no need to open the debugging channel between the privileged tool 20 and the privileged resource 122, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module 12 through the debugging channel, and is conducive to the protection of the internal architecture design of the intellectual property module 12. Through the whitelist authentication mechanism, the chip manufacturer sets the list of privileged resources 122 through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, strictly control the authorization range, and prevent the system from crashing due to the privileged tool 20 directly operating some sensitive privileged resources 122 in the intellectual property module 12. Through the above-mentioned scheme, it can be adapted to the actual application scene, and in the process of the OEM (Original Equipment Manufacturer, original equipment manufacturer, which refers to the manufacturer who builds a hardware system based on a chip) manufacturer or user testing the chip, different list of privileged resources 122 ranges are set according to different functional test scenarios, finer security access control is performed, and the internal architecture design of the intellectual property module 12 is better protected. The above steps will be described in detail below with reference to the accompanying drawings.
[0057] First, refer to Figure 4, the privileged tool 20 sends an authentication request containing its identity information to the security module 11 to authenticate its identity to the security module 11. The privileged tool 20 can be a debugging tool running on the general computing unit 13 and needing to access the processor privileged resources, or can be other tools needing to access the privileged resources 122 of the processor 10. In actual application, referring to Figure 4 and Figure 4 , the privileged tool 20 can be a debugging tool used in the process of functional testing of the chip. Referring to Figure 2 and Figure 3 , the privileged tool 20 can specifically initiate an authentication request to the security module 11 through a communication interface between the general computing unit 13 and the security module 11. The privileged resources 122 can specifically be debugging registers, performance detection registers, special function registers, etc. built in a certain intellectual property module 12, that is, the privileged tool 20 accesses the registers in a certain intellectual property module 12. Of course, the privileged resources 122 can also be any other type of privileged resources 122. For example, the privileged resources 122 can also be a series of initialization operation modules of the intellectual property module 12. It is prevented that the debugging tool directly operates sensitive privileged resources 122 such as sensitive registers or sensitive function modules in the intellectual property module 12, resulting in system downtime. It can be known that the application does not limit the type of the privileged resources 122, and the core is to provide a security access method of the processor privileged resources, so that the chip manufacturer can perform fine-grained permission control on the access of the privileged tool 20 to the privileged resources 122 through the authentication server 30, and realize the secure access of the privileged tool 20 to the privileged resources 122.
[0058] Of course, the privileged tool 20 can embed a list of privileged resources 122 requested to be accessed in the authentication request when sending the authentication request to the security module 11. The list of privileged resources 122 is an initial list of privileged resources 122 listed by the privileged tool 20 based on its purpose, and the list of privileged resources 122 needs to be authenticated by the security module 11 and the authentication server 30. And in the authentication process of the authentication server 30, the initial list of privileged resources 122 provided by the privileged tool 20 can be completely agreed, and the list of privileged resources 122 is added to the authentication identifier. Or partially agree or completely disagree with the initial list of privileged resources 122 provided by the privileged tool 20, at this time, the initial list of privileged resources 122 provided by the privileged tool 20 will be different from the list of privileged resources 122 in the authentication identifier, and the subsequent authentication process to the security module 11 will be based on the list of privileged resources 122 in the authentication identifier. Obviously, the initial list of privileged resources 122 provided by the privileged tool 20 is only used as a reference for the authentication server 30, and is not the basis for the authentication server 30 to add it to the authentication identifier.
[0059] After that, as shown in Figure 2 , Figure 3 and Figure 4 , the security module 11 generates a pre-authentication identifier according to the authentication request, and returns the pre-authentication identifier to the privileged tool 20. That is, after receiving the authentication request, the security module 11 generates a pre-authentication identifier, which at least contains a processor 10 identifier that can uniquely identify the processor 10. The serial code of the processor 10 can be used as the processor 10 identifier, which identifies the specific processor 10 location of the privileged resource 122 in the subsequent authentication to the authentication server 30. Of course, as shown in Figure 5 , a time identifier can also be added to the pre-authentication identifier to identify the time when the authentication request is received and the pre-authentication identifier is generated, so as to facilitate the authentication server 30 to estimate the time period when the privileged tool 20 accesses the privileged resource 122, and increase the authorized effective period of the privileged tool 20 to access the privileged resources 122 listed in the authorization list of the privileged resource 122 in the authentication identifier, so as to facilitate the subsequent privileged tool 20 to access the privileged resource 122, as the security module 11 judges whether the current time node of the access is within the authorized effective period, so as to increase the access time effective period of the security access permission control, and further improve the security access control of the privileged tool 20 to the privileged resource 122.
[0060] Next, as shown in Figure 2 , Figure 3 and Figure 4 , the privileged tool 20 sends the authentication purpose and the pre-authentication identifier to the authentication server 30 after receiving the pre-authentication identifier, and further authenticates the authentication server 30.
[0061] Next, as shown in Figure 2 , Figure 3 and Figure 4 , the authentication server 30 adds the list of privileged resources 122 that the privileged tool 20 is authorized to access in the pre-authentication identifier according to the authentication purpose after receiving the pre-authentication identifier sent by the privileged tool 20, obtains the authentication identifier, and returns the authentication identifier to the privileged tool 20. As shown in Figure 4 and Figure 5 , the authentication server 30 can be located at the chip manufacturer end, and the chip manufacturer can set different ranges of privileged resource 122 lists according to different functional test scenarios during the functional test of the chip by the OEM manufacturer or the user, to perform more fine-grained security access control and better protect the internal architecture design of the intellectual property module 12. As shown in Figure 5, the authentication server 30 can add the authorized valid period of the privileged resources 122 listed in the privileged resource 122 list that the authorized privileged tool 20 can access in the pre-authentication identification according to the time identification and the authentication purpose in the pre-authentication identification, so as to facilitate the security module 11 to judge whether the current time node of the access is within the authorized valid period when the privileged tool 20 accesses the privileged resources 122 subsequently, thereby making the security access permission control increase the dimension of the access time valid period, and further improving the security access control of the privileged tool 20 to the privileged resources 122. At this time, the authentication identification contains not only the privileged resource 122 list and the authorized valid period, but also the processor 10 identification, the time identification, the privileged tool 20 identity information and other information originally contained in the pre-authentication identification.
[0062] Next, with reference to Figure 4 , the privileged tool 20 sends the authentication identification to the security module 11, and authenticates its own identity to the security module 11 again, and the security module 11 marks and adjusts according to the authentication identification.
[0063] Next, as shown in Figure 4 , after receiving the authentication identification sent by the privileged tool 20, the security module 11 first verifies the legality of the authentication identification. After the legality verification of the authentication identification is passed, the security module 11 extracts the privileged resource 122 list from the authentication identification, and marks each privileged resource 122 in the privileged resource 122 list as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to the type of each privileged resource 122 in the privileged resource 122 list. That is, the security module 11 will divide the privileged resources 122 listed in the privileged resource 122 list into two categories in a whitelist manner. One category is the privileged resources 122 that can be directly accessed by the privileged tool 20 through the general computing unit 13, such as the privileged resources 2 shown below in Figure 2 and Figure 3 . The other category is the privileged resources 122 that need to be accessed by the security module 11 on behalf of the privileged tool 20 to initiate the privileged resource 122 access, such as the privileged resources 1 shown above in Figure 2 and Figure 3 . Then, marking is performed in the privileged resource 122 list to form a marked privileged resource 122 list, and the marked privileged resource 122 list is returned to the privileged tool 20, so that the privileged tool 20 can clearly know which privileged resources 122 can be directly accessed and which privileged resources 122 need to be accessed by the security module 11.
[0064] In addition, the security module 11 can also check whether the processor 10 identifier in the authentication identifier is the same as the processor 10 identifier in the pre-authentication identifier after receiving the authentication identifier. At the same time, when the authentication identifier is added to the authorized validity period, it can also further confirm whether the current is within the authorized validity period. The security module 11 only marks each privileged resource 122 in the privileged resource 122 list as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to each privileged resource 122 category in the privileged resource 122 list when the processor 10 identifier in the authentication identifier is the same as the processor 10 identifier in the pre-authentication identifier and the current is within the authorized validity period. By adding the authorized validity period, the security module 11 verifies the processor 10 identifier and whether the current is within the validity period before marking the privileged resource 122 list, filters out inconsistent information in advance, ensures that the marking is performed under correct information, and also clearly defines the authorized validity period of each privileged resource 122 list, further improving the security access control of the privileged tool 20 to the privileged resource 122.
[0065] Furthermore, referring to Figure 3 The intellectual property module 12 with several privileged resources 122 can also have a security policy module 121 built-in. The security module 11 can also configure the security policy module 121 corresponding to the intellectual property module 12 respectively while marking each privileged resource 122 in the privileged resource 122 list as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to each privileged resource 122 category in the privileged resource 122 list. Specifically, the security policy module 121 in the corresponding intellectual property module 12 can be directly modified, and specifically, the register of the security policy module 121, which is usually a performance-related debug register, can be directly modified, so that the privileged tool 20 can directly access the corresponding privileged resource 122 through the general computing unit 13 or access the corresponding privileged resource 122 through the security module 11. In the above manner, it is convenient to control the privileged tool 20 to directly access a certain privileged resource 122 or access a certain privileged resource 122 through the security module 11.
[0066] Next, referring to Figure 4, the privileged tool 20 directly accesses the corresponding privileged resource 122 according to the marked privileged resource 122 list, or accesses the corresponding privileged resource 122 through the security module 11. Specifically, the privileged tool 20 selects to directly access the corresponding privileged resource 122 or to access the corresponding privileged resource 122 through the security module 11 according to the marking of the security module 11 on each privileged resource 122 in the marked privileged resource 122 list. That is, if the privileged resource 122 can be directly accessed through the general computing unit 13 according to the marking in the marked privileged resource 122 list, the privileged tool 20 directly accesses the corresponding privileged resource 122. Otherwise, the privileged tool 20 sends a privileged resource 122 access request to the security module 11, and the privileged resource 122 access request usually contains address information of the privileged resource 122, operation information of reading or writing, and the like. After the security module 11 receives the privileged resource 122 access request, the security module 11 confirms that the access request is in the privileged resource 122 list, accesses the corresponding privileged resource 122, and feeds back an access result of the privileged resource 122 to the privileged tool 20. Further, referring to Figure 4 , the security module 11 can further confirm whether the current time node is within the authorization validity period after receiving the privileged resource 122 access request, and if not, the security module 11 does not perform the proxy access operation, otherwise, the security module 11 performs the proxy access operation as shown above. Figure 5
[0067] In addition, in the transmission process of the pre-authentication identifier and the authentication identifier, the pre-authentication identifier and the authentication identifier can be signed, encrypted, or the like after being generated, and then sent out, so as to verify the signature or ciphertext transmission of the other party, and ensure the credibility of the pre-authentication identifier and the authentication identifier. Specifically, a plurality of ways can be used, and the signing or encryption operation can be performed only on one of the pre-authentication identifier and the authentication identifier, or on both. Several exemplary ways are shown as follows.
[0068] Embodiment 1
[0069] After obtaining the authentication identifier, the authentication server 30 can sign the authentication identifier to obtain a signed authentication identifier, so as to facilitate the security module 11 to verify the received authentication identifier. Specifically, referring to Figure 5 , the authentication server 30 can further sign the pre-authentication identity after adding the list of privileged resources 122 that the authorization privilege tool 20 accesses in the pre-authentication identity according to the authentication purpose, using the private key in the asymmetric key to obtain the authentication identity. At this time, the security module 11 needs to use the public key in the asymmetric key pair to verify the legality of the authentication identity when verifying the legality of the authentication identity after receiving the authentication identity. If the legality of the authentication identity is not verified, it means that the received authentication identity is incomplete or tampered, and the following operation can not be performed. The above-mentioned signing and verifying mechanism by embedding the asymmetric key in the transmission process of the authentication identity can ensure the integrity and tamper-proofing of the authentication identity.
[0070] In addition, the above-mentioned asymmetric key can be further used to realize the ciphertext transmission of the pre-authentication identity. Specifically, the security module 11 can further encrypt the pre-authentication identity using the public key in the asymmetric key to generate the encrypted pre-authentication identity after generating the pre-authentication identity according to the authentication request. At this time, the authentication server 30 first decrypts the encrypted pre-authentication identity using the private key in the asymmetric key to obtain the pre-authentication identity after receiving the encrypted pre-authentication identity. By using the public key in the asymmetric key for encryption and the private key in the asymmetric key for decryption in the transmission process of the pre-authentication identity, the ciphertext transmission of the pre-authentication identity is realized to prevent the pre-authentication identity from being leaked.
[0071] Embodiment 2
[0072] The pre-authentication identity can be encrypted and verified based on a shared key and a hash value to ensure the ciphertext transmission and integrity of the pre-authentication identity. Specifically, the security module 11 can further generate a unique hash value corresponding to the pre-authentication identity according to the pre-authentication identity after generating the pre-authentication identity according to the authentication request, and then encrypt the pre-authentication identity and the hash value using a shared key, and return the encrypted pre-authentication identity and the hash value to the privilege tool 20, which forwards them to the authentication server 30. The shared key is a key shared between the authentication server 30 and the security module 11. At this time, the authentication server 30 needs to first decrypt the encrypted pre-authentication identity and the hash value according to the shared key after receiving the encrypted pre-authentication identity and the hash value, and verify the legality of the pre-authentication identity using the hash value. Only after the pre-authentication identity passes the legality verification, the list of privileged resources 122 is added in the pre-authentication identity according to the authentication purpose. By using the shared key and the hash value, the pre-authentication identity is transmitted in ciphertext and verified for integrity to prevent the pre-authentication identity from being leaked, while ensuring the integrity and tamper-proofing of the pre-authentication identity and ensuring the trustworthiness of the pre-authentication identity.
[0073] Embodiment 3
[0074] The authentication identifier can be encrypted and verified based on the shared key and the hash value, to ensure the ciphertext transmission and integrity of the authentication identifier. Specifically, the authentication server 30 adds the list of privileged resources 122 to the pre-authentication identifier to obtain the authentication identifier, and then generates a unique corresponding hash value according to the authentication identifier, and then encrypts the authentication identifier and the hash value using the shared key, and returns the encrypted authentication identifier and the hash value to the privileged tool 20, which is forwarded to the security module 11. Similarly, the shared key is a key shared between the authentication server 30 and the security module 11. At this time, after the security module 11 receives the encrypted authentication identifier and the hash value, when verifying the legality of the authentication identifier, the security module 11 needs to decrypt the encrypted authentication identifier and the hash value according to the shared key, and verify the legality of the authentication identifier using the hash value. By using the shared key and the hash value, the ciphertext transmission and integrity verification of the authentication identifier are realized, which prevents the leakage of the authentication identifier, and also ensures the integrity and tamper resistance of the authentication identifier, and ensures the credibility of the authentication identifier.
[0075] Embodiment 4
[0076] The authentication identifier can be encrypted and verified based on the shared key and the hash value, to ensure the ciphertext transmission and integrity of the authentication identifier. Specifically, the authentication server 30 adds the list of privileged resources 122 to the pre-authentication identifier to obtain the authentication identifier, and then generates a unique corresponding hash value according to the authentication identifier, and then encrypts the authentication identifier and the hash value using the shared key, and returns the encrypted authentication identifier and the hash value to the privileged tool 20, which is forwarded to the security module 11. Similarly, the shared key is a key shared between the authentication server 30 and the security module 11. At this time, after the security module 11 receives the encrypted authentication identifier and the hash value, when verifying the legality of the authentication identifier, the security module 11 needs to decrypt the encrypted authentication identifier and the hash value according to the shared key, and verify the legality of the authentication identifier using the hash value. By using the shared key and the hash value, the ciphertext transmission and integrity verification of the authentication identifier are realized, which prevents the leakage of the authentication identifier, and also ensures the integrity and tamper resistance of the authentication identifier, and ensures the credibility of the authentication identifier. The pre-authentication identifier and the authentication identifier can be encrypted based on two pairs of asymmetric keys, one pair of asymmetric keys whose private key is held by the authentication server 30, and whose public key is held by the security module 11, and the other pair of asymmetric keys whose private key is held by the security module 11, and whose public key is held by the authentication server 30, to respectively encrypt the pre-authentication identifier and the authentication identifier. Specifically, the security module 11 generates the pre-authentication identifier according to the authentication request, and then adds the public key of the first asymmetric key to the pre-authentication identifier, and encrypts the pre-authentication identifier using the public key of the second asymmetric key, and then forwards the encrypted pre-authentication identifier to the authentication server 30 through the privileged tool 20. At this time, after the authentication server 30 receives the encrypted pre-authentication identifier, it first needs to decrypt the encrypted pre-authentication identifier according to the private key of the second asymmetric key to obtain the pre-authentication identifier. And the authentication server 30 generates the authentication identifier, and then encrypts the authentication identifier using the public key of the first asymmetric key, and forwards the encrypted authentication identifier to the security module 11 through the privileged tool 20. When the security module 11 receives the encrypted authentication identifier, it verifies the legality of the authentication identifier, and the security module 11 can verify the legality of the encrypted authentication identifier using the private key of the first asymmetric key. Specifically, the security module 11 decrypts the encrypted authentication identifier according to the private key of the first asymmetric key to obtain the authentication identifier, and completes the legality verification of the authentication identifier. By using two pairs of asymmetric keys, the pre-authentication identifier and the authentication identifier are respectively encrypted and decrypted, the ciphertext transmission of the pre-authentication identifier and the authentication identifier is realized, which prevents the leakage of the pre-authentication identifier and the authentication identifier, and also ensures the integrity and tamper resistance of the pre-authentication identifier and the authentication identifier, and ensures the credibility of the pre-authentication identifier and the authentication identifier.
[0077] It should be understood that the above only shows several ways to ensure the trusted transmission of the pre-authentication identifier and the authentication identifier, and in addition thereto, other ways can be adopted to implement the signing, encryption and other operations on the pre-authentication identifier and the authentication identifier, and then send the pre-authentication identifier and the authentication identifier out, so as to verify the signature or cipher text transmission by the other party, and ensure the trustworthiness of the pre-authentication identifier and the authentication identifier.
[0078] By the technical solution, after the security module 11 receives the authentication request sent by the privileged tool 20, the security module 11 generates a pre-authentication identifier, and the authentication server 30 adds a list of privileged resources 122 accessed by the privileged tool 20 in the pre-authentication identifier according to the authentication purpose, so as to limit the range of the privileged resources 122 that can be accessed by the privileged tool 20. The access control granularity of all the privileged resources 122 in the traditional mode can be reduced to a specific single privileged resource 122 by controlling the category and quantity of the privileged resources 122 in the list of privileged resources 122, and the access control granularity is greatly reduced. Then, the security module 11 marks each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that needs to be accessed by the security module 11, to form a marked list of privileged resources 122, so that the privileged tool 20 determines whether to directly access the corresponding privileged resource 122 or access the corresponding privileged resource 122 through the security module 11 according to the marked list of privileged resources 122. Compared with the traditional mode, the technical solution does not need to close the security policy module 121 and perform security unlocking. Some privileged resources 122 allow the privileged tool 20 to directly access, and some privileged resources 122 need to be accessed by the security module 11, that is, without performing security unlocking, the mechanism of "authentication + proxy + whitelist (list of privileged resources 122)" is used to achieve a finer-grained security access control of the processor privileged resources to a single privileged resource 122. When the privileged resource 122 is accessed through the security module 11, the debug channel between the privileged tool 20 and the privileged resource 122 does not need to be opened, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module 12 through the debug channel, and is beneficial to the protection of the internal architecture design of the intellectual property module 12. Through the whitelist authentication mechanism, the chip manufacturer sets the list of privileged resources 122 through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, can strictly control the authorization range, and can prevent the system from being shut down due to the direct operation of some sensitive privileged resources 122 in the intellectual property module 12 by the privileged tool 20. Through the above-mentioned scheme, the chip can be adapted to the actual application scene, different list ranges of privileged resources 122 can be set according to different functional test scenes in the process of functional test of the chip, finer-grained security access control can be performed, and the internal architecture design of the intellectual property module 12 can be better protected.
[0079] In addition, with reference to Figure 2 , Figure 3 and Figure 4 , the embodiment of the application further provides another security access method of a processor privileged resource, which is applied to the privileged tool 20. The security access method comprises the following steps.
[0080] sending an authentication request containing the identity information to the security module 11;
[0081] receiving the pre-authentication identifier returned by the security module 11;
[0082] sending the authentication purpose and the pre-authentication identifier to the authentication server 30;
[0083] receiving the authentication identifier returned by the authentication server 30 and sending the authentication identifier to the security module 11;
[0084] receiving the list of marked privileged resources 122 returned by the security module 11;
[0085] directly accessing the corresponding privileged resources 122 according to the list of marked privileged resources 122 or accessing the corresponding privileged resources 122 through the security module 11.
[0086] By making the privileged tool 20 determine whether to directly access the corresponding privileged resources 122 or access the corresponding privileged resources 122 through the security module 11 according to the list of marked privileged resources 122, compared with the traditional way, some privileged resources 122 in the technical solution allow the privileged tool 20 to directly access, and some privileged resources 122 need to be accessed through the security module 11, that is, without performing security unlocking, the mechanism of "authentication + proxy + whitelist" is used to achieve relatively fine-grained security access control of the processor privileged resources to a single privileged resource 122. When the privileged resources 122 are accessed through the security module 11, the debugging channel between the privileged tool 20 and the privileged resources 122 does not need to be opened, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module 12 through the debugging channel, and is conducive to the protection of the internal architecture design of the intellectual property module 12. Through the whitelist authentication mechanism, the chip manufacturer sets the list of privileged resources 122 through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, can strictly control the authorization range, and prevent the system from being shut down due to the direct operation of some sensitive privileged resources 122 in the intellectual property module 12 by the privileged tool 20.
[0087] In addition, with reference to Figure 2 Figure 3 and Figure 4 , the embodiment of the application further provides another security access method of a processor privileged resource, which is applied to the security module 11. The security access method comprises:
[0088] receiving an authentication request sent by the privileged tool 20;
[0089] According to the authentication request, a pre-authentication identifier is generated, and the pre-authentication identifier is returned to the privileged tool 20, wherein the pre-authentication identifier at least contains a processor 10 identifier uniquely identifying the processor 10;
[0090] The authentication identifier sent by the privileged tool 20 is received;
[0091] The legality of the authentication identifier is verified;
[0092] After the legality verification of the authentication identifier passes, according to each privileged resource 122 category in the privileged resource 122 list in the authentication identifier, each privileged resource 122 in the privileged resource 122 list is marked as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 proxy;
[0093] The marked privileged resource 122 list is returned to the privileged tool 20.
[0094] The above-mentioned manner, by making the security module 11 after receiving the authentication request sent by the privileged tool 20, generate a pre-authentication identifier, and by the authentication server 30 according to the authentication purpose, add the list of privileged resources 122 that the privileged tool 20 can access in the pre-authentication identifier, limit the range of privileged resources 122 that the privileged tool 20 can access, the granularity of the permission control can be reduced to a specific single privileged resource 122 by controlling the category and quantity of privileged resources 122 in the list of privileged resources 122, and the granularity of the permission control is greatly reduced. After that, the security module 11 marks each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that needs to be accessed by the security module 11, forming a marked list of privileged resources 122, so that the privileged tool 20 determines whether to directly access the corresponding privileged resource 122 or access the corresponding privileged resource 122 through the security module 11 according to the marked list of privileged resources. Compared with the traditional way, the technical solution does not need to close the security policy module 121 and perform security unlocking. Some privileged resources 122 allow the privileged tool 20 to directly access, and some privileged resources 122 need to be accessed by the security module 11, that is, without performing security unlocking, through the "authentication + proxy + whitelist" mechanism, the security access control of the processor privileged resource is realized to a single privileged resource 122. Among them, when accessing the privileged resource 122 through the security module 11, there is no need to open the debugging channel between the privileged tool 20 and the privileged resource 122, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module 12 through the debugging channel, and is conducive to the protection of the internal architecture design of the intellectual property module 12. Through the whitelist authentication mechanism, the list of privileged resources 122 is set by the chip manufacturer through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, and can strictly control the authorization range to prevent the system from crashing due to the privileged tool 20 directly operating some sensitive privileged resources 122 in the intellectual property module 12.
[0095] Among them, when the authentication server 30 uses the private key in the asymmetric key to sign the pre-authentication identifier after adding the list of privileged resources 122, the authentication identifier is obtained, and the reference Figure 5 , verifying the legality of the authentication identifier can include: after receiving the authentication identifier, using the public key in the asymmetric key to verify the legality of the authentication identifier. By embedding the signature and signature verification mechanism of the asymmetric key in the transmission process of the authentication identifier, the integrity and tamper resistance of the authentication identifier can be guaranteed.
[0096] In response to the authentication request, the pre-authentication identifier is generated, and the pre-authentication identifier is returned to the privileged tool 20. Specifically, the pre-authentication identifier can be encrypted using the public key in the asymmetric key to generate an encrypted pre-authentication identifier, and the encrypted pre-authentication identifier is returned to the privileged tool 20. By encrypting the pre-authentication identifier using the public key in the asymmetric key during transmission, and decrypting using the private key in the asymmetric key, the ciphertext transmission of the pre-authentication identifier is achieved, preventing the pre-authentication identifier from being leaked.
[0097] After generating the pre-authentication identifier in response to the authentication request, the secure access method can further include: generating a unique corresponding hash value according to the pre-authentication identifier; encrypting the pre-authentication identifier and the hash value using a shared key, and returning the encrypted pre-authentication identifier and hash value to the privileged tool 20, which is forwarded to the authentication server 30, wherein the shared key is a key shared between the authentication server 30 and the security module 11. By using the shared key and the hash value, the pre-authentication identifier is transmitted in ciphertext and integrity is checked, preventing the pre-authentication identifier from being leaked, while also ensuring the integrity and tamper resistance of the pre-authentication identifier, ensuring the authenticity of the pre-authentication identifier.
[0098] When the authentication server 30 generates a unique corresponding hash value according to the authentication identifier, encrypts the authentication identifier and the hash value using a shared key, and returns the encrypted authentication identifier and hash value to the privileged tool 20, the verification of the legality of the authentication identifier can further include: after receiving the encrypted authentication identifier and hash value, the encrypted authentication identifier and hash value are also decrypted according to the shared key, and the legality of the authentication identifier is verified using the hash value, wherein the shared key is a key shared between the authentication server 30 and the security module 11. By using the shared key and the hash value, the authentication identifier is transmitted in ciphertext and integrity is checked, preventing the authentication identifier from being leaked, while also ensuring the integrity and tamper resistance of the authentication identifier, ensuring the authenticity of the authentication identifier.
[0099] The secure access method can further comprise, after generating the pre-authentication identifier, adding a public key in the first asymmetric key in the pre-authentication identifier, encrypting the pre-authentication identifier using a public key in the second asymmetric key, and sending the encrypted pre-authentication identifier to the privileged tool 20. When the authentication server 30 encrypts the authentication identifier using the public key in the first asymmetric key, verifying the legitimacy of the authentication identifier can comprise, after receiving the encrypted authentication identifier, verifying the legitimacy of the encrypted authentication identifier using a private key in the first asymmetric key. By using two pairs of asymmetric keys to encrypt and decrypt the pre-authentication identifier and the authentication identifier respectively, the ciphertext transmission of the pre-authentication identifier and the authentication identifier is realized, preventing the leakage of the pre-authentication identifier and the authentication identifier, while also ensuring the integrity and tamper resistance of the pre-authentication identifier and the authentication identifier, and ensuring the trustworthiness of the pre-authentication identifier and the authentication identifier.
[0100] Furthermore, with reference to Figure 5 , the pre-authentication identifier can also contain a time identifier. The pre-authentication identifier can also be added with an authorized validity period for the privileged tool 20 to access the privileged resources 122 listed in the privileged resource 122 list. After receiving the authentication identifier, the secure access method can further comprise verifying whether the processor 10 identifier in the authentication identifier is the same as the processor 10 identifier in the pre-authentication identifier, and confirming whether the current time is within the authorized validity period; when the processor 10 identifier in the authentication identifier is the same as the processor 10 identifier in the pre-authentication identifier, and the current time is within the authorized validity period, marking each privileged resource 122 in the privileged resource 122 list as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to each privileged resource 122 category in the privileged resource 122 list. By adding the authorized validity period, the security module 11 verifies the processor 10 identifier and whether the current time is within the validity period before marking the privileged resource 122 list, filtering out inconsistent information in advance, ensuring that the marking is performed under correct information, and also explicitly specifying the authorized validity period for each privileged resource 122 list, further improving the secure access control of the privileged tool 20 to the privileged resources 122.
[0101] In addition, the intellectual property module 12, which has a number of privileged resources 122 built-in, can also have a security policy module 121 built-in. While marking each privileged resource 122 in the privileged resource 122 list as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to each privileged resource 122 category in the privileged resource 122 list, the secure access method can further comprise configuring the security policy module 121 corresponding to the intellectual property module 12 respectively, so as to control the privileged tool 20 to directly access a certain privileged resource 122 or to access a certain privileged resource 122 through the security module 11.
[0102] Further, the embodiment of the present application also provides another security access method of processor privileged resources, referring to Figure 3 and Figure 4 The security access method is applied to the authentication server 30. The security access method comprises:
[0103] receiving the authentication purpose and the pre-authentication identifier sent by the privileged tool 20;
[0104] adding the list of privileged resources 122 accessed by the authorized privileged tool 20 in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier;
[0105] returning the authentication identifier to the privileged tool 20.
[0106] In the above-mentioned embodiment, the authentication server 30 adds the list of privileged resources 122 accessed by the authorized privileged tool 20 in the pre-authentication identifier according to the authentication purpose, to limit the range of the privileged resources 122 that can be accessed by the privileged tool 20. The range of the authorization granularity can be reduced to a specific single privileged resource 122 from the zero or all authorization granularity in the traditional way, which can access all the privileged resources 122 or cannot access all the privileged resources 122, by controlling the category and quantity of the privileged resources 122 in the list of the privileged resources 122. The authorization granularity is greatly reduced. Through the white list authentication mechanism, the chip manufacturer sets the list of privileged resources 122 through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, strictly control the authorization range, and prevent the system from crashing due to the direct operation of some sensitive privileged resources 122 in the intellectual property module 12 by the privileged tool 20. Through the above-mentioned scheme, the security access control of different privileged resource 122 list ranges can be adapted to the actual application scene, and the internal architecture design of the intellectual property module 12 can be better protected during the functional test of the chip according to different functional test scenes.
[0107] Among them, referring to Figure 5 , when the list of privileged resources 122 accessed by the authorized privileged tool 20 is added in the pre-authentication identifier according to the authentication purpose, the list of privileged resources 122 accessed by the authorized privileged tool 20 can be added in the pre-authentication identifier according to the authentication purpose, and the pre-authentication identifier after adding the list of privileged resources 122 is signed using the private key in the asymmetric key to obtain the authentication identifier. Through the embedding of the signature and verification mechanism of the asymmetric key in the transmission process of the authentication identifier, the integrity and tamper resistance of the authentication identifier can be ensured.
[0108] The security module 11 encrypts the pre-authentication identifier using a public key in the asymmetric key pair, and when the encrypted pre-authentication identifier is generated, the security access method can further include: after receiving the encrypted pre-authentication identifier, decrypting the encrypted pre-authentication identifier using a private key in the asymmetric key pair to obtain the pre-authentication identifier. By encrypting the pre-authentication identifier using the public key in the asymmetric key pair during transmission of the pre-authentication identifier and decrypting the pre-authentication identifier using the private key in the asymmetric key pair, ciphertext transmission of the pre-authentication identifier is achieved, and leakage of the pre-authentication identifier is prevented.
[0109] When the security module 11 generates a unique corresponding hash value according to the pre-authentication identifier, encrypts the pre-authentication identifier and the hash value using a shared key, and returns the encrypted pre-authentication identifier and hash value to the privileged tool 20, the security access method can further include: after receiving the encrypted pre-authentication identifier and hash value, decrypting the pre-authentication identifier and hash value according to the shared key, and verifying the legality of the pre-authentication identifier using the hash value; wherein the shared key is a key shared between the authentication server 30 and the security module 11; after the pre-authentication identifier passes the legality check, adding a list of privileged resources 122 in the pre-authentication identifier according to the authentication purpose. By using the shared key and the hash value, the pre-authentication identifier is transmitted in ciphertext and integrity is checked, preventing leakage of the pre-authentication identifier, while also ensuring the integrity and tamper resistance of the pre-authentication identifier, and ensuring the trustworthiness of the pre-authentication identifier.
[0110] After obtaining the authentication identifier, the security access method can further include: generating a unique corresponding hash value according to the authentication identifier; encrypting the authentication identifier and the hash value using a shared key, and returning the encrypted authentication identifier and hash value to the privileged tool 20; wherein the shared key is a key shared between the authentication server 30 and the security module 11. By using the shared key and the hash value, the authentication identifier is transmitted in ciphertext and integrity is checked, preventing leakage of the authentication identifier, while also ensuring the integrity and tamper resistance of the authentication identifier, and ensuring the trustworthiness of the authentication identifier.
[0111] When the security module 11 adds the public key in the first asymmetric key in the pre-authentication identity, encrypts the pre-authentication identity using the public key in the second asymmetric key, and forwards the encrypted pre-authentication identity to the authentication server 30 through the privileged tool 20, the security access method can further include: after receiving the encrypted pre-authentication identity, decrypting the encrypted pre-authentication identity according to the private key in the second asymmetric key to obtain the pre-authentication identity; and after generating the authentication identity, encrypting the authentication identity using the public key in the first asymmetric key and sending the encrypted authentication identity to the privileged tool 20. By using two pairs of asymmetric keys to encrypt and decrypt the pre-authentication identity and the authentication identity respectively, the ciphertext transmission of the pre-authentication identity and the authentication identity is realized, the pre-authentication identity and the authentication identity are prevented from being leaked, the integrity and tamper resistance of the pre-authentication identity and the authentication identity are ensured, and the credibility of the pre-authentication identity and the authentication identity is ensured.
[0112] Reference Figure 5 The pre-authentication identity can further include a time identifier. When the authentication server 30 adds the list of privileged resources 122 accessed by the privileged tool 20 in the pre-authentication identity, the authentication server 30 can also add an authorized validity period of the privileged tool 20 accessing the privileged resources 122 listed in the list of privileged resources 122. By adding the authorized validity period, the security module 11 verifies whether the processor 10 identifier and the current time are within the validity period before marking the list of privileged resources 122, filters out inconsistent information in advance, ensures that the marking is performed under correct information, and also clearly defines the authorized validity period of each list of privileged resources 122, further improving the security access control of the privileged tool 20 to the privileged resources 122.
[0113] In addition, the present application also provides a processor privileged resource security access system, referring to Figure 2 , Figure 3 and Figure 4The security access system comprises a processor 10, a security module 11 and a plurality of intellectual property modules 12 built in the processor 10, each of at least part of the intellectual property modules 12 is built with a plurality of privileged resources 122. The security access system further comprises a privileged tool 20 and an authentication server 30. The privileged tool 20 is configured to send an authentication request containing its identity information to the security module 11. The security module 11 is configured to generate a pre-authentication identifier according to the authentication request, and return the pre-authentication identifier to the privileged tool 20. The privileged tool 20 is configured to send the authentication purpose and the pre-authentication identifier to the authentication server 30. The pre-authentication identifier at least contains a processor 10 identifier uniquely identifying the processor 10. The authentication server 30 is configured to add a list of privileged resources 122 that the privileged tool 20 is authorized to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier, and return the authentication identifier to the privileged tool 20. The privileged tool 20 is configured to forward the authentication identifier to the security module 11. The security module 11 is further configured to verify the legality of the authentication identifier. After the legality of the authentication identifier is verified, the security module 11 is further configured to mark each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that is accessed by the security module 11 according to the type of each privileged resource 122 in the list of privileged resources 122, and return the marked list of privileged resources 122 to the privileged tool 20. The privileged tool 20 is further configured to directly access the corresponding privileged resource 122 according to the marked list of privileged resources 122, or access the corresponding privileged resource 122 through the security module 11.
[0114] In the above scheme, the security module 11 generates a pre-authentication identifier after receiving the authentication request sent by the privileged tool 20, and the authentication server 30 adds a list of privileged resources 122 that the privileged tool 20 is authorized to access in the pre-authentication identifier according to the authentication purpose, limiting the range of privileged resources 122 that the privileged tool 20 can access. By controlling the category and quantity of privileged resources 122 in the list of privileged resources 122, the granularity of the permission control in the traditional way, which can access all privileged resources 122 or cannot access all privileged resources 122, can be reduced to a specific single privileged resource 122, greatly reducing the granularity of the permission control. Then the security module 11 marks each privileged resource 122 in the list of privileged resources 122 as a privileged resource 122 that can be directly accessed or a privileged resource 122 that needs to be accessed by the security module 11, forming a marked list of privileged resources 122, so that the privileged tool 20 determines whether to directly access the corresponding privileged resource 122 or access the corresponding privileged resource 122 through the security module 11 according to the marked list of privileged resources 122. Compared with the traditional way, the technical scheme does not need to close the security policy module 121 and perform security unlocking. Some privileged resources 122 allow the privileged tool 20 to directly access, and some privileged resources 122 need to be accessed by the security module 11, that is, without performing security unlocking, through the mechanism of "authentication + proxy + whitelist", the security access control of the processor privileged resource is realized to a single privileged resource 122. Among them, when accessing the privileged resource 122 through the security module 11, there is no need to open the debugging channel between the privileged tool 20 and the privileged resource 122, which can effectively prevent reverse analysis of the internal architecture design of the intellectual property module 12 through the debugging channel, and is conducive to the protection of the internal architecture design of the intellectual property module 12. Through the whitelist authentication mechanism, the chip manufacturer sets the list of privileged resources 122 through the controlled authentication server 30, which can effectively reduce the authorization granularity range from the entire intellectual property module 12 to a specific single privileged resource 122, strictly control the authorization range, and prevent the system from crashing due to the privileged tool 20 directly operating some sensitive privileged resources 122 in the intellectual property module 12. Through the above-mentioned scheme, it can be adapted to the actual application scene. In the process of testing the chip, different list ranges of privileged resources 122 are set according to different functional test scenes, and more fine-grained security access control is performed to better protect the internal architecture design of the intellectual property module 12.
[0115] The workflow of each module is described in the foregoing description of the security access method of the processor privileged resource, which will not be repeated here.
[0116] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of secure access to processor-privileged resources, wherein, The processor is built-in with a security module and a plurality of intellectual property modules, at least part of the intellectual property modules are built-in with a plurality of privileged resources, and the security access method comprises: The privileged tool sends an authentication request containing its identity information to the security module; The security module generates a pre-authentication identifier according to the authentication request, and returns the pre-authentication identifier to the privileged tool; the pre-authentication identifier at least contains a processor identifier uniquely identifying the processor; The privileged tool sends an authentication purpose and the pre-authentication identifier to an authentication server; The authentication server adds a privileged resource list authorized to be accessed by the privileged tool in the pre-authentication identifier according to the authentication purpose, obtains an authentication identifier, and returns the authentication identifier to the privileged tool; The privileged tool sends the authentication identifier to the security module; The security module verifies the legality of the authentication identifier; after the legality verification of the authentication identifier is passed, according to each privileged resource category in the privileged resource list, each privileged resource in the privileged resource list is marked as a privileged resource capable of being directly accessed or a privileged resource accessed by the security module in proxy, and the marked privileged resource list is returned to the privileged tool; The privileged tool directly accesses the corresponding privileged resource or accesses the corresponding privileged resource through the security module according to the marked privileged resource list.
2. The secure access method of claim 1, wherein, The authentication server adds a privileged resource list authorized to be accessed by the privileged tool in the pre-authentication identifier according to the authentication purpose to obtain an authentication identifier, which comprises: the authentication server adds a privileged resource list authorized to be accessed by the privileged tool in the pre-authentication identifier according to the authentication purpose, and uses a private key in an asymmetric key to sign the pre-authentication identifier after adding the privileged resource list to obtain the authentication identifier; The security module verifies the legality of the authentication identifier, which comprises: after receiving the authentication identifier, the security module uses a public key in the asymmetric key pair to verify the legality of the authentication identifier.
3. The secure access method of claim 2, wherein, The security module generates a pre-authentication identifier according to the authentication request, which further comprises: using a public key in the asymmetric key to encrypt the pre-authentication identifier to generate an encrypted pre-authentication identifier; After receiving the encrypted pre-authentication identifier, the authentication server uses a private key in the asymmetric key to decrypt the encrypted pre-authentication identifier to obtain the pre-authentication identifier.
4. The secure access method of claim 1, wherein, After the security module generates a pre-authentication identifier according to the authentication request, it further generates a unique corresponding hash value according to the pre-authentication identifier, encrypts the pre-authentication identifier and the hash value using a shared key, and returns the encrypted pre-authentication identifier and hash value to the privileged tool, which is forwarded to the authentication server by the privileged tool; wherein the shared key is a key shared between the authentication server and the security module; The authentication server, after receiving the encrypted pre-authentication identifier and hash value, further decrypts the encrypted pre-authentication identifier and hash value according to the shared key, and verifies the legality of the pre-authentication identifier using the hash value; after the pre-authentication identifier passes the legality verification, the authentication server adds the list of privileged resources in the pre-authentication identifier according to the authentication purpose.
5. The secure access method of claim 1, wherein, The authentication server, after adding the list of privileged resources in the pre-authentication identifier to obtain the authentication identifier, further generates a hash value corresponding uniquely to the authentication identifier, encrypts the authentication identifier and the hash value using the shared key, and returns the encrypted authentication identifier and hash value to the privileged tool, which forwards them to the security module; wherein the shared key is a key shared between the authentication server and the security module. The security module verifying the legality of the authentication identifier includes: after receiving the encrypted authentication identifier and hash value, the security module decrypts the encrypted authentication identifier and hash value according to the shared key, and verifies the legality of the authentication identifier using the hash value.
6. The secure access method of claim 1, wherein, The security module, after generating a pre-authentication identifier according to the authentication request, adds a public key in the first asymmetric key in the pre-authentication identifier, encrypts the pre-authentication identifier using a public key in the second asymmetric key, and forwards the encrypted pre-authentication identifier to the authentication server through the privileged tool; The authentication server, after receiving the encrypted pre-authentication identifier, further decrypts the encrypted pre-authentication identifier using a private key in the second asymmetric key to obtain the pre-authentication identifier; the authentication server, after generating the authentication identifier, further encrypts the authentication identifier using a public key in the first asymmetric key, and forwards the encrypted authentication identifier to the security module through the privileged tool; The security module verifying the legality of the authentication identifier includes: after receiving the encrypted authentication identifier, the security module verifies the legality of the encrypted authentication identifier using a private key in the first asymmetric key.
7. The secure access method of claim 1, wherein, The pre-authentication identifier further contains a time identifier; the authentication server further adds an authorization validity period in the pre-authentication identifier according to the pre-authentication identifier, which authorizes the privileged tool to access the privileged resources listed in the list of privileged resources; The security module, after receiving the authentication identifier, further verifies whether the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and confirms whether the current time is within the authorization validity period; The security module, when the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier and the current time is within the authorization validity period, marks each privileged resource in the list of privileged resources as a privileged resource that can be directly accessed or a privileged resource that is accessed by the security module.
8. The secure access method of claim 1, wherein, The intellectual property module with the built-in several privileged resources further has a security policy module built-in; The security module marks each privileged resource in the privileged resource list as a directly accessible privileged resource or a privileged resource accessed by the security module proxy according to each privileged resource category in the privileged resource list, and configures a security policy module of a corresponding intellectual property module respectively.
9. The secure access method of claim 1, wherein, The privileged resource is a debug register, a performance detection register, a special function register, or an initialization operation module of the intellectual property module.
10. A method of secure access to processor privileged resources, applied to a privileged tool, wherein, The processor is internally provided with a security module and a plurality of intellectual property modules, and at least part of the intellectual property modules are internally provided with a plurality of privileged resources, and the security access method comprises: sending an authentication request containing identity information to the security module; receiving a pre-authentication identifier returned by the security module; sending the authentication purpose and the pre-authentication identifier to the authentication server; receiving an authentication identifier returned by the authentication server and sending the authentication identifier to the security module; receiving a marked privileged resource list returned by the security module; directly accessing the corresponding privileged resource or accessing the corresponding privileged resource through the security module proxy according to the marked privileged resource list.
11. A method of secure access to processor-privileged resources, applied to a secure module, wherein, The processor is internally provided with a security module and a plurality of intellectual property modules, and at least part of the intellectual property modules are internally provided with a plurality of privileged resources, and the security access method comprises: receiving an authentication request containing identity information sent by a privileged tool; generating a pre-authentication identifier according to the authentication request and returning the pre-authentication identifier to the privileged tool, so that the privileged tool sends the authentication purpose and the pre-authentication identifier to the authentication server and receives an authentication identifier returned by the authentication server; wherein the pre-authentication identifier at least contains a processor identifier for uniquely identifying the processor; receiving an authentication identifier sent by the privileged tool; verifying the legality of the authentication identifier; after the legality verification of the authentication identifier is passed, marking each privileged resource in the privileged resource list as a directly accessible privileged resource or a privileged resource accessed by the security module proxy according to each privileged resource category of the privileged resource list; returning a marked privileged resource list to the privileged tool, so that the privileged tool directly accesses the corresponding privileged resource or accesses the corresponding privileged resource through the security module proxy according to the marked privileged resource list.
12. The secure access method of claim 11, wherein, When the authentication server uses a private key in an asymmetric key to sign a pre-authentication identifier after adding a privileged resource list, to obtain the authentication identifier, the verification of the legality of the authentication identifier comprises: after receiving the authentication identifier, using a public key in the asymmetric key pair to verify the legality of the authentication identifier.
13. The secure access method of claim 12, wherein, The generation of the pre-authentication identifier according to the authentication request and the return of the pre-authentication identifier to the privileged tool comprise: using a public key in the asymmetric key to encrypt the pre-authentication identifier to generate an encrypted pre-authentication identifier, and returning the encrypted pre-authentication identifier to the privileged tool.
14. The secure access method of claim 11, wherein, After the pre-authentication identifier is generated according to the authentication request, the secure access method further comprises: generating a unique corresponding hash value according to the pre-authentication identifier; encrypting the pre-authentication identifier and the hash value using a shared key, and returning the encrypted pre-authentication identifier and hash value to the privileged tool, which is forwarded to the authentication server; wherein the shared key is a key shared between the authentication server and the secure module.
15. The secure access method of claim 11, when the authentication server generates a unique corresponding hash value according to the authentication identifier, encrypts the authentication identifier and the hash value using a shared key, and returns the encrypted authentication identifier and hash value to the privileged tool, the verifying the legality of the authentication identifier comprises: After receiving the encrypted authentication identifier and hash value, the encrypted authentication identifier and hash value are also decrypted according to the shared key, and the legality of the authentication identifier is verified using the hash value; wherein the shared key is a key shared between the authentication server and the secure module.
16. The secure access method of claim 11, wherein, The secure access method further comprises: After generating the pre-authentication identifier, the public key in the first asymmetric key is added to the pre-authentication identifier, the pre-authentication identifier is encrypted using the public key in the second asymmetric key, and the encrypted pre-authentication identifier is sent to the privileged tool; When the authentication server encrypts the authentication identifier using the public key in the first asymmetric key, the verifying the legality of the authentication identifier comprises: after receiving the encrypted authentication identifier, verifying the legality of the encrypted authentication identifier using the private key in the first asymmetric key.
17. The secure access method of claim 11, wherein, The pre-authentication identifier also contains a time identifier; the pre-authentication identifier also adds an authorized effective period for authorizing the privileged tool to access the privileged resources listed in the privileged resource list; After receiving the authentication identifier, the secure access method further comprises: verifying whether the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and confirming whether the current time is within the authorized effective period; When the processor identifier in the authentication identifier is the same as the processor identifier in the pre-authentication identifier, and the current time is within the authorized effective period, according to each privileged resource category in the privileged resource list, each privileged resource in the privileged resource list is marked as a privileged resource that can be directly accessed or a privileged resource that is accessed by the secure module.
18. The secure access method of claim 11, wherein, The intellectual property module with the built-in several privileged resources also has a security policy module built-in; While according to each privileged resource category in the privileged resource list, each privileged resource in the privileged resource list is marked as a privileged resource that can be directly accessed or a privileged resource that is accessed by the secure module, the secure access method further comprises: respectively configuring the security policy module corresponding to the intellectual property module.
19. A method of secure access to processor-privileged resources, applied to an authentication server, wherein, The processor has a secure module and several intellectual property modules built-in, and at least part of the intellectual property modules have several privileged resources built-in, and the secure access method comprises: receiving an authentication purpose and a pre-authentication identifier sent by a privileged tool, the pre-authentication identifier being received from the security module after the privileged tool sends an authentication request containing its identity information to the security module; adding a list of privileged resources authorized for the privileged tool to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier; returning the authentication identifier to the privileged tool, so that the privileged tool sends the authentication identifier to the security module and receives a marked list of privileged resources returned by the security module, and directly accesses corresponding privileged resources according to the marked list of privileged resources, or accesses corresponding privileged resources through the security module.
20. The secure access method of claim 19, wherein, The adding a list of privileged resources authorized for the privileged tool to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier comprises: adding a list of privileged resources authorized for the privileged tool to access in the pre-authentication identifier according to the authentication purpose, and signing the pre-authentication identifier after adding the list of privileged resources using a private key in an asymmetric key pair, to obtain the authentication identifier.
21. The secure access method of claim 19, wherein, The pre-authentication identifier further contains a time identifier; The adding a list of privileged resources authorized for the privileged tool to access in the pre-authentication identifier also adds an authorized validity period for the privileged tool to access privileged resources listed in the list of privileged resources.
22. A secure access system for processor-privileged resources, characterized by Comprise: a processor; a security module and a plurality of intellectual property modules built in the processor, wherein each of at least part of the intellectual property modules is built with a plurality of privileged resources; a privileged tool for sending an authentication request containing its identity information to the security module; an authentication server; The security module is configured to generate a pre-authentication identifier according to the authentication request, and return the pre-authentication identifier to the privileged tool, so that the privileged tool sends an authentication purpose and the pre-authentication identifier to the authentication server; the pre-authentication identifier at least contains a processor identifier for uniquely identifying the processor; The authentication server is configured to add a list of privileged resources authorized for the privileged tool to access in the pre-authentication identifier according to the authentication purpose, to obtain an authentication identifier, and return the authentication identifier to the privileged tool for forwarding to the security module; The security module is further configured to verify the legality of the authentication identifier; after the legality verification of the authentication identifier passes, the security module further marks each privileged resource in the list of privileged resources as a privileged resource capable of being directly accessed or a privileged resource capable of being accessed by the security module proxy according to each type of privileged resource in the list of privileged resources, and returns a marked list of privileged resources to the privileged tool; The privileged tool is further configured to directly access corresponding privileged resources according to the marked list of privileged resources, or access corresponding privileged resources through the security module proxy.
Citation Information
Patent Citations
Security access control method, device and equipment based on terminal access behavior
CN114244568A