Distance measuring method, device, electronic device and storage medium

The method secures distance measurement in terminal devices by generating and transmitting secure parameters through a processor's security area to a distance measuring chip, addressing parameter leakage risks and enhancing security in UWB technology.

JP7579370B2Active Publication Date: 2024-11-07BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023008211
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-02-18
Filing Date
2023-01-23
Publication Date
2024-11-07
Estimated Expiration
2043-01-23

AI Technical Summary

Technical Problem

Current terminal devices with UWB technology face security risks in distance measurement and positioning due to potential parameter leakage, compromising user information and property security.

Method used

A method involving a security area in the processor communicatively connected to a distance measuring chip, generating and transmitting distance-measuring security parameters through a secure communication channel, ensuring secure distance measurement by using pre-positioned security parameters and temporary security parameters generated via hashing processes.

Benefits of technology

Enhances security in distance measurement by preventing parameter leakage, safeguarding sensitive operations such as positioning, non-sensitive payments, and unlocking, thereby protecting user information and property.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007579370000001
    Figure 0007579370000001
  • Figure 0007579370000002
    Figure 0007579370000002
  • Figure 0007579370000003
    Figure 0007579370000003
Patent Text Reader

Abstract

To provide a ranging method for avoiding threats to security, an apparatus, an electronic device, and a storage medium.SOLUTION: In a ranging method to be applied to an apparatus including a processor having a security region and a ranging chip, the apparatus is configured to: acquire (S101) a session parameter generated during initial communication between the apparatus and a device to be ranged; generate (S102), in the security region, a ranging security parameter according to the session parameter; send (S103) the ranging security parameter to the ranging chip via a communication channel between the security region and the ranging chip; and generate (S104), by the ranging chip, a ranging time parameter based on the ranging security parameter, and perform ranging communication with the device to be ranged using the ranging time parameter to acquire a ranging result.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of terminal device technology, and in particular to a distance measurement method, device, electronic device, and storage medium. [Background technology]

[0002] Current terminal devices such as smartphones and wearable devices are equipped with UWB technology (Ultra Wide Band, wireless carrier communication technology) that can be applied to distance measurement positioning, which functions in situations such as location sensing, wireless payment, wireless ticket gate passage, wireless unlocking, etc. The above-mentioned situations where distance measurement positioning is applied have high security requirements, but terminal devices of related technologies are prone to security incidents such as parameter leakage when generating parameters for distance measurement positioning, making it impossible to ensure security in the above-mentioned situations and posing a threat to the security of user information and assets. Summary of the Invention [Problem to be solved by the invention]

[0003] To overcome the problems existing in the related art, embodiments of the present disclosure provide a distance measuring method, an apparatus, an electronic device, and a storage medium to solve the deficiencies of the related art. [Means for solving the problem]

[0004] According to a first aspect of an embodiment of the present disclosure, a distance measurement method is provided, which is applied to a terminal device, the terminal device having a processor and a distance measurement chip, the processor having a security domain, the security domain being communicatively connected to the distance measurement chip, and the method includes a step of acquiring session parameters generated during initial communication between the terminal device and a device to be distance measured, a step of generating, within the security domain, distance measurement security parameters based on the session parameters, a step of transmitting the distance measurement security parameters to the distance measurement chip via a communication channel between the security domain and the distance measurement chip, and a step of the distance measurement chip generating a distance measurement time parameter based on the distance measurement security parameter, and using the distance measurement time parameter to perform distance measurement communication with the device to be distance measured, and obtaining a distance measurement result.

[0005] In one embodiment, the method further includes a step of generating a communication channel between the security domain and the distance measuring chip based on a first security parameter pre-arranged in the security domain and a second security parameter pre-arranged in the distance measuring chip.

[0006] In one embodiment, the first security parameter and the second security parameter are both public security parameters, and the step of generating a communication channel between the security domain and the distance measuring chip based on the first security parameter pre-arranged in the security domain and the second security parameter pre-arranged in the distance measuring chip includes a step of generating a communication channel between the security domain and the distance measuring chip based on the public security parameter.

