Remote debugging method, remote debugging system, debugging mainboard, electronic device, and computer storage medium
Patent Information
- Application Number
- CN202510489104.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2026-10-23
AI Technical Summary
面对调试的安全问题,业界基本采用量产后关闭调试功能,出问题后寄回原厂通过刷新固件打开调试,然而,这种调试方案的灵活性较差
[0011]在本公开实施例的方案中,调试主板中的主板控制器有利于实现待调试设备中的调试模块与调试装置之间的转发,减少了对调试装置的配置要求,能够接收调试装置的调试指令来对执行环境进行远程调试,提高了调试的灵活性。此外,主板控制器还能够实现鉴权服务器与鉴权模块之间的转发,通过加密验证过程和签名验证过程,在通过调试模块对执行环境进行远程调试之前对调试装置进行可靠地鉴权。
Smart Images

Figure CN122969791A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a remote debugging method, a remote debugging system, a debugging motherboard, an electronic device, and a computer storage medium. Background Technology
[0002] With the rapid development of information technology, cloud services have been widely applied in various fields. Cloud services involve the storage, transmission, and processing of massive amounts of data, including various types of sensitive data. Data security in cloud services faces numerous challenges. During data transmission, strong encryption technologies are required to prevent data theft or tampering. Simultaneously, strict management of data access control is essential to ensure that only authorized users can access specific data.
[0003] Privacy-preserving computing, as a cloud computing technology, isolates sensitive data in a secure area by building a Trusted Execution Environment (TEE), ensuring data security during data processing. A RISC-V TEE (Trusted Execution Environment based on RISC-V) is a trusted execution environment based on the RISC-V architecture. Through software virtualization, the execution environment can be divided into multiple execution domains, each running software systems with different security levels.
[0004] Debugging functionality is indispensable in all stages of equipment development, production, and online maintenance, facilitating faster fault analysis. Regarding safety concerns during debugging, the industry generally adopts a method of disabling debugging after mass production, then sending the device back to the manufacturer to re-enable debugging by updating the firmware if a problem occurs. However, this debugging solution lacks flexibility. Summary of the Invention
[0005] In view of the above, embodiments of this disclosure provide a remote debugging method, a remote debugging system, a debugging motherboard, an electronic device, and a computer storage medium to solve the above problems.
[0006] According to a first aspect of the present disclosure, a remote debugging method is provided, applied to a debugging motherboard. The debugging motherboard includes a motherboard controller and a device to be debugged. The device to be debugged includes a debugging module and an authentication module. The remote debugging method includes: the motherboard controller responding to a remote debugging request for the debugging module by sending an authentication request to the authentication module, wherein the motherboard controller is used to debug the execution environment in the debugging state of the debugging module; the authentication module responding to the authentication request by performing encrypted verification with an authentication server via the motherboard controller; the authentication module performing signature verification on the encrypted verification result via the motherboard controller and the authentication server; and the authentication module controlling the debugging module to enter the debugging state after the signature verification is successful.
[0007] According to a second aspect of this disclosure, a debugging motherboard is provided, including a motherboard controller and a device to be debugged. The device to be debugged includes a debugging module and an authentication module. The motherboard controller, in response to a remote debugging request for the debugging module, sends an authentication request to the authentication module. The motherboard controller is used to debug the execution environment while the debugging module is in a debugging state. The authentication module, in response to the authentication request, performs encrypted verification with an authentication server via the motherboard controller, and performs signature verification on the encrypted verification result via the motherboard controller and the authentication server. Upon successful signature verification, the module controls the debugging module to enter the debugging state.
[0008] According to a third aspect of the present disclosure, a remote debugging system is provided, including: a debugging motherboard as described in the second aspect, and a debugging device.
[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, the executable instruction causing the processor to perform operations of a device under test or a motherboard controller as described in the second aspect.
[0010] According to a fifth aspect of the present disclosure, a computer storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.
[0011] In the embodiments of this disclosure, the motherboard controller in the debugging motherboard facilitates the forwarding between the debugging module and the debugging device in the device under test, reduces the configuration requirements for the debugging device, and can receive debugging instructions from the debugging device to remotely debug the execution environment, thus improving the flexibility of debugging. Furthermore, the motherboard controller can also facilitate the forwarding between the authentication server and the authentication module, and reliably authenticate the debugging device before remotely debugging the execution environment through the debugging module via encrypted verification and signature verification processes. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.
[0013] Figure 1 A schematic block diagram of a remote debugging system applicable to some embodiments of this disclosure.
[0014] Figure 2 This is a flowchart illustrating the steps of a remote debugging method according to some embodiments of this disclosure.
[0015] Figure 3 for Figure 1 A schematic block diagram of a further example of a remote debugging system.
[0016] Figure 4 for Figure 2 A flowchart illustrating the steps of a remote debugging method as exemplified in some embodiments.
[0017] Figure 5 This is a schematic block diagram of a debugging motherboard according to another embodiment of the present disclosure.
[0018] Figure 6 This is a schematic diagram of the structure of an electronic device according to some other embodiments of the present disclosure. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions in the embodiments of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art should fall within the protection scope of this disclosure.
[0020] The specific implementation of the embodiments of this disclosure will be further described below with reference to the accompanying drawings.
[0021] Figure 1 A remote debugging system 100 to which some embodiments of this disclosure are applicable is shown. Figure 1 The remote debugging system 100 includes a debugging motherboard 150 with a motherboard controller 10 and a device to be debugged 20, a debugging device 40, and an authentication server 30. The remote debugging system 100, as a complete debugging architecture, covers key components in the debugging process. The debugging motherboard 150 is the core of the system, integrating the motherboard controller 10 and the device to be debugged 20. The motherboard controller 10 coordinates and controls the debugging process. It can respond to remote debugging requests initiated by the debugging device 40 and can also monitor and debug execution environments such as trusted execution environments during remote debugging, ensuring the smooth progress of the debugging operation. The device to be debugged 20, as the object to be debugged, enters the debugging state under the control of the motherboard controller 10, allowing debugging personnel to perform detailed testing and optimization through the debugging device 40. The debugging device 40, as an external debugging tool or device, sends debugging requests to the motherboard controller 10 and interacts with it during the debugging process to obtain debugging data and feedback information. The authentication server 30 is used to authenticate and verify debugging requests. By working with the motherboard controller 10 and the authentication module, it ensures that only authorized debugging requests are allowed to be executed, thereby ensuring the security of the system.
[0022] Figure 2 A remote debugging method 200 according to some embodiments of this disclosure is illustrated. The remote debugging method 200 can be applied to, for example... Figure 1 The debugging motherboard 150 shown may include a motherboard controller 10 and a device to be debugged 20.
[0023] The device to be debugged 20 includes a debugging module and an authentication module. Specifically, the remote debugging method 200 includes:
[0024] S210: The motherboard controller responds to the remote debugging request for the debugging module and sends an authentication request to the authentication module. The motherboard controller is used to debug the execution environment in the debugging state of the debugging module.
[0025] It should be understood that remote debugging requests can originate from external debugging devices or software, serving as examples of debugging apparatuses. These requests may include information about the debugging module, the domain identifier of the execution domain, and user permission information required for debugging, such as user permission levels. When the motherboard controller receives a remote debugging request, it responds by sending an authentication request to the authentication module to complete remote debugging authentication. Furthermore, the authentication request may contain information related to the debugging request, allowing the authentication module to perform subsequent authentication verification operations based on this information. Additionally, the execution environment in the device being debugged can be a trusted execution environment, including at least one execution domain with different permission or security levels based on the processor core configuration. The motherboard controller has the capability to control the data flow and stability of the execution environment when the debugging module is in debugging mode. In other words, the motherboard controller cannot access the execution environment through the debugging module when it is not in debugging mode.
[0026] S220: The authentication module responds to the authentication request and performs encrypted verification with the authentication server via the motherboard controller.
[0027] It should be understood that after receiving an authentication request from the motherboard controller, the authentication module can initiate a remote debugging authentication process, which may include an encrypted verification process. Before the encrypted verification process, the authentication module may first perform a preliminary check on the information in the authentication request, such as whether the authentication format is valid and whether the information in the authentication request is complete. Then, the authentication module establishes a communication connection with the authentication server via the motherboard controller and sends the key information to the authentication server as an encrypted message. The encryption algorithm can be a common symmetric or asymmetric encryption algorithm, such as AES or RSA. After receiving the encrypted message, the authentication server uses the corresponding key to decrypt the encrypted message to obtain the key information.
[0028] S230: The authentication module performs signature verification on the encrypted verification result through the motherboard controller and the authentication server.
[0029] It should be understood that after the authentication server completes the decryption operation, it will further verify key information, such as checking the user's identity information and user permission information in the remote debugging request. Then, it will generate a signature for the key information and send the signature result back to the authentication module to perform the signature verification process following the encryption verification. Furthermore, after receiving the signature result, the authentication module will use a pre-agreed signature algorithm and the authentication server's public key to verify the signature result. If the verification passes, it indicates that the encryption verification result is legitimate and correct, and has not been tampered with during transmission; if the verification fails, it indicates that the encryption verification result may have a problem, such as being forged or tampered with.
[0030] S240: After the signature verification is successful, the authentication module controls the debugging module to enter the debugging state.
[0031] It should be understood that after the authentication module verifies the signature result, remote debugging authentication can be considered successful, and debugging of the execution environment can then be performed via the debugging module. Upon successful remote debugging authentication, the authentication module can send instructions to the debugging module to switch it from a non-debugging state to a debugging state. For example, this could involve changing the configuration of the debugging module's internal parameters or the open state of its interfaces, enabling the debugging device to establish a connection with the debugging module through the motherboard controller and perform remote debugging, such as code debugging, performance testing, and functional verification within the execution environment.
[0032] In the embodiments of this disclosure, the motherboard controller in the debugging motherboard facilitates the forwarding between the debugging module and the debugging device in the device under test, reduces the configuration requirements for the debugging device, and can receive debugging instructions from the debugging device to remotely debug the execution environment, thus improving the flexibility of debugging. Furthermore, the motherboard controller can also facilitate the forwarding between the authentication server and the authentication module, and reliably authenticate the debugging device before remotely debugging the execution environment through the debugging module via encrypted verification and signature verification processes.
[0033] In some embodiments, such as Figure 3 As shown, remote debugging is performed after remote debugging authentication is successful. The remote debugging authentication process is completed through communication and interaction between the debugging device 40, the debugging motherboard 150, and the authentication server 30. The debugging motherboard 150 includes a motherboard controller 10 and a device to be debugged 20. The device to be debugged 20 includes a debugging module 210, an authentication module 220, and an execution environment 230. For example, the remote debugging authentication process may include an encryption verification process and a signature verification process, implemented by the authentication logic in the authentication module 220. The authentication logic can also maintain a verification management table, including an encryption verification management table and a signature verification management table, and execute calculation processes related to encryption or signature by querying the verification management table.
[0034] Furthermore, the verification management table indicates the correspondence between each execution domain and each public key. For example, each entry in the verification management table indicates the correspondence between the domain identifier of each execution domain (e.g., execution domain #0, execution domain #1, ..., execution domain #n) and each public key. That is, each entry in the encryption verification management table indicates the correspondence between the domain identifier of each execution domain and the corresponding first public key; each entry in the signature verification management table indicates the correspondence between the domain identifier of each execution domain and the corresponding second public key.
[0035] Furthermore, the execution environment 230 includes a processor and its register configuration, and multiple execution domains are formed by at least one processor core and its corresponding register configuration. The register configurations include, but are not limited to, M-mode (Machine Mode), S-mode (Supervisor Mode), and U-mode (User Mode), where M-mode has full access to hardware resources, and the permission requirements of M-mode are higher than those of S-mode. The permission requirements of S-mode are higher than those of U-mode. Without loss of generality, any execution domain belongs to one of M-mode, S-mode, or U-mode.
[0036] For example, execution domain #0 belongs to M mode, while execution domains #1 through #n belong to S mode or U mode, etc. Specifically, M mode is used to initialize the processor and system, handle exceptions and interrupts, and provide the environment for the operating system kernel to run. It is typically used to run firmware (such as BIOS or UEFI) and the operating system kernel. For example, M mode has access to all hardware resources, including memory and I / O devices. S mode is typically used to run the operating system kernel, provide the runtime environment for user-mode (U mode) programs, and manage virtual memory and memory protection. For example, S mode is used in multi-user operating systems to isolate user programs and protect system resources. U mode is used to run ordinary user programs and request services from the operating system kernel (S mode) or firmware (M mode) through system calls (such as the ecall instruction). For example, user-space applications typically run in U mode to protect system resources and isolate user programs.
[0037] Specifically, in the encryption verification process, in order to respond to the authentication request, the motherboard controller 10 and the authentication server 30 perform encryption verification. The authentication request can be parsed to obtain user permission information. Then, when the user permission information meets the authentication conditions, a first random number is generated, and the first public key in the first key pair is used to encrypt the first random number to obtain an encrypted response message. Then, the motherboard controller 10 sends the encrypted response message to the authentication server 30, so that the authentication server can decrypt it using the first private key in the first key pair.
[0038] In other words, by using an agreed-upon first key pair to perform encrypted verification between the authentication server and the authentication module, the reliability of encrypted verification is improved. In addition, the user's rights information serves as a condition for performing encrypted verification, further ensuring the security of remote debugging authentication.
[0039] Furthermore, during the encryption verification process, in response to authentication requests, encryption verification is performed between the motherboard controller and the authentication server. This allows the acquisition of an encryption verification management table. Then, based on this table, the public key corresponding to the user's permission information is determined as the first public key. It should be understood that the encryption verification management table indicates the correspondence between each user's permission information and each public key.
[0040] Furthermore, during the signature verification process, in order to verify the encrypted verification result via the motherboard controller and the authentication server, the motherboard controller can obtain a signature response message from the authentication server. Then, using the second public key from the second key pair, the signature response message is decrypted to obtain a second random number. Finally, it is determined whether the first and second random numbers are consistent. It should be understood that the signature response message is obtained by encrypting the second random number using the second private key from the second key pair. In other words, by using an agreed-upon second key pair to perform signature verification between the authentication server and the authentication module, the reliability of the signature verification is improved.
[0041] Furthermore, as an example of determining whether signature verification is successful, the signature verification can be determined to be successful when the first random number and the second random number are the same, and the signature verification can be determined to be unsuccessful when the first random number and the second random number are not the same.
[0042] During the signature verification process, in order to verify the encrypted verification result via the motherboard controller and authentication server, a signature verification management table can be obtained. Then, based on the signature verification management table, the public key corresponding to the user's authorization information is determined as the second public key. It should be understood that the signature verification management table indicates the correspondence between each user's authorization information and each public key. Different user authorization information corresponds to different second key pairs, further enhancing the security of the signature verification process.
[0043] In addition, when the control debugging module enters the debugging state after the signature verification is successful, a debugging enable signal can be sent to the debugging module when the first random number and the second random number are the same. The debugging enable signal instructs the debugging module to open the debugging interface to the motherboard controller.
[0044] In other words, the first and second random numbers ensure that signature verification is performed when encryption verification passes, further improving the reliability of remote debugging authentication. Thus, when remote debugging authentication passes, the debugging module enters the debugging state through the debugging enable signal, which is compatible with the control logic of the debugging module.
[0045] Furthermore, in the encryption verification process, in order to encrypt the first random number using the first public key in the first key pair and obtain an encrypted response message, at least one execution domain in the execution environment that satisfies the user permission information can be determined. Then, the first random number and the domain identifier of at least one execution domain are encrypted using the first public key in the first key pair to obtain an encrypted response message.
[0046] In other words, the user permission information can authorize at least one execution domain that satisfies the user permission information, enabling the debugging device to access at least one authorized execution domain, while the debugging device cannot access execution domains that do not satisfy the user permission information.
[0047] In other words, the encryption verification management table indicates the correspondence between each user's permission information and each public key. Different user permission information corresponds to different first key pairs, which further enhances the security of the encryption verification process.
[0048] Furthermore, to make the debugging authentication process more reliable, the authentication module can determine the first timestamp of the first time the encryption verification is performed, and the second timestamp of the second time the encryption verification result is obtained.
[0049] If the time difference between the second timestamp and the first timestamp is less than the preset duration, the authentication module can begin to perform signature verification.
[0050] In other words, the preset duration, used as a criterion for determining the interval between the encryption verification process and the signature verification process, accurately defines the time difference between the second timestamp and the second timestamp. This ensures that remote debugging authentication, including both the encryption and signature verification processes, is more reliable when the time difference is less than the preset time. In other words, a time difference less than the preset time indicates a higher reliability of the signature verification process, allowing for further comparison between the first and second random numbers.
[0051] Alternatively, if the time difference between the second timestamp and the first timestamp is greater than a preset duration, the authentication module can abandon the signature verification process. In other words, if the time difference is greater than the preset time, it indicates that the reliability of the signature verification process has significantly deteriorated. Therefore, there is no need to further perform the comparison between the first and second random numbers, and the signature verification process can be abandoned in order to re-execute the encryption verification process.
[0052] Furthermore, as an example of determining the first timestamp of the first time to perform cryptographic verification, the first time to generate the first random number for cryptographic verification can be determined, and timing monitoring can be performed for a preset duration from the first time.
[0053] Accordingly, as an example of determining the second timestamp of the second time when the encryption verification result is obtained, the second time when the second random number used for signature verification is received can be determined, whereby the second random number indicates that the encryption verification of the first random number has passed. Accordingly, when the second random number used for signature verification is received, if the preset duration has not been reached, the time difference between the second timestamp and the first timestamp is less than the preset duration, and the authentication module begins to perform signature verification.
[0054] Accordingly, if the second random number is not received when the preset time expires, the time difference between the second timestamp and the first timestamp is greater than the preset time, and the authentication module abandons the signature verification.
[0055] In other words, starting from the moment the first random number used for cryptographic verification is generated, a preset duration of timing monitoring is executed, ensuring the reliability of the signature verification process through simple configuration.
[0056] The following will combine Figure 4 Detailed description Figure 2 Some examples of remote debugging authentication processes in the embodiments of the present invention. Figure 4 The remote debugging method 400 corresponds to Figure 3 The remote debugging system includes:
[0057] Step S401: The debugging device generates user permission information. It should be understood that the debugging user can open the debugging software on one side of the debugging device 40 and log in to the debugging software by entering the motherboard controller IP, username and password, and user permissions.
[0058] Step S402: The debugging device sends a remote debugging request. It should be understood that the debugging device 40 initiates a remote debugging request to the motherboard controller 10 via a network. For example, the remote debugging request can be sent through a network connection with the motherboard controller 10.
[0059] Step S403: The motherboard controller initiates an authentication request to the authentication module. It should be understood that after receiving a remote debugging request, the motherboard controller initiates an authentication request to the authentication module via the communication bus. For example, the motherboard controller 10 may include at least a debug management interface and a debug interface. The debug interface, such as an Open On-Chip Debugger (OpenOCD), can be connected to the device under test 20 via a debug port, such as a JTAG debug probe, allowing the motherboard controller 10 to access the debug module 210 in the device under test 20 through the debug port when the authentication result indicates successful authentication. Additionally, the debug management interface can be connected to the device under test via a system bus, such as a System Management Bus (SMBus), allowing the motherboard controller 10 to access the authentication module 220 through the debug management interface when the authentication result indicates unsuccessful authentication.
[0060] Step S404: The authentication module generates an encrypted response message. It should be understood that when initiating the signature verification process, the authentication module can first generate a first random number using a random number generator set within the authentication module, simultaneously recording a first timestamp. Then, based on the user permission information forwarded by the motherboard controller, it encrypts the information using the first public key corresponding to the user permission information, appends the domain identifier (ID) of the execution domain, generates an encrypted response message, and sends this encrypted response message to the motherboard controller. It should be understood that the first public key or the first key pair containing the first public key corresponds to the user permission information. The user permission information can also correspond to at least one execution domain in the execution environment; that is, at least one execution domain satisfying the user permission information can be remotely debugged by debugging instructions containing that user permission information. For example, the authentication module can execute authentication logic and maintain verification management tables (e.g., encryption verification management table and / or signature verification management table). Specifically, the authentication logic instructs the acquisition of the domain identifier of at least one execution domain and queries the verification management table to obtain the corresponding public key. For example, querying the encryption verification management table yields the first public key, or querying the signature verification management table yields the second public key.
[0061] Step S405: The authentication module performs time monitoring according to a preset duration. It should be understood that the authentication module generates a timestamp for the first random number and performs time monitoring according to a preset duration. For example, a timeout period based on a preset duration is set. If the preset duration is exceeded, the subsequent signature verification process is invalid, and the encryption verification is re-executed.
[0062] Step S406: The motherboard controller forwards the encrypted response message to the authentication server.
[0063] Step S407: The authentication server generates a signed response message. It should be understood that the authentication server decrypts the encrypted response message using the first private key from the first key pair indicated by an asymmetric algorithm, obtaining a first random number. For example, the corresponding first private key can be selected based on the domain ID, username, password, and user permission information of the execution domain.
[0064] Step S408: The authentication server sends a signature response message. It should be understood that the authentication server can use the first random number from step S404 as the second random number, and employ an asymmetric algorithm to instruct the second private key in the second key pair to sign the message before sending it to the motherboard controller.
[0065] Step S409: The motherboard controller forwards the signature response message to the authentication module.
[0066] Step S410: The authentication module determines whether a preset time has been set since the start of the encryption verification process. If yes, proceed to step S404; otherwise, execute the signature verification process. If the preset time has been exceeded, subsequent signature verification processes are invalid, and encryption verification is re-executed. During the signature verification process, the authentication module decrypts the second random number from the signature response message and compares it with the first random number. If they match, remote debugging authentication is successful.
[0067] Step S411: The authentication module sends a debug enable signal to the debug module. It should be understood that the authentication module can also send the authentication result to the motherboard controller. The debug enable signal instructs the debug module to enable the debug interface to the motherboard controller.
[0068] Step S412: The motherboard controller returns the authentication result to the debugging device. It should be understood that, upon successful authentication, the user can begin a remote debugging process via the debugging device. For example, the debugging device sends debugging commands to the execution environment via the motherboard controller and then via the debugging module.
[0069] The following will combine Figure 5 A debugging motherboard according to another embodiment of this disclosure is described. Figure 5 The debugging motherboard 500 includes a motherboard controller 10 and a device to be debugged 20, wherein the device to be debugged 20 includes a debugging module 210 and an authentication module 220.
[0070] In addition, the motherboard controller 10 responds to the remote debugging request for the debugging module 210 by sending an authentication request to the authentication module 220, wherein the motherboard controller 10 is used to debug the execution environment in the debugging state of the debugging module 210;
[0071] In addition, the authentication module 220 responds to the authentication request by performing encrypted verification with the authentication server via the motherboard controller 10, and performs signature verification on the encrypted verification result via the motherboard controller 10 and the authentication server. After the signature verification is successful, it controls the debugging module 210 to enter the debugging state.
[0072] In the embodiments of this disclosure, the motherboard controller in the debugging motherboard facilitates the forwarding between the debugging module and the debugging device in the device under test, reduces the configuration requirements for the debugging device, and can receive debugging instructions from the debugging device to remotely debug the execution environment, thus improving the flexibility of debugging. Furthermore, the motherboard controller can also facilitate the forwarding between the authentication server and the authentication module, and reliably authenticate the debugging device before remotely debugging the execution environment through the debugging module via encrypted verification and signature verification processes.
[0073] In other embodiments, the authentication module is specifically used to: parse the authentication request to obtain user permission information; generate a first random number when the user permission information meets the authentication conditions, and encrypt the first random number using the first public key in the first key pair to obtain an encrypted response message; and send the encrypted response message to the authentication server via the motherboard controller, so that the authentication server decrypts it using the first private key in the first key pair.
[0074] In other embodiments, the authentication module is specifically used to: obtain a signature response message from the authentication server via the motherboard controller, wherein the signature response message is obtained by encrypting a second random number using the second private key in the second key pair; decrypt the signature response message using the second public key in the second key pair to obtain a second random number; and determine whether the first random number and the second random number are consistent.
[0075] In other embodiments, the authentication module is specifically used to: send a debug enable signal to the debug module when the first random number and the second random number are the same, the debug enable signal instructing the debug module to enable the debug interface to the motherboard controller.
[0076] In other embodiments, the authentication module is specifically used to: determine at least one execution domain in the execution environment that satisfies the user permission information; and encrypt the first random number and the domain identifier of the at least one execution domain using the first public key in the first key pair to obtain an encrypted response message.
[0077] In other embodiments, the authentication module is further configured to: obtain an encryption verification management table, the encryption verification management table indicating the correspondence between each user permission information and each public key; and determine the public key corresponding to the user permission information as the first public key according to the encryption verification management table.
[0078] In other embodiments, the authentication module is further configured to: obtain a signature verification management table, the signature verification management table indicating the correspondence between each user permission information and each public key; and determine the public key corresponding to the user permission information as the second public key according to the signature verification management table.
[0079] In other embodiments, the authentication module is further configured to: determine a first timestamp of the first time of performing encryption verification, and determine a second timestamp of the second time of obtaining the encryption verification result; if the time difference between the second timestamp and the first timestamp is less than a preset duration, then start performing signature verification; if the time difference between the second timestamp and the first timestamp is greater than the preset duration, then abandon the execution of signature verification.
[0080] In other embodiments, the authentication module is specifically configured to: determine a first time for generating a first random number for encryption verification, and perform timing monitoring for a preset duration starting from the first time; determine a second time for receiving a second random number for signature verification, the second random number indicating that the encryption verification of the first random number has passed; if the preset duration has not been reached when the second random number for signature verification is received, the authentication module starts to perform signature verification; if the second random number is not received when the preset duration is reached, the authentication module abandons the execution of signature verification.
[0081] It should be understood that the specific implementation of each module in the debugging motherboard can be found in the description of the corresponding steps in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process description in the foregoing method embodiments, and will not be repeated here.
[0082] Reference Figure 6 The diagram shows a structural schematic of an electronic device according to another embodiment of the present disclosure. The specific embodiments of the present disclosure do not limit the specific implementation of the electronic device.
[0083] like Figure 6As shown, the electronic device may include: a processor 602 for executing program 610, a communications interface 604, a memory 606, and a communications bus 608.
[0084] The processor, communication interface, and memory communicate with each other via a communication bus.
[0085] A communication interface is used to communicate with other electronic devices or servers.
[0086] The processor is used to execute programs, specifically the relevant steps in the above method embodiments.
[0087] Specifically, the program may include program code, which includes computer operation instructions.
[0088] The processor may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of this disclosure. The smart device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.
[0089] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.
[0090] The program may include multiple computer instructions, which can specifically cause the processor to perform operations on the device under test and the motherboard controller.
[0091] The specific implementation of each step in the program can be found in the corresponding descriptions of the steps, modules, or units in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device, equipment, or module can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0092] This disclosure also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in any of the foregoing method embodiments. The computer storage medium includes, but is not limited to, compact disc read-only memory (CD-ROM), random access memory (RAM), floppy disk, hard disk, or magneto-optical disk.
[0093] This disclosure also provides a computer program product, including computer instructions that instruct a computing device to perform operations on a device to be debugged and a motherboard controller. Specifically, the motherboard controller responds to a remote debugging request for the debugging module by sending an authentication request to the authentication module. The motherboard controller is used to debug the execution environment in the debugging state of the debugging module. The authentication module responds to the authentication request by performing encrypted verification with an authentication server via the motherboard controller. The authentication module performs signature verification on the encrypted verification result via the motherboard controller and the authentication server. After the signature verification is successful, the authentication module controls the debugging module to enter the debugging state.
[0094] Furthermore, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with relevant regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0095] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this disclosure can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this disclosure.
[0096] The methods described above according to embodiments of this disclosure can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded over a network. Thus, the methods described herein can be stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., Random Access Memory (RAM), Read-Only Memory (ROM), Flash Memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.
[0097] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments disclosed herein.
[0098] The above embodiments are only used to illustrate the embodiments of this disclosure, and are not intended to limit the embodiments of this disclosure. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this disclosure. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this disclosure, and the patent protection scope of the embodiments of this disclosure should be defined by the claims.
Claims
1. A remote debugging method applied to a motherboard, the motherboard including a motherboard controller and a device to be debugged, the device to be debugged including a debugging module and an authentication module, the remote debugging method comprising: The motherboard controller responds to the remote debugging request for the debugging module by sending an authentication request to the authentication module, wherein the motherboard controller is used to debug the execution environment in the debugging state of the debugging module; The authentication module responds to the authentication request by performing encrypted verification with the authentication server via the motherboard controller. The authentication module performs signature verification on the encrypted verification result via the motherboard controller and the authentication server; After the signature verification is successful, the authentication module controls the debugging module to enter the debugging state.
2. The method according to claim 1, wherein, In response to the authentication request, the motherboard controller performs encrypted verification with the authentication server, including: Parse the authentication request to obtain user permission information; When the user permission information meets the authentication conditions, a first random number is generated, and the first public key in the first key pair is used to encrypt the first random number to obtain an encrypted response message. The encrypted response message is sent to the authentication server via the motherboard controller, so that the authentication server decrypts the message using the first private key in the first key pair.
3. The method according to claim 2, wherein, The encryption verification result is signed and verified via the motherboard controller and the authentication server, including: The signature response message is obtained from the authentication server via the motherboard controller, wherein the signature response message is obtained by encrypting the second random number using the second private key in the second key pair; The signed response message is decrypted using the second public key from the second key pair to obtain a second random number; Determine whether the first random number and the second random number are the same.
4. The method according to claim 3, wherein, After successful signature verification, the debugging module is controlled to enter the debugging state, including: When the first random number and the second random number are the same, a debug enable signal is sent to the debug module, which instructs the debug module to enable the debug interface to the motherboard controller.
5. The method according to claim 2, wherein, The first public key from the first key pair is used to encrypt the first random number to obtain an encrypted response message, including: Determine at least one execution domain in the execution environment that satisfies the user permission information; The first public key from the first key pair is used to encrypt the first random number and the domain identifier of the at least one execution domain to obtain an encrypted response message.
6. The method according to claim 2, wherein, In response to the authentication request, the process includes encrypted verification between the motherboard controller and the authentication server, and further includes: Obtain the encryption verification management table, which indicates the correspondence between each user's permission information and each public key; Based on the encryption verification management table, the public key corresponding to the user permission information is determined as the first public key.
7. The method according to claim 3, wherein, The process of verifying the encryption result through the motherboard controller and the authentication server also includes: Obtain the signature verification management table, which indicates the correspondence between each user's permission information and each public key; Based on the signature verification management table, the public key corresponding to the user permission information is determined as the second public key.
8. The method according to claim 1, wherein, The method further includes: The authentication module determines a first timestamp of the first time the encryption verification is performed, and a second timestamp of the second time the encryption verification result is obtained; If the time difference between the second timestamp and the first timestamp is less than a preset duration, the authentication module begins to perform signature verification. If the time difference between the second timestamp and the first timestamp is greater than the preset duration, the authentication module will abandon the signature verification.
9. The method according to claim 8, wherein, Determine the first timestamp of the first moment when the cryptographic verification is performed, including: Determine the first time for generating the first random number used for encryption verification, and perform timing monitoring for the preset duration starting from the first time; The determination of the second timestamp of the second time when the encryption verification result is obtained includes: A second time is determined when a second random number for signature verification is received, wherein the second random number indicates that the encryption verification of the first random number has passed; Wherein, if the time difference between the second timestamp and the first timestamp is less than a preset duration, the authentication module begins to perform signature verification, including: Upon receiving a second random number for signature verification, if the preset time has not been reached, the authentication module begins to perform signature verification. Wherein, if the time difference between the second timestamp and the first timestamp is greater than the preset duration, the authentication module abandons the signature verification, including: If the second random number is not received when the preset time expires, the authentication module will abandon the signature verification.
10. A debugging motherboard, comprising a motherboard controller and a device to be debugged, wherein the device to be debugged includes a debugging module and an authentication module. in, The motherboard controller responds to the remote debugging request for the debugging module by sending an authentication request to the authentication module, wherein the motherboard controller is used to debug the execution environment in the debugging state of the debugging module; The authentication module responds to the authentication request by performing encrypted verification with the authentication server via the motherboard controller, and performs signature verification on the encrypted verification result via the motherboard controller and the authentication server. After the signature verification is successful, the module controls the debugging module to enter the debugging state.
11. A remote debugging system, comprising: The debugging motherboard and debugging device according to claim 10.
12. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the device under test or motherboard controller according to claim 10.
13. A computer storage medium having a computer program stored thereon, which, when executed by a processor, performs the operation of the device under test or motherboard controller according to claim 10.
