Identity verification method and device of sensor
By adopting encrypted communication protocol and private key decryption technology in sensor authentication, the problem of inability to prevent tampering with communication protocols from bypassing identity authentication in the prior art is solved, and the security verification of sensor firmware and data security are improved.
Patent Information
- Application Number
- CN202310969936.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the sensor authentication method cannot prevent the outside world from tampering with the communication protocol, thereby bypassing the identity authentication, resulting in the sensor firmware being unable to perform security verification and the data security is low.
A sensor identity authentication method based on encrypted communication protocol is proposed. The firmware image is decrypted through a private key built into a key sensor, the public key is passed layer by layer, the sensor is started, and the identification code is encrypted and sent to the target robot for identity. verify.
Effectively prevent the outside world from tampering with communication protocols and bypassing identity authentication, realize security verification of sensor firmware, improve the security of sensor data, protect key sensors from being replaced, and ensure that the firmware is not tampered with.
Smart Images

Figure CN119449340A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information security technology, and in particular, relates to a sensor identity authentication method and device. Background Art
[0002] During the operation of the target robot, the key sensors of the target robot and the algorithm modules in the target robot body need to work closely together, and the identity of the key sensors needs to be verified to ensure the safe operation of the target robot. In the related technology, the identity of the key sensor is determined by the device information actively reported or queried by the key sensor. The commonly used sensor identity authentication method cannot prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and thus the sensor firmware cannot be security-checked, and the sensor data security is low. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a sensor identity authentication method and device, which can authenticate the identity of a key sensor based on an encrypted communication protocol, effectively prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0004] In a first aspect, the present application provides a sensor identity authentication method, the method comprising:
[0005] Decrypting the first firmware image based on the first private key built into the key sensor to obtain the second private key and the third public key built into the first firmware;
[0006] The first firmware decrypts the first message digest corresponding to the second firmware image based on the second private key, and sends the third public key to the second firmware;
[0007] The second firmware decrypts the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, sends the third public key to the application firmware information, and guides the key sensor to start;
[0008] The key sensor encrypts the identification code based on the third public key and sends the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
[0009] According to the sensor identity authentication method provided in the embodiment of the present application, the security of encryption and decryption is improved by encrypting the firmware of each stage and then decrypting the information in the firmware of the next stage based on the private key built into the firmware of the previous stage; and the third public key is passed layer by layer to the application firmware information to guide the key sensor to start. The key sensor can encrypt the identification code based on the third public key, and send the encrypted identification code to the target robot for the target robot to authenticate the identity, thereby realizing the identity authentication of the key sensor based on the encrypted communication protocol, which can effectively prevent the bypassing of the identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0010] The sensor identity authentication method of an embodiment of the present application, wherein the application firmware information includes: a kernel and an application image, the second firmware decrypts the second message digest corresponding to the application firmware information based on a fourth private key built into the second firmware, sends the third public key to the application firmware information, and guides the key sensor to start, including:
[0011] The second firmware decrypts the second message digests corresponding to the kernel and the application image based on the fourth private key, and performs a legitimacy check on the kernel and the application image;
[0012] In the case that the legitimacy check of the kernel and the application image is passed, the third public key is sent to the kernel, and the kernel is started to start the key sensor.
[0013] In a sensor identity authentication method according to an embodiment of the present application, the application firmware information includes: a kernel and an application image. Before decrypting the first firmware image based on a first private key built into a key sensor and obtaining a second private key built into the first firmware, the method further includes:
[0014] Encrypting the first firmware image based on a first public key, and embedding the third public key in the first firmware; the first public key corresponds to the first private key;
[0015] Encrypting the first message digest corresponding to the second firmware image based on the second public key to obtain a first encryption result; the second public key corresponds to the second private key;
[0016] embedding the first encryption result and the second private key into the first firmware;
[0017] Encrypting the second message digest corresponding to the kernel and the application image based on a fourth public key to obtain a second encryption result; the fourth public key corresponds to the fourth private key;
[0018] The second encryption result and the fourth private key are built into the second firmware.
[0019] A sensor identity authentication method according to an embodiment of the present application, decrypting a first firmware image based on a first private key built into a key sensor to obtain a second private key and a third public key built into the first firmware, includes:
[0020] Performing a legitimacy check on the first firmware image based on the hardware security engine of the key sensor;
[0021] If the first firmware image passes the legality check, decrypting the first firmware image based on the first private key, and guiding the first firmware to start;
[0022] The second private key and the third public key built into the first firmware are obtained.
[0023] In an identity authentication method for a sensor according to an embodiment of the present application, the first firmware decrypts a first message digest corresponding to a second firmware image based on the second private key, and sends the third public key to the second firmware, including:
[0024] The first firmware decrypts the first message digest based on the second private key, and performs a legitimacy check on the second firmware image;
[0025] When the second firmware image passes the legality check, the third public key is sent to the second firmware, and the second firmware is booted.
[0026] The sensor identity authentication method of one embodiment of the present application, after the key sensor encrypts the identification code based on the third public key and sends the encrypted identification code to the target robot, the method further includes:
[0027] The target robot decrypts the received encrypted identification code based on a third private key to obtain the identification code; the third private key corresponds to the third public key;
[0028] Based on the identification code, the key sensor is authenticated.
[0029] The sensor identity authentication method of one embodiment of the present application further includes: encrypting the communication between the target robot and the key sensor based on a third private key, and encrypting the communication between the key sensor and the target robot based on the third public key.
[0030] In a second aspect, the present application provides a sensor identity authentication device, the device comprising:
[0031] A first processing module, configured to decrypt the first firmware image based on a first private key built into the key sensor, and obtain a second private key and a third public key built into the first firmware;
[0032] A second processing module, configured to enable the first firmware to decrypt the first message digest corresponding to the second firmware image based on the second private key, and send the third public key to the second firmware;
[0033] a third processing module, configured to enable the second firmware to decrypt the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, send the third public key to the application firmware information, and guide the key sensor to start;
[0034] The fourth processing module is used to enable the key sensor to encrypt the identification code based on the third public key and send the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
[0035] According to the sensor identity authentication device provided in the embodiment of the present application, the security of encryption and decryption is improved by encrypting the firmware of each stage and then decrypting the information in the firmware of the next stage based on the private key built into the firmware of the previous stage; and the third public key is passed layer by layer to the application firmware information to guide the key sensor to start. The key sensor can encrypt the identification code based on the third public key, and send the encrypted identification code to the target robot for the target robot to authenticate the identity, thereby realizing the authentication of the key sensor based on the encrypted communication protocol, which can effectively prevent the bypassing of the identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0036] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the sensor identity authentication method as described in the first aspect above is implemented.
[0037] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the sensor identity authentication method as described in the first aspect above.
[0038] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the sensor identity authentication method as described in the first aspect above.
[0039] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0040] The security of encryption and decryption is improved by encrypting the firmware of each stage and then decrypting the information in the firmware of the next stage based on the private key built into the firmware of the previous stage. The third public key is passed layer by layer to the application firmware information to guide the key sensor to start. The key sensor can encrypt the identification code based on the third public key and send the encrypted identification code to the target robot for identity authentication by the target robot. The identity of the key sensor is authenticated based on the encrypted communication protocol, which can effectively prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and then the firmware of the key sensor is security checked, which improves the security of the sensor data, protects the key sensors in the target robot from being replaced, and ensures that the firmware is not tampered with.
[0041] Furthermore, before burning, the firmware of each stage is encrypted and the corresponding key is built into the corresponding firmware, so that in the subsequent application process, the information in the firmware of the next stage can be decrypted based on the private key built into the firmware of the previous stage, thereby improving the security of encryption and decryption; at the same time, the third public key can be passed layer by layer to the application firmware information for the key sensor to encrypt the identification code, and the encrypted identification code is sent to the target robot for the target robot to authenticate the identity, and the identity of the key sensor can be authenticated based on the encrypted communication protocol, which can effectively prevent the bypass of authentication when the communication protocol is tampered with by the outside world, and then the firmware of the key sensor is security checked, thereby improving the security of the sensor data, protecting the key sensors in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0042] Furthermore, the hardware security engine based on the key sensor performs a legitimacy check on the first firmware image, and can decrypt the first firmware image based on the first private key when the first firmware image is complete and legal, and guide the first firmware to start, thereby improving the security of the sensor data.
[0043] Furthermore, the target robot decrypts the encrypted identification code through the third private key, and then obtains the identity feature code and random code of the key sensor, and then authenticates the key sensor, which can effectively prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and then performs security inspection on the firmware of the key sensor. The target robot algorithm module can effectively cooperate with the key sensor to ensure the normal operation of the target robot, improve the security of the sensor data, protect the key sensors in the target robot from being replaced, and ensure that the firmware is not tampered with.
[0044] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0046] Figure 1 This is one of the flow charts of the sensor identity authentication method provided in the embodiment of the present application;
[0047] Figure 2 This is the second flow chart of the sensor identity authentication method provided in the embodiment of the present application;
[0048] Figure 3 This is one of the principle schematic diagrams of the sensor identity authentication method provided in the embodiment of the present application;
[0049] Figure 4 This is the second principle schematic diagram of the sensor identity authentication method provided in the embodiment of the present application;
[0050] Figure 5 It is a structural schematic diagram of an identity verification device of a sensor provided in an embodiment of the present application;
[0051] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0053] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0054] Combine the following Figures 1 to 4 The sensor identity authentication method according to the embodiment of the present application is described.
[0055] It should be noted that the execution subject of the sensor identity authentication method may be a server, or may be an identity authentication device of the sensor, or may also be a user's terminal, including but not limited to a mobile terminal and a non-mobile terminal.
[0056] For example, mobile terminals include but are not limited to cameras, target robots, mobile phones, PDA smart terminals, tablet computers, and vehicle-mounted smart terminals, etc.; non-mobile terminals include but are not limited to PC terminals, etc.
[0057] like Figure 1 As shown, the identity authentication method of the sensor includes: step 110, step 120, step 130 and step 140.
[0058] Step 110: Decrypt the first firmware image based on the first private key built into the key sensor to obtain the second private key and the third public key built into the first firmware.
[0059] In this step, the key sensor may be a sensor in the target robot, and the key sensor may be an image sensor, a magnetic position sensor, a presence sensor, a gesture sensor, a force torque sensor, an environmental sensor, a power management sensor, and the like.
[0060] Among them, when the key sensor is an image sensor, the image sensor may include: a depth camera, a digital camera, an industrial camera, etc. The depth camera may also be a binocular depth camera, a structured light depth camera, or a TOF (Time offlight) depth camera, which can be determined based on actual needs and is not limited in this application.
[0061] The target robot may be a warehouse robot, an industrial robot, a household robot, etc. For example, in the modern logistics industry, the target robot may be a warehouse robot.
[0062] The first firmware is a loader corresponding to the first stage in the burning process.
[0063] The first private key is used to decrypt the first firmware image.
[0064] The first private key is a non-public key.
[0065] The first private key is pre-burned into the key sensor.
[0066] An image is an independent software package used to package a software runtime environment and software developed based on the runtime environment. An image can include all the content required to run a piece of software, such as code, libraries, environment variables, and configuration files.
[0067] The first firmware image is the firmware image of the first stage in the burning process, such as Figure 2 As shown in UBootSPL.
[0068] Among them, UBoot (universal bootloader) is a boot loader for embedded systems, SPL (Secondary Program Loader) is the secondary loader of UBoot; the firmware image is a single file made of the firmware in a specific format.
[0069] The second private key is a non-public key.
[0070] Before burning, the second private key and the third public key may be built into the first firmware.
[0071] like Figure 2 As shown, in some embodiments, step 110 may include:
[0072] A hardware security engine based on a key sensor performs a legitimacy check on the first firmware image;
[0073] When the first firmware image passes the legitimacy check, the first firmware image is decrypted based on the first private key, and the first firmware is booted;
[0074] A second private key and a third public key built into the first firmware are obtained.
[0075] In this embodiment, the legality check is used to determine whether the first firmware image is legal.
[0076] The validity check may include: Cyclic Redundancy Check (CRC), Magic Number Check and Terminal Product ID Check.
[0077] The hardware security engine is used to perform a validity check on the first firmware image.
[0078] During the actual execution process, the first private key can be the encryption private key 0, and the legitimacy of the first-stage firmware can be checked by the hardware security engine of the key sensor. If the legitimacy check of the first firmware image (UBootSPL) passes, the first firmware image (UBootSPL) is decrypted based on the encryption private key 0, and the first firmware (UBootSPL) is booted to start, and then the encryption private key A and encryption public key C built into the first firmware (UBootSPL) are obtained.
[0079] According to the sensor identity authentication method provided in the embodiment of the present application, the legitimacy of the first firmware image is checked based on the hardware security engine of the key sensor. When the first firmware image is complete and legal, the first firmware image can be decrypted based on the first private key, and the first firmware can be booted, thereby improving the security of the sensor data.
[0080] Step 120: The first firmware decrypts the first message digest corresponding to the second firmware image based on the second private key, and sends the third public key to the second firmware.
[0081] In this step, the second private key is a non-public key in the first firmware.
[0082] The second private key may be burned into the first firmware in advance.
[0083] The second firmware image is the firmware image corresponding to the second stage of the burning process, such as Figure 2 As shown in UBootTPL, TPL (Tertiary Program Loader) is the third-level loader of UBoot.
[0084] The first message digest is a message digest corresponding to the second firmware image.
[0085] The first firmware may decrypt the first message digest corresponding to the second firmware image based on the second private key built into the first firmware, and send the third public key in the first firmware to the second firmware.
[0086] Step 130: The second firmware decrypts the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, sends the third public key to the application firmware information, and guides the key sensor to start.
[0087] In this step, the fourth private key is a non-public key in the second firmware.
[0088] The fourth private key may be burned into the second firmware in advance.
[0089] Application firmware information may include kernel and application image, etc. Figure 2As shown in Kernel, the application image is as follows Figure 2 As shown in APP, it should be noted that the kernel and application image can be referred to as (Kernel+APP) in the following text.
[0090] The second message digest is a message digest corresponding to the application firmware information.
[0091] After the second firmware decrypts the second message digest corresponding to the application firmware information based on the fourth private key built in the second firmware, the third public key in the second firmware can be sent to the application firmware information and the key sensor can be guided to start.
[0092] In the actual implementation process, Figure 2 As shown, the first private key may be an encrypted private key 0, the second private key may be an encrypted private key A, the third public key may be an encrypted public key C, and the fourth private key may be an encrypted private key B. The first firmware image (UBootSPL) may be decrypted based on the encrypted private key 0 built into the key sensor to obtain the encrypted private key A and the encrypted public key C built into the first firmware (UBootSPL);
[0093] Then the first firmware (UBootSPL) can decrypt the first message digest corresponding to the second firmware image (UBootTPL) based on the encrypted private key A built into the first firmware (UBootSPL), and send the encrypted public key C to the second firmware (UBootTPL);
[0094] The second firmware (UBootTPL) decrypts the second message digest corresponding to the application firmware information (Kernel+APP) based on the encrypted private key B built into the second firmware (UBootTPL), sends the encrypted public key C to the application firmware information (Kernel+APP), and then guides the key sensor to start.
[0095] In some embodiments, the application firmware information may include: a kernel and an application image, and step 130 may include:
[0096] The second firmware decrypts the second message digest corresponding to the kernel and the application image based on the fourth private key, and performs a legitimacy check on the kernel and the application image;
[0097] When the kernel and application image legitimacy check passes, the third public key is sent to the kernel, and the kernel is started to start the key sensor.
[0098] In this embodiment, the application firmware information may include a kernel and an application image.
[0099] like Figure 2 As shown in the figure, (Kernel+APP) refers to the kernel and application image.
[0100] The kernel is the core part of an operating system.
[0101] The application image is the application software that has been installed in the system. The application image integrates the program and the environment on which the program depends on the original operating system.
[0102] During the application process, users can install the required applications with one click through the application mirror, which is simple and convenient without the need for manual configuration.
[0103] The second message digest is the message digest corresponding to the kernel and the application image.
[0104] The fourth private key is a key built into the second firmware.
[0105] In the actual execution process, the third public key may be an encrypted public key C, the fourth private key may be an encrypted private key B, and the second firmware (UBootTPL) may decrypt the second message digest corresponding to the kernel and the application image based on the encrypted private key B, and perform a legitimacy check on the kernel and the application image;
[0106] When the kernel and application image legitimacy check passes, the second firmware (UBootTPL) sends the encrypted public key C to the kernel and guides the kernel to start, thereby starting the key sensor.
[0107] According to the sensor identity authentication method provided in the embodiment of the present application, the second message digest corresponding to the kernel and the application image is decrypted based on the fourth private key, the legitimacy of the kernel and the application image is checked, and when the legitimacy of the kernel and the application image passes the check, the third public key is sent to the kernel, and then the kernel is started to start the key sensor, and the third public key is passed layer by layer for the key sensor to encrypt its identity feature code, and then identity authentication is performed, thereby realizing identity authentication of the key sensor based on the encrypted communication protocol and improving the security of the sensor data.
[0108] In some embodiments, step 120 may further include:
[0109] The first firmware decrypts the first message digest based on the second private key, and performs a legitimacy check on the second firmware image;
[0110] When the second firmware image passes the legitimacy check, the third public key is sent to the second firmware, and the second firmware is guided to start.
[0111] In this embodiment, the validity check may include: Cyclic Redundancy Check (CRC), Magic Number Check and Terminal Product ID Check.
[0112] The second firmware image may be subjected to a validity check based on at least one of a CRC check, a MagicNumber check, and a terminal product ID check.
[0113] The second private key is a non-public key in the first firmware.
[0114] The first firmware can decrypt the first message digest of the second firmware image based on the built-in second private key, and perform a legitimacy check on the second firmware image;
[0115] When the second firmware image passes the legitimacy check, the third public key is sent to the second firmware, and the second firmware is guided to start.
[0116] In the actual execution process, the first firmware (UBootSPL) can decrypt the first message digest of the second firmware image (UBootTPL) based on the encryption private key A, and perform a legitimacy check on the second firmware image (UBootTPL);
[0117] When the legitimacy check of the second firmware image (UBootTPL) passes, the encrypted public key C is sent to the second firmware (UBootTPL), and the second firmware (UBootTPL) is booted.
[0118] According to the sensor identity authentication method provided in the embodiment of the present application, the first firmware decrypts the first message digest of the second firmware image through the built-in second private key, and performs a legitimacy check on the second firmware image. Then, if the legitimacy check of the second firmware image passes, the third public key is sent to the second firmware, and the second firmware is booted to start, which can perform a security check on the sensor firmware, thereby improving the security of the sensor data.
[0119] Step 140: The key sensor encrypts the identification code based on the third public key and sends the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
[0120] In this step, the identification code may include the identity characteristic code of the key sensor and the random code transmitted by the target robot, or the identification code may include the identity characteristic code of the key sensor.
[0121] The identity feature code is used to characterize the identity of the key sensor and can be used as an identifier for authenticating the key sensor.
[0122] The random code is transmitted by the target robot to the key sensor.
[0123] Based on the third public key, the key sensor can encrypt the identification code and then send the encrypted identification code to the target robot.
[0124] In some embodiments, the sensor identity authentication method may further include: encrypting the communication between the target robot and the key sensor based on a third private key, and encrypting the communication between the key sensor and the target robot based on a third public key.
[0125] During the actual execution process, the communication between the target robot body and the key sensor can be encrypted based on the encryption private key C, and the communication between the key sensor and the target robot body can be encrypted based on the encryption public key C. The target robot can send a random code to the key sensor, and then mix the identity feature code of the key sensor with the random code to obtain an identification code, and then encrypt the identification code based on the encryption public key C to obtain the encrypted identification code, and then send the encrypted identification code to the target robot.
[0126] During the research and development process, the inventors discovered that in the related technology, the identity of the key sensor is determined by the device information actively reported or queried by the key sensor. This method cannot prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and thus cannot perform security checks on the sensor firmware.
[0127] In this application, the security of encryption and decryption is improved by encrypting the communication of each stage of firmware and then decrypting the information in the next stage of firmware based on the private key built into the previous stage of firmware;
[0128] In addition, the third public key is passed layer by layer to the application firmware information to guide the startup of the key sensor. The key sensor can encrypt the identification code based on the third public key and send the encrypted identification code to the target robot for identity authentication. The identity of the key sensor is authenticated based on the encrypted communication protocol, which can effectively prevent the bypass of identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data.
[0129] According to the sensor identity authentication method provided in the embodiment of the present application, the security of encryption and decryption is improved by encrypting the firmware of each stage and then decrypting the information in the firmware of the next stage based on the private key built into the firmware of the previous stage; and the third public key is passed layer by layer to the application firmware information to guide the key sensor to start. The key sensor can encrypt the identification code based on the third public key, and send the encrypted identification code to the target robot for the target robot to authenticate the identity, thereby realizing the identity authentication of the key sensor based on the encrypted communication protocol, which can effectively prevent the bypassing of the identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0130] In some embodiments, after step 140, the sensor identity authentication method may further include:
[0131] The target robot decrypts the received encrypted identification code based on the third private key to obtain the identification code; the third private key corresponds to the third public key;
[0132] Based on the identification code, key sensors are authenticated.
[0133] In this embodiment, after the target robot receives the encrypted identification code sent by the key sensor, it can decrypt the encrypted identification code based on the third private key and then obtain the identification code;
[0134] Key sensors can be authenticated based on the identification code.
[0135] In the actual execution process, the third private key may be an encrypted private key C, and the third public key may be an encrypted public key C. After the target robot receives the encrypted identification code, the encrypted identification code may be decrypted based on the encrypted private key C to obtain the identification code. For example, the identity feature code and random code of the key sensor may be obtained.
[0136] Then, based on the identity signature code and random code of the key sensor, the key sensor is authenticated.
[0137] According to the sensor identity authentication method provided in the embodiment of the present application, the target robot decrypts the encrypted identification code through the third private key, and then obtains the identity feature code and random code of the key sensor, and then authenticates the key sensor. This can effectively prevent the authentication from being bypassed when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor. The target robot algorithm module can effectively cooperate with the key sensor, ensure the normal operation of the target robot, improve the security of the sensor data, protect the key sensors in the target robot from being replaced, and ensure that the firmware is not tampered with.
[0138] In some embodiments, the application firmware information includes: a kernel and an application image. Before step 110, the sensor identity authentication method may further include:
[0139] Encrypting the first firmware image based on the first public key, and embedding the third public key into the first firmware; the first public key corresponds to the first private key;
[0140] Encrypting the first message digest corresponding to the second firmware image based on the second public key to obtain a first encryption result; the second public key corresponds to the second private key;
[0141] embedding the first encryption result and the second private key into the first firmware;
[0142] Encrypting the second message digest corresponding to the kernel and the application image based on the fourth public key to obtain a second encryption result; the fourth public key corresponds to the fourth private key;
[0143] The second encryption result and the fourth private key are built into the second firmware.
[0144] In this embodiment, the first public key is a key corresponding to the first private key.
[0145] The second public key is a key corresponding to the second private key.
[0146] The application firmware information may include kernel and application images.
[0147] The kernel is the core part of an operating system.
[0148] The application image is the application software that has been installed in the system. The application image integrates the program and the environment on which the program depends on the original operating system.
[0149] The second public key is a key corresponding to the second private key.
[0150] The first encryption result is an encryption result obtained after encrypting the first message digest corresponding to the second firmware image.
[0151] The fourth public key is a key corresponding to the fourth private key.
[0152] The second encryption result is an encryption result obtained after encrypting the second message digest corresponding to the kernel and the application image.
[0153] In the actual execution process, the first firmware image (UBootSPL) can be encrypted based on the encryption public key 0, and the encryption public key C is built into the first firmware (UBootSPL);
[0154] Then, the first message digest corresponding to the second firmware image (UBootTPL) is encrypted based on the encryption public key A to obtain a first encryption result, and the first encryption result and the encryption private key A are built into the first firmware (UBootSPL);
[0155] Then, based on the encryption public key B, the second message digest of the kernel and application image (Kernel+APP) is encrypted to obtain a second encryption result, and the second encryption result and the encryption private key B are built into the second firmware.
[0156] According to the sensor identity authentication method provided in the embodiment of the present application, before burning, the firmware of each stage is encrypted and the corresponding key is built into the corresponding firmware, so that in the subsequent application process, the information in the firmware of the next stage can be decrypted based on the private key built into the firmware of the previous stage, thereby improving the security of encryption and decryption; at the same time, the third public key can be passed layer by layer to the application firmware information for the key sensor to encrypt the identification code, and the encrypted identification code is sent to the target robot for the target robot to authenticate the identity, and the identity of the key sensor can be authenticated based on the encrypted communication protocol, which can effectively prevent the bypassing of the identity authentication when the communication protocol is tampered with by the outside world, and then the firmware of the key sensor is security checked, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0157] In some embodiments, during the firmware burning process of the key sensor, an identity feature code corresponding to the key sensor may be generated.
[0158] In this embodiment, the key 0 and the identity feature code may be written into a one-time programmable memory of the hardware.
[0159] In the actual implementation process, Figure 3 As shown, the EFUSE Array space may include three areas: key KEY, SOC congif (SOC configuration) and user, and different areas have different security permissions.
[0160] The key area occupies 256 bits of space and can adopt a double-bit design, which can provide a key of no more than 128 bits in practical applications.
[0161] In addition, when burning, the first 128 bits and the last 128 bits need to be burned with the same key.
[0162] For example, Figure 4 As shown, Efuse ctrl (Efuse controller) is connected to the APB interface, and the Efuse controller can provide the key to Spkinft (SKP interface). After receiving the key, the SKP interface waits for the encryption engine to read the key;
[0163] The key on the SKP interface takes effect after preloading is completed, and no other part of the system except SPACC can read the key.
[0164] According to the sensor identity authentication method provided in the embodiment of the present application, an identity feature code corresponding to a key sensor is generated during the firmware burning process of the key sensor. The burning process is simple and convenient, and no complicated burning is required when the device leaves the factory, thereby achieving a balance between the convenience and security of sensor identity authentication. In actual implementation, the chip system can only access the EFUSE area and a hardware encryption engine through hardware, thereby achieving all encryption operations through hardware, thereby ensuring the security of encryption.
[0165] Continue to refer to Figure 2 , the implementation method of the sensor identity authentication method of the present application is specifically described.
[0166] Before burning, encrypt the firmware at each stage, encrypt the first firmware image (UBootSPL) based on the encryption public key 0, and embed the encryption public key C into the first firmware (UBootSPL);
[0167] Encrypting the first message digest of the second firmware image (UBootTPL) based on the encryption public key A, obtaining a first encryption result, and embedding the first encryption result and the encryption private key A into the first firmware (UBootSPL);
[0168] Then, the second message digest of the kernel and the application image (Kernel+APP) is encrypted based on the encryption public key B, a second encryption result is obtained, and the second encryption result and the encryption private key B are built into the second firmware (UBootTPL);
[0169] During the firmware burning process of the key sensor, an identity code corresponding to the key sensor is generated, and the encryption private key 0 and the identity code are written into the one-time programmable memory of the hardware;
[0170] During the decryption process, the first firmware image (UBootSPL) is firstly verified for legitimacy based on the hardware security engine of the key sensor, and the first firmware image (UBootSPL) is decrypted based on the encryption private key 0 to guide the first firmware to start;
[0171] Then the first firmware (UBootSPL) decrypts the first message digest corresponding to the second firmware image (UBootTPL) based on the encrypted private key A, and performs a legitimacy check on the second firmware image (UBootTPL). If the second firmware image (UBootTPL) passes the legitimacy check, the encrypted public key C is passed to the second firmware (UBootTPL), and the second firmware (UBootTPL) is booted;
[0172] The second firmware (UBootTPL) decrypts the second message digest corresponding to the kernel and application image (Kernel+APP) based on the encrypted private key B, and performs a legitimacy check on the kernel and application image (Kernel+APP). If the kernel and application image (Kernel+APP) pass the legitimacy check, the encrypted public key C is passed to the kernel, and the kernel is guided to start;
[0173] The target robot passes the random code to the key sensor and mixes the identity feature code corresponding to the key sensor with the random code to obtain the identification code. The key sensor encrypts the identification code based on the encryption public key C and sends the encrypted identification code to the target robot.
[0174] The target robot uses the encryption private key C to decrypt the encrypted identification code, obtains the identity feature code and random code corresponding to the key sensor, and then verifies the identity of the key sensor based on the identity feature code and random code.
[0175] The identity authentication device of the sensor provided in the present application is described below. The identity authentication device of the sensor described below and the identity authentication method of the sensor described above can be referred to each other.
[0176] The sensor identity authentication method provided in the embodiment of the present application can be executed by an identity authentication device of the sensor. In the embodiment of the present application, the sensor identity authentication method is executed by an identity authentication device of the sensor as an example to illustrate the sensor identity authentication device provided in the embodiment of the present application.
[0177] The embodiment of the present application also provides an identity authentication device for a sensor.
[0178] like Figure 5 As shown, the identity authentication device of the sensor includes: a first processing module 510 , a second processing module 520 , a third processing module 530 and a fourth processing module 540 .
[0179] A first processing module 510 is used to decrypt the first firmware image based on the first private key built into the key sensor, and obtain the second private key and the third public key built into the first firmware;
[0180] The second processing module 520 is used to enable the first firmware to decrypt the first message digest corresponding to the second firmware image based on the second private key, and send the third public key to the second firmware;
[0181] The third processing module 530 is used to enable the second firmware to decrypt the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, send the third public key to the application firmware information, and guide the key sensor to start;
[0182] The fourth processing module 540 is used to enable the key sensor to encrypt the identification code based on the third public key and send the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
[0183] According to the sensor identity authentication device provided in the embodiment of the present application, the security of encryption and decryption is improved by encrypting the firmware of each stage and then decrypting the information in the firmware of the next stage based on the private key built into the firmware of the previous stage; and the third public key is passed layer by layer to the application firmware information to guide the key sensor to start. The key sensor can encrypt the identification code based on the third public key, and send the encrypted identification code to the target robot for the target robot to authenticate the identity, thereby realizing the authentication of the key sensor based on the encrypted communication protocol, which can effectively prevent the bypassing of the identity authentication when the communication protocol is tampered with by the outside world, and then perform security checks on the firmware of the key sensor, thereby improving the security of the sensor data, protecting the key sensor in the target robot from being replaced, and ensuring that the firmware is not tampered with.
[0184] In some embodiments, the application firmware information includes: a kernel and an application image, and the third processing module 530 may also be used to:
[0185] The second firmware decrypts the second message digests corresponding to the kernel and the application image based on the fourth private key, and performs a legitimacy check on the kernel and the application image;
[0186] When the kernel and application image legitimacy check passes, the third public key is sent to the kernel, and the kernel is started to start the key sensor.
[0187] In some embodiments, the application firmware information includes: a kernel and an application image. Before decrypting the first firmware image based on a first private key built into the key sensor and obtaining a second private key built into the first firmware, the identity authentication device of the sensor may further include:
[0188] A fifth processing module, configured to encrypt the first firmware image based on the first public key and embed the third public key into the first firmware; the first public key corresponds to the first private key;
[0189] A sixth processing module, configured to encrypt the first message digest corresponding to the second firmware image based on the second public key to obtain a first encryption result; the second public key corresponds to the second private key;
[0190] A seventh processing module, configured to embed the first encryption result and the second private key into the first firmware;
[0191] an eighth processing module, configured to encrypt the second message digest corresponding to the kernel and the application image based on the fourth public key to obtain a second encryption result; the fourth public key corresponds to the fourth private key;
[0192] The ninth processing module is used to embed the second encryption result and the fourth private key into the second firmware.
[0193] In some embodiments, the first processing module 510 may also be used to:
[0194] A hardware security engine based on a key sensor performs a legitimacy check on the first firmware image;
[0195] When the first firmware image passes the legitimacy check, the first firmware image is decrypted based on the first private key, and the first firmware is booted;
[0196] A second private key and a third public key built into the first firmware are obtained.
[0197] In some embodiments, the second processing module 520 may also be used to:
[0198] Decrypting the first message digest based on the second private key in the first firmware, and performing a legitimacy check on the second firmware image;
[0199] When the second firmware image passes the legitimacy check, the third public key is sent to the second firmware, and the second firmware is guided to start.
[0200] In some embodiments, after the target robot decrypts the mixed code based on the third private key and obtains the identity feature code corresponding to the key sensor, the identity authentication device of the sensor may further include:
[0201] a tenth processing module, configured to enable the target robot to decrypt the received encrypted identification code based on the third private key to obtain the identification code; the third private key corresponds to the third public key;
[0202] The eleventh processing module is used for authenticating the key sensor based on the identification code.
[0203] In some embodiments, the sensor's identity verification device may further include:
[0204] The twelfth processing module is used to encrypt the communication between the target robot and the key sensor based on the third private key, and to encrypt the communication between the key sensor and the target robot based on the third public key.
[0205] The identity authentication device of the sensor in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a target robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0206] The sensor identity authentication device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0207] The sensor identity verification device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0208] In some embodiments, Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the above-mentioned sensor identity authentication method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0209] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0210] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the various processes of the above-mentioned sensor identity authentication method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0211] On the other hand, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the various processes of the above-mentioned sensor identity authentication method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0212] On the other hand, an embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned sensor identity authentication method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0213] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0214] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0215] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A sensor identity authentication method, characterized in that: include: Decrypting the first firmware image based on the first private key built into the key sensor to obtain the second private key and the third public key built into the first firmware; The first firmware decrypts the first message digest corresponding to the second firmware image based on the second private key, and sends the third public key to the second firmware; The second firmware decrypts the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, sends the third public key to the application firmware information, and guides the key sensor to start; The key sensor encrypts the identification code based on the third public key and sends the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
2. The sensor identity authentication method according to claim 1, characterized in that: The application firmware information includes: a kernel and an application image, the second firmware decrypts a second message digest corresponding to the application firmware information based on a fourth private key built into the second firmware, sends the third public key to the application firmware information, and guides the key sensor to start, including: The second firmware decrypts the second message digests corresponding to the kernel and the application image based on the fourth private key, and performs a legitimacy check on the kernel and the application image; In the case that the legitimacy check of the kernel and the application image is passed, the third public key is sent to the kernel, and the kernel is started to start the key sensor.
3. The sensor identity authentication method according to claim 1, characterized in that: The application firmware information includes: a kernel and an application image. Before decrypting the first firmware image based on the first private key built into the key sensor and obtaining the second private key and the third public key built into the first firmware, the method further includes: Encrypting the first firmware image based on a first public key, and embedding the third public key in the first firmware; the first public key corresponds to the first private key; Encrypting the first message digest corresponding to the second firmware image based on the second public key to obtain a first encryption result; the second public key corresponds to the second private key; embedding the first encryption result and the second private key into the first firmware; Encrypting the second message digest corresponding to the kernel and the application image based on a fourth public key to obtain a second encryption result; the fourth public key corresponds to the fourth private key; The second encryption result and the fourth private key are built into the second firmware.
4. The sensor identity authentication method according to any one of claims 1 to 3, characterized in that: The method of decrypting the first firmware image based on the first private key built into the key sensor to obtain the second private key and the third public key built into the first firmware includes: Performing a legitimacy check on the first firmware image based on the hardware security engine of the key sensor; If the first firmware image passes the legality check, decrypting the first firmware image based on the first private key, and guiding the first firmware to start; The second private key and the third public key built into the first firmware are obtained.
5. The sensor identity authentication method according to any one of claims 1 to 3, characterized in that: The first firmware decrypts the first message digest corresponding to the second firmware image based on the second private key, and sends the third public key to the second firmware, including: The first firmware decrypts the first message digest based on the second private key, and performs a legitimacy check on the second firmware image; When the second firmware image passes the legality check, the third public key is sent to the second firmware, and the second firmware is booted.
6. The sensor identity authentication method according to any one of claims 1 to 3, characterized in that: After the key sensor encrypts the identification code based on the third public key and sends the encrypted identification code to the target robot, the method further includes: The target robot decrypts the received encrypted identification code based on a third private key to obtain the identification code; the third private key corresponds to the third public key; Based on the identification code, the key sensor is authenticated.
7. The sensor identity authentication method according to any one of claims 1 to 3, characterized in that: The method further includes: encrypting the communication between the target robot and the key sensor based on a third private key, and encrypting the communication between the key sensor and the target robot based on the third public key.
8. A sensor identity verification device, characterized in that: include: A first processing module, configured to decrypt the first firmware image based on a first private key built into the key sensor, and obtain a second private key and a third public key built into the first firmware; A second processing module, configured to enable the first firmware to decrypt the first message digest corresponding to the second firmware image based on the second private key, and send the third public key to the second firmware; a third processing module, configured to enable the second firmware to decrypt the second message digest corresponding to the application firmware information based on the fourth private key built into the second firmware, send the third public key to the application firmware information, and guide the key sensor to start; The fourth processing module is used to enable the key sensor to encrypt the identification code based on the third public key and send the encrypted identification code to the target robot; the encrypted identification code is used for identity authentication of the target robot.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the identity authentication method of the sensor as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sensor identity authentication method according to any one of claims 1 to 7 is implemented.