[0007] In one embodiment, the first security parameters include public security parameters, private security parameters, and public security parameters of the security area, and the second security parameters include public security parameters, private security parameters, and public security parameters of the distance measuring chip, and the step of generating a communication channel between the security area and the distance measuring chip based on the first security parameters pre-arranged in the security area and the second security parameters pre-arranged in the distance measuring chip includes the steps of: generating, within the security area, public security parameters based on the first security parameters; the distance measuring chip generating the public security parameters based on the second security parameters; and generating a communication channel between the security area and the distance measuring chip based on the public security parameters.

[0008] In one embodiment, the step of generating a communication channel between the security domain and the distance measuring chip based on the public security parameters includes a step of performing a preset process on the public security parameters within the security domain to generate temporary security parameters, a step of the distance measuring chip performing a preset process on the public security parameters to generate the temporary security parameters, and a step of generating a communication channel between the security domain and the distance measuring chip based on the temporary security parameters.

[0009] In one embodiment, the initial communication process further includes a step of communicating with the device to be measured so as to verify the identity of the terminal device and the device to be measured, and a step of communicating with the device to be measured so as to generate the same session parameters when the identity authentication of the terminal device and the device to be measured is completed.

[0010] According to a second aspect of an embodiment of the present disclosure, there is provided a distance measurement method applicable to a device to be measured, the method including the steps of acquiring session parameters generated during initial communication between the device to be measured and a terminal device, generating distance measurement security parameters based on the session parameters, generating distance measurement time parameters based on the distance measurement security parameters, and using the distance measurement time parameters to perform distance measurement communication with the device to be measured, and obtaining a distance measurement result.

[0011] According to a third aspect of an embodiment of the present disclosure, there is provided a distance measurement device applicable to a terminal device, the terminal device having a processor and a distance measurement chip, the processor having a security area, the security area being communicatively connected to the distance measurement chip, and the device including: a first acquisition module for acquiring session parameters generated during initial communication between the terminal device and a device to be distance measured, a first parameter module for generating, within the security area, a distance measurement security parameter based on the session parameter, a transmission module for transmitting the distance measurement security parameter to the distance measurement chip via a communication channel between the security area and the distance measurement chip, and a second parameter module for controlling the distance measurement chip to generate a distance measurement time parameter based on the distance measurement security parameter, and to perform distance measurement communication with the device to be distance measured using the distance measurement time parameter to obtain a distance measurement result.

[0012] In one embodiment, the device further includes a channel construction module that generates a communication channel between the security domain and the distance measuring chip based on a first security parameter pre-arranged in the security domain and a second security parameter pre-arranged in the distance measuring chip.

[0013] In one embodiment, the first security parameter and the second security parameter are both public security parameters, and the channel construction module specifically generates a communication channel between the security domain and the distance measurement chip based on the public security parameters.

[0014] In one embodiment, the first security parameters include public security parameters, private security parameters, and public security parameters of the security domain, and the second security parameters include public security parameters, private security parameters, and public security parameters of the distance measurement chip, and the channel construction module specifically generates public security parameters based on the first security parameters within the security domain, the distance measurement chip generates the public security parameters based on the second security parameters, and generates a communication channel between the security domain and the distance measurement chip based on the public security parameters.

[0015] In one embodiment, when the channel construction module generates a communication channel between the security domain and the distance measurement chip based on the public security parameters, specifically, within the security domain, it performs a preset process on the public security parameters to generate temporary security parameters, the distance measurement chip performs a preset process on the public security parameters to generate the temporary security parameters, and generates a communication channel between the security domain and the distance measurement chip based on the temporary security parameters.

[0016] In one embodiment, the device further includes a communication module, and performs an initial communication process including the steps of communicating with the device to be measured to verify the identities of the terminal device and the device to be measured, and communicating with the device to be measured to generate the same session parameters when the identities of the terminal device and the device to be measured are authenticated.

[0017] According to a fourth aspect of an embodiment of the present disclosure, there is provided a distance measurement apparatus applicable to a device to be measured, the apparatus including: a second acquisition module for acquiring session parameters generated during initial communication between the device to be measured and a terminal device; a third parameter module for generating a distance measurement security parameter based on the session parameters; and a fourth parameter module for generating a distance measurement time parameter based on the distance measurement security parameter, and using the distance measurement time parameter to perform distance measurement communication with the device to be measured and obtain a distance measurement result.

[0018] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, the electronic device including a memory and a processor, the memory storing computer instructions operable on the processor, and the processor implementing the distance measurement method described in the first or second aspect when executing the computer instructions.

[0019] According to a sixth aspect of an embodiment of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program, the program, when executed by a processor, realising the method of the first or second aspect. Effect of the Invention

[0020] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects.

[0021] The present disclosure can first obtain session parameters generated during initial communication between the terminal device and the device to be measured by connecting the security area of ​​the processor and the distance measurement chip in communication, then generate distance measurement security parameters based on the session parameters in the security area, transmit the distance measurement security parameters to the distance measurement chip through a communication channel between the security area and the distance measurement chip, and finally generate distance measurement time parameters based on the distance measurement security parameters by the distance measurement chip, and use the distance measurement time parameters to perform distance measurement communication with the distance measurement target to obtain distance measurement results. Since the distance measurement security parameters are generated in the security area of ​​the processor and the communication channel between the security area and the distance measurement chip is relatively secure, the distance measurement security parameters are relatively secure before entering the distance measurement chip and will not be leaked, improving the security of the parameters during distance measurement, and further ensuring the security of scenes such as location sensing, undetected payment, undetected ticket gate passage, and undetected unlocking in the distance measurement, and avoiding the security of user information and property being threatened. [Brief description of the drawings]

[0022] The drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification serve to explain the principles of the invention. [Figure 1] 1 is a flowchart of a distance measurement method applied to a terminal device according to an exemplary embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic configuration diagram of a terminal device according to an exemplary embodiment of the present disclosure. [Diagram 3] 1 is a flowchart of a distance measurement method applied to a distance measurement target device shown in an exemplary embodiment of the present disclosure. [Figure 4] 1 is a schematic configuration diagram of a distance measuring device applied to a terminal device shown in an exemplary embodiment of the present disclosure. [Diagram 5] 1 is a schematic configuration diagram of a distance measurement device applied to a device to be distance-measured, shown according to an exemplary embodiment of the present disclosure; [Figure 6] FIG. 1 is a schematic block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the drawings. Where the following description refers to the drawings, the same numerals in different drawings represent the same or similar elements unless otherwise stated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure, as detailed in the appended claims.

[0024] The terms used in this disclosure are merely for the purpose of describing particular embodiments and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It should be understood that the term "and / or" as used herein refers to and includes any and all combinations of one or more of the associated listed items.

[0025] In this disclosure, terms such as first, second, third, etc. may be used to describe various information, but it should be understood that such information should not be limited to these terms. These terms are merely used to distinguish between the same types of information. For example, a first piece of information could be referred to as a second piece of information, and similarly, a second piece of information could be referred to as a first piece of information, without departing from the scope of this disclosure. Depending on the context, the word "if" as used herein can be interpreted as "when" or "in the case of" or "responsive to a determination."

[0026] According to a first aspect, at least one embodiment of the present disclosure provides a distance measurement method, and referring to FIG. 1, it shows a flow of the method, including step S101 and step S104.

[0027] The distance measurement method can be applied to a terminal device shown in FIG. 2. Referring to FIG. 2, the terminal device has a processor 201 and a distance measurement chip 202, the processor has a security domain 2011, for example, a TEE (trusted execution environment), and the security domain 2011 of the processor 201 can be communicatively connected to the distance measurement chip 202, i.e., a communication condition can be provided on the hardware, for example, a communication bus such as SPI or I2C can be used to realize the communication connection between the two. Optionally, the terminal device can be installed with distance measurement software for specifically executing the distance measurement method. The distance measurement method can use UWB technology or other distance measurement technology, and when UWB technology is used, the distance measurement chip can be a UWB chip, and the following steps will take UWB technology as an example to describe the details of the distance measurement method in detail.

[0028] The distance measurement method is used to detect the distance between a terminal device for performing the method and a device to be measured. In one possible scenario, the terminal device may be a smartphone, a tablet computer, a wearable device, etc., and the device to be measured may be a vehicle or a door lock of a room, etc., and the terminal device uses the distance measurement method to realize the operation of the vehicle and the opening of the door lock of the room, thereby using the terminal device as a digital secret key.

[0029] In step S101, session parameters generated during initial communication between the terminal device and a device to be distanced are obtained.

[0030] The initial communication process between the terminal device and the device to be measured for distance is a recognition process between them before distance measurement. The terminal device can execute the initial communication in another area outside the security area of ​​the processor using software for executing the distance measurement method (UWB Key Service, hereinafter abbreviated as distance measurement software UKS). In one possible scenario, the security area of ​​the processor is TEE (trusted execution environment), the other area outside the security area of ​​the processor is REE (Rich Execution Environment), and the distance measurement software UKS has a TA (Trusted Application) part (hereinafter abbreviated as UKS TA) that operates in the security area TEE and a CA (Client Application) part (hereinafter abbreviated as UKS CA) of the other area REE provided outside the security area, and in this scenario, the initial communication can be executed for the UKS CA. The session parameter may be a session secret key.

[0031] Exemplarily, the initial communication process between the terminal device and the device to be measured may use the following method. First, the terminal device communicates with the device to be measured so as to mutually verify the identity of the device to be measured, i.e., during communication, the terminal device verifies whether the device to be measured is a pairing device, and the device to be measured also verifies whether the terminal device is a pairing device. When the terminal device and the device to be measured have completed mutual identity verification (i.e., the verification result of the terminal device is that the device to be measured is its pairing device, and the verification result of the device to be measured is that the terminal device is its pairing device), the terminal device communicates with the device to be measured so as to generate the same session parameters. Note that the communication between the terminal device and the device to be measured may be communication between the distance measurement software and the device to be measured using a communication means such as Bluetooth (registered trademark) or NFC (Near Field Communication, short-range wireless communication technology). The communication between the terminal device and the device to be measured may be communication between the distance measurement software and the device to be measured using a specification such as CCC, FiRa, ICCOA, etc.

[0032] In step S102, within the security domain, a distance measurement security parameter is generated based on the session parameter.

[0033] The ranging software UKS can send the session parameters to the UKS TA in the security domain TEE, and the rules and methods for generating the ranging security parameters are preset in the UKS TA, and the UKS TA generates the ranging security parameters based on the session parameters according to the rules and methods. For example, the session parameters are session secret keys, and the generated ranging security parameters are URSKs (UWB Ranging Secret Keys).

[0034] By generating distance measurement security parameters in a security area within the processor, it is possible to avoid dependency on other chips other than the processor, such as an NFC chip, thereby improving the flexibility of hardware options for terminal devices equipped with UWB distance measurement functions.

[0035] In step S103, the distance measurement security parameters are sent to the distance measurement chip through a communication channel between the security domain and the distance measurement chip.

[0036] Optionally, the UWB chip also has a security domain, i.e., data in the security domain cannot be read by programs in other domains, and a communication channel between the security domain of the processor and the security domain of the UWB chip can be formed between the security domain of the processor and the security domain of the UWB chip, and since the communication channel exists between two security domains, it is relatively secure and communication data delivered within the communication channel will not be leaked.

[0037] In step S104, the distance measurement chip generates a distance measurement time parameter based on the distance measurement security parameter, and uses the distance measurement time parameter to perform distance measurement communication with the device to be distance measured, to obtain a distance measurement result.

[0038] The UWB chip has preset rules and methods for generating the distance measurement time parameter, and the UWB chip generates the distance measurement time parameter based on the distance measurement security parameter according to the rules and methods. For example, the distance measurement security parameter may be URSK, and the distance measurement time parameter may be STS (Scrambled Timestamp Sequence).

[0039] In addition, since the device to be measured also has a UWB chip, the UWB chip of the device to be measured can also generate a distance measurement security parameter, for example, URSK, using the session parameter generated during the initial communication between the terminal device and the device to be measured, and the UWB chip of the device to be measured can further generate a distance measurement time parameter based on the distance measurement security parameter, for example, generate an STS based on the URSK. After the terminal device and the device to be measured generate the same distance measurement time parameter, distance measurement communication can be performed between the UWB chip of the terminal device and the UWB chip of the device to be measured using the distance measurement time parameter such as STS, so that the UWB chip of the terminal device can calculate based on the communication result to obtain the distance measurement result, i.e., the distance between the two, and the UWB chip of the device to be measured can calculate based on the communication result to obtain the distance measurement result, i.e., the distance between the two. When the UWB chip of a terminal device and the UWB chip of a device to be measured perform distance measurement communication, the terminal device can generate a first UWB packet including an STS in accordance with a data rule, and then transmit the first UWB packet to the device to be measured, the device to be measured verifies whether the STS in the first UWB packet is the same as the STS generated by the UWB chip of the device to be measured, and if they are the same, generates a second UWB packet including an STS in accordance with the data rule and returns the second UWB packet to the terminal device, the terminal device verifies whether the STS in the second UWB packet is the same as the STS generated by the UWB chip of the terminal device, and if they are the same, generates a third UWB packet including an STS again based on the data rule, and further transmits the third UWB packet to the device to be measured, thereby completing the distance measurement communication.

[0040] The present disclosure can first obtain session parameters generated during initial communication between the terminal device and the device to be measured by connecting the security area of ​​the processor and the distance measurement chip in communication, then generate distance measurement security parameters based on the session parameters in the security area, transmit the distance measurement security parameters to the distance measurement chip through a communication channel between the security area and the distance measurement chip, and finally the distance measurement chip generates a distance measurement time parameter based on the distance measurement security parameter, and uses the distance measurement time parameter to perform distance measurement communication with the distance measurement target to obtain a distance measurement result. Since the distance measurement security parameters are generated in the security area of ​​the processor and the communication channel between the security area and the distance measurement chip is relatively secure, the distance measurement security parameters are relatively secure before entering the distance measurement chip and will not be leaked, improving the security of the parameters during distance measurement, and further ensuring the security of scenes such as location sensing, unsensing payment, unsensing ticket gate passage, and unsensing unlocking in the distance measurement, and avoiding the security of user information and property being threatened.

[0041] In some embodiments of the present disclosure, before a terminal device is shipped, a first security parameter can be pre-configured in a security domain of the processor, and a second security parameter can be pre-configured in (the security domain of) the distance measuring chip, and the first security parameter and the second security parameter can be secret keys. Based on this, the terminal device can generate a communication channel between the security domain and the distance measuring chip based on the first security parameter pre-configured in the security domain and the second security parameter pre-configured in the distance measuring chip.

[0042] In one possible embodiment, the first security parameter and the second security parameter can be public security parameters, such as symmetric private keys, that is, the first security parameter and the second security parameter are the same private key. In this embodiment, a communication channel can be generated between the security domain and the distance measuring chip according to the public security parameters. The specific generation process of the communication channel can be determined according to the communication specification such as SCP02 or SCP03.

[0043] In another possible embodiment, the first security parameters include public security parameters, private security parameters, and public security parameters of the security domain, and the second security parameters include public security parameters, private security parameters, and public security parameters of the distance measurement chip, and the security domain, for example, the first security parameters and the second security parameters may be asymmetric private keys, and the first security parameters are DEV.PK / SK, UWB.PK, i.e., including the private key and public key of the terminal device and the public key of the device to be measured, and the second security parameters are DEV.PK, UWB.PK / SK, i.e., including the private key and public key of the terminal device and the public key of the device to be measured. In this embodiment, a public security parameter can be generated first in the security domain based on the first security parameter, for example, UKS TA generates a public security parameter secret based on the first security parameter using Diffie-Hellman algorithm, then the distance measuring chip generates the public security parameter based on the second security parameter, for example, UWB chip generates the public security parameter secret based on the second security parameter using Diffie-Hellman algorithm, and finally generates a communication channel between the security domain and the distance measuring chip based on the public security parameter secret. The specific generation process of the communication channel can be determined based on communication specifications such as SCP11.

[0044] In the above two embodiments, when a communication channel is generated between the security domain and the distance measuring chip based on the public security parameter, the public security parameter can be preset in the security domain first to generate a temporary security parameter, for example, the UKSTA uses the public security parameter to perform a hash process on the preset data to obtain a temporary security parameter such as a one-time session secret key, then the distance measuring chip performs a preset process on the public security parameter to generate the temporary security parameter, and the UWB chip can also use the public security parameter to perform a hash process on the preset data to obtain a temporary security parameter such as a one-time session secret key, and finally a communication channel is generated between the security domain and the distance measuring chip based on the temporary security parameter. The method of generating a communication channel using such a temporary security parameter uses the public security parameter as a root secret key, and then generates a one-time session secret key that is valid only this time every time a communication channel is established, thereby protecting the security of the public security parameter, and further protecting the security of the communication channel and the security of the distance measuring security parameter transmitted in the communication channel. In other words, even if a temporary loss or leakage of security parameters occurs during the construction of a communication channel, due to the irreversibility of hash processing, it will not pose a threat to the security of the next communication channel that is constructed.

[0045] According to a second aspect, at least one embodiment of the present disclosure provides a distance measurement method, and referring to FIG. 3, a flow of the method is shown, including step S301 and step S303.

[0046] This method is applied to the device to be distance-measured described in the first aspect.

[0047] In step S301, session parameters generated during initial communication between the device to be measured and a terminal device are obtained.

[0048] In step S302, distance measurement security parameters are generated based on the session parameters.

[0049] In step S303, a distance measurement time parameter is generated based on the distance measurement security parameter, and the distance measurement time parameter is used to perform distance measurement communication with the device to be distance measured, to obtain a distance measurement result.

[0050] Each step of this embodiment has the same specific content as the corresponding step on the terminal device side of the first embodiment, except that each step of this embodiment is completed in the device to be measured, such as a UWB chip.

[0051] According to a third aspect of an embodiment of the present disclosure, there is provided a distance measurement device applicable to a terminal device, the terminal device having a processor and a distance measurement chip, the processor having a security domain, and referring to FIG. 4, the device includes a first acquisition module 401 for acquiring session parameters generated during initial communication between the terminal device and a device to be measured, a first parameter module 402 for generating distance measurement security parameters based on the session parameters within the security domain, a transmission module 403 for transmitting the distance measurement security parameters to the distance measurement chip via a communication channel between the security domain and the distance measurement chip, and a second parameter module 404 for controlling the distance measurement chip to generate a distance measurement time parameter based on the distance measurement security parameter, and to perform distance measurement communication with the device to be measured using the distance measurement time parameter to obtain a distance measurement result.

[0052] In some embodiments of the present disclosure, the device further includes a channel construction module that generates a communication channel between the security domain and the distance measuring chip based on a first security parameter pre-arranged in the security domain and a second security parameter pre-arranged in the distance measuring chip.

[0053] In some embodiments of the present disclosure, the first security parameter and the second security parameter are both public security parameters, and the channel construction module specifically generates a communication channel between the security domain and the distance measuring chip based on the public security parameters.

[0054] In some embodiments of the present disclosure, the first security parameters include public security parameters, private security parameters, and public security parameters of the security domain, and the second security parameters include public security parameters, private security parameters, and public security parameters of the distance measurement chip, and the channel construction module specifically generates public security parameters based on the first security parameters within the security domain, the distance measurement chip generates the public security parameters based on the second security parameters, and generates a communication channel between the security domain and the distance measurement chip based on the public security parameters.

[0055] In some embodiments of the present disclosure, when the channel construction module generates a communication channel between the security domain and the distance measurement chip based on the public security parameters, the channel construction module specifically performs a preset process on the public security parameters within the security domain to generate temporary security parameters, the distance measurement chip performs a preset process on the public security parameters to generate the temporary security parameters, and generates a communication channel between the security domain and the distance measurement chip based on the temporary security parameters.

[0056] In some embodiments of the present disclosure, the communication module further includes a step of performing an initial communication process, including a step of communicating with the device to be measured for distance measurement so as to verify the identities of the terminal device and the device to be measured for distance measurement with each other, and a step of communicating with the device to be measured for distance measurement so that the terminal device and the device to be measured for distance measurement generate the same session parameters when the identity authentication of each other is completed between the terminal device and the device to be measured for distance measurement.

[0057] According to a fourth aspect of an embodiment of the present disclosure, a distance measurement device is provided for application to a device to be measured, and referring to FIG. 5, the device includes a second acquisition module 501 for acquiring session parameters generated during initial communication between the device to be measured and a terminal device, a third parameter module 502 for generating distance measurement security parameters based on the session parameters, and a fourth parameter module 503 for generating distance measurement time parameters based on the distance measurement security parameters, and using the distance measurement time parameters to perform distance measurement communication with the device to be measured and obtain a distance measurement result.

[0058] The specific manner in which each module of the apparatus in the above embodiment performs its operation has already been described in detail in the embodiments relating to the method in the first and second aspects, and will not be described in detail here.

[0059] According to a fifth aspect of the embodiment of the present disclosure, referring to Fig. 6, a block diagram of an electronic device is illustratively shown. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0060] Referring to FIG. 6, device 600 may include one or more components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0061] The processing component 602 typically controls the overall operation of the device 600, such as operations related to display, phone calls, data communication, camera operation, and recording operations. The processing component 602 may include one or more processors 620 for executing instructions to complete all or some of the steps of the above methods. The processing component 602 may also include one or more modules to facilitate processing of interactions with other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the processing component 602 and the multimedia component 608.

[0062] Examples of these data include any application program or method instructions for operating on device 600, contact data, phone book data, messages, images, videos, etc. Memory 604 may be implemented by any type of volatile or non-volatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0063] The power component 606 provides power for each type of component of the device 600. The power component 606 can include a power management system, one or more power sources, and other components related to generating, managing, and allocating power for the device 600.

[0064] The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). When the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel may include one or more touch sensors to sense touch, slide, and touch panel gestures. The touch sensor may not only sense the boundaries of a touch or slide operation, but may also detect the duration and pressure associated with a touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a back camera. When the device 600 is in an operation mode, such as a photo mode or a video mode, the front camera and / or the back camera may receive external multimedia data. Each front camera and back camera may be a fixed optical lens system or may have a focal length and optical zoom capability.

[0065] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC) configured to receive external audio signals when the device 600 is in an operation mode such as a call mode, a record mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 further includes a speaker for outputting audio signals.

[0066] The I / O interface 612 provides an interface between the processing component 602 and a peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.

[0067] The sensor component 614 includes one or more sensors to provide various aspects of status assessment for the device 600. For example, the sensor component 614 can detect the on / off state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and can further detect the position change of the device 600 or one of its components, the presence or absence of contact between the user and the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600 through image detection. The sensor component 614 can further include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor component 614 can further include an optical sensor, such as a CMOS or CCD image sensor used for imaging applications. In some embodiments, the sensor component 614 can further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0068] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0069] In an exemplary embodiment, device 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processors (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described electronic device power supply methods.

[0070] According to a sixth aspect, an exemplary embodiment of the present disclosure further provides a non-transitory computer-readable storage medium including instructions, such as a memory 604 including instructions, which may be executed by a processor 620 of the device 600 to complete the above-mentioned electronic device power supply method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, or an optical data storage device.

[0071] Those skilled in the art may easily conceive of other implementations of the present disclosure after studying the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, applications or adaptations of the present disclosure, which variations, applications or adaptations follow the general principles of the present disclosure and include common general knowledge or commonly used technical means in the art that are not disclosed in the present disclosure. The specification and examples are considered to be merely exemplary, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0072] It should be noted that the present disclosure is not limited to the exact structure described above and illustrated in the drawings, and various modifications and variations can be made without departing from the scope of the present disclosure, which is limited only by the scope of the appended claims.

Claims

1. 1. A distance measurement method, applied to a terminal device, the terminal device having a processor and a distance measurement chip, the processor having a security domain, the security domain being communicatively connected to the distance measurement chip, the method comprising: obtaining session parameters generated during an initial communication between the terminal device and a device to be distanced; generating, within the security domain, distance measurement security parameters based on the session parameters; transmitting said distance measurement security parameters to said distance measurement chip via a communication channel between said security domain and said distance measurement chip; The distance measurement chip generates a distance measurement time parameter based on the distance measurement security parameter, and performs distance measurement communication with the distance measurement target device using the distance measurement time parameter to obtain a distance measurement result; The distance measurement chip has a security area for ensuring that data in the security area of ​​the distance measurement chip cannot be read by a program in another area, and a communication channel between the security area of ​​the processor and the distance measurement chip is formed between the security area of ​​the processor and the security area of ​​the distance measurement chip. A distance measuring method comprising:

2. and generating a communication channel between the security domain of the processor and the distance measuring chip based on a first security parameter pre-configured in the security domain of the processor and a second security parameter pre-configured in the distance measuring chip.

2. The distance measuring method according to claim 1 .

3. the first security parameter and the second security parameter are both common security parameters; The step of generating a communication channel between the security domain of the processor and the distance measuring chip based on a first security parameter pre-configured in the security domain of the processor and a second security parameter pre-configured in the distance measuring chip includes: generating a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameter; 3. The distance measuring method according to claim 2.

4. the first security parameters include a public security parameter, a private security parameter, and a public security parameter of the security domain of the processor, and the second security parameters include a public security parameter, a private security parameter, and a public security parameter of the distance measurement chip, and the second security parameters include a public security parameter, a private security parameter, and a public security parameter of the security domain of the processor, The step of generating a communication channel between the security domain of the processor and the distance measuring chip based on a first security parameter pre-configured in the security domain of the processor and a second security parameter pre-configured in the distance measuring chip includes: generating a common security parameter based on the first security parameter within a security domain of the processor; generating the common security parameter based on the second security parameter by the distance measuring chip; and generating a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameter.

3. The distance measuring method according to claim 2.

5. generating a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameter, performing a preset process on the common security parameters within a security domain of the processor to generate temporary security parameters; the distance measuring chip performs preset processing on the common security parameter to generate the temporary security parameter; and generating a communication channel between the security domain of the processor and the distance measuring chip based on the temporary security parameter.

5. The distance measuring method according to claim 3 or 4.

6. communicating with the device to be distanced such that the terminal device and the device to be distanced verify each other's identity; When the identity authentication between the terminal device and the distance measurement target device is completed, the terminal device and the distance measurement target device generate the same session parameters, and the initial communication process further includes the step of communicating with the distance measurement target device.

2. The distance measuring method according to claim 1 .

7. A distance measurement device, which is applied to a terminal device, the terminal device having a processor and a distance measurement chip, the processor having a security domain, the security domain being communicatively connected to the distance measurement chip, the distance measurement device comprising: a first acquisition module for acquiring session parameters generated during an initial communication between the terminal device and a device to be distanced; a first parameter module for generating a distance measurement security parameter based on the session parameter within the security domain; a transmitting module for transmitting the distance measurement security parameters to the distance measurement chip via a communication channel between the security domain and the distance measurement chip; a second parameter module for controlling the distance measurement chip to generate a distance measurement time parameter based on the distance measurement security parameter, and to perform distance measurement communication with the device to be distance measured using the distance measurement time parameter to obtain a distance measurement result; The distance measurement chip has a security area for ensuring that data in the security area of ​​the distance measurement chip cannot be read by a program in another area, and a communication channel between the security area of ​​the processor and the distance measurement chip is formed between the security area of ​​the processor and the security area of ​​the distance measurement chip. A distance measuring device comprising:

8. and a channel construction module that generates a communication channel between the security domain of the processor and the distance measuring chip based on a first security parameter pre-configured in the security domain of the processor and a second security parameter pre-configured in the distance measuring chip.

8. A distance measuring device according to claim 7.

9. the first security parameter and the second security parameter are both common security parameters; The channel construction module includes: generating a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameter; 9. A distance measuring device according to claim 8.

10. the first security parameters include a public security parameter, a private security parameter, and a public security parameter of the security domain of the processor, and the second security parameters include a public security parameter, a private security parameter, and a public security parameter of the distance measurement chip, and the second security parameters include a public security parameter, a private security parameter, and a public security parameter of the security domain of the processor, The channel construction module includes: generating a common security parameter based on the first security parameter within a security domain of the processor; the distance measuring chip generates the common security parameter based on the second security parameter; generating a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameter; 9. A distance measuring device according to claim 8.

11. when the channel construction module creates a communication channel between the security domain of the processor and the distance measuring chip based on the common security parameters, performing a preset process on the common security parameters within a security domain of the processor to generate temporary security parameters; The distance measuring chip performs a preset process on the common security parameter to generate the temporary security parameter; generating a communication channel between the security domain of the processor and the distance measuring chip based on the temporary security parameter; 11. A distance measuring device according to claim 9 or 10.

12. communicating with the device to be distanced such that the terminal device and the device to be distanced verify each other's identity; and when the identity authentication between the terminal device and the distance measurement target device is completed, communicating with the distance measurement target device so that the terminal device and the distance measurement target device generate the same session parameters.

8. A distance measuring device according to claim 7.

13. An electronic device, The electronic device includes a memory and a processor, the memory storing computer instructions operable on the processor, the processor implementing the distance measuring method according to claim 1 when executing the computer instructions. An electronic device characterized by:

14. A computer-readable storage medium having a computer program stored thereon, The computer program, when executed by a processor, implements the method of claim 1. A computer-readable storage medium comprising:

Citation Information

Patent Citations

  • Data communication method using secure element and electronic system adopting the same

    US20160294826A1

  • Security chip and application processor

    US20170214662A1

  • Method and electronic device for managing digital keys

    US20210176230A1

  • Upper layer device architecture for ultra-wide band enabled device

    WO2021089195A1