Method and electronic device for verifying application

By using trusted public keys between electronic devices to determine the authenticity of applications, the problem of application authenticity identification in remote calls is solved, the security and efficiency of interactions are improved, and information leakage is prevented.

CN114692119BActive Publication Date: 2025-10-03HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011626815.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-10-03
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

When making remote calls between electronic devices, the authenticity of the application on another device cannot be effectively identified, resulting in user information leakage.

Method used

The public key of the second device application is obtained through the first electronic device, the authenticity of the application is determined using the trusted public key, and data interaction is performed after the trustworthiness is determined to avoid calling untrusted applications.

Benefits of technology

It improves the security of cross-device application interaction, prevents user information leakage, and simplifies the application authenticity verification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114692119B_ABST
    Figure CN114692119B_ABST
Patent Text Reader

Abstract

The present application provides a method and electronic device for verifying an application. The method is applied to a system including a first electronic device and a second electronic device. The first electronic device has a first application installed, and the second electronic device has a second application installed. In response to a user operation, the first electronic device obtains the public key of the second application and determines the authenticity of the second application based on the trusted public key and the obtained public key. If the second application is determined to be trustworthy, the first data is sent to the second electronic device. The second electronic device calls the second application to process the first data and provides feedback to the first electronic device. This technical solution can verify the authenticity of another application across devices and avoid the leakage of user information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a method for verifying an application and an electronic device. Background Art

[0002] With the development of technology, it is becoming increasingly common for people to own multiple electronic devices, which can collaborate with each other to provide better services for users. For example, a first application on electronic device A can remotely access a second application on electronic device B. However, if the second application installed on electronic device B is not installed from a reliable application market, the authenticity of the second application cannot be guaranteed. If the second application is a counterfeit application, the first application on electronic device A calling the counterfeit second application may lead to the leakage of user information. Summary of the Invention

[0003] An embodiment of the present application provides a method and electronic device for verifying applications. When an application in an electronic device calls another application in another electronic device, the authenticity of the other application can be identified, that is, the authenticity of the other application can be verified across devices, thereby avoiding the leakage of user information.

[0004] In a first aspect, a method for verifying an application is provided. The method is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device has a first application installed in it and the second electronic device has a second application installed in it. The method includes: the first electronic device detecting a first operation of the user on the first application; the first electronic device obtaining a first public key of the second application in response to the first operation; the first electronic device judging the authenticity of the second application based on the first public key and the second public key; the first electronic device sending first data to the second electronic device if it is judged that the second application is trustworthy; the second electronic device calling the second application to process the first data; and the second electronic device sending second data to the first electronic device.

[0005] In the embodiment of the present application, the first electronic device and the second electronic device may be associated via a wired or wireless connection. The first public key is the public key used by the second electronic device to verify the second application when installing the second application. The second public key is a trusted public key of the second application, such as that obtained by searching the official website of the second application. The trusted public key can also be understood as a real public key.

[0006] The first data may be related to the requirements, type, etc. of the first application. For example, if the first application needs to call the second application to perform a payment function, the first data may be data information related to payment.

[0007] The second data is associated with the first data. The second data may be a message indicating that the second electronic device has completed processing the first data, or may be data information after the second electronic device has completed processing the first data. This embodiment of the present application is not limited to this.

[0008] Based on this technical solution, in response to a user's operation, the first electronic device obtains the public key of the second application and determines the authenticity of the second application based on the trusted public key and the obtained public key. If the second application is determined to be trustworthy, the first data related to the first application is sent to the second electronic device. The second electronic device then calls the second application to process the first data and provides feedback to the first electronic device. This technical solution can prevent the leakage of user information and improve the security of the interaction between the first and second electronic devices.

[0009] In combination with the first aspect, in an implementation of the first aspect, the first electronic device determines the authenticity of the second application based on the first public key and the second public key, including: when the first public key and the second public key are consistent, determining that the second application is a trusted application; when the first public key and the second public key are inconsistent, determining that the second application is a counterfeit application.

[0010] Based on this technical solution, electronic devices can use the public key information of the second application to verify the authenticity of the second application across devices without the need for other computing overhead, such as hash operations, which simplifies the process of verifying the authenticity of applications across devices and improves the efficiency of verifying the authenticity of applications across devices.

[0011] In combination with the first aspect, in an implementation of the first aspect, the first electronic device obtains the first public key of the second application in response to the first operation, including: obtaining the first public key according to the application identifier of the second application.

[0012] In combination with the first aspect, in an implementation of the first aspect, the first electronic device obtains the first public key of the second application in response to the first operation, including: sending a public key acquisition request message to the second electronic device, where the public key acquisition request message is used to obtain the first public key; and receiving the first public key sent by the second electronic device in response to the public key acquisition request message.

[0013] In combination with the first aspect, in an implementation of the first aspect, the public key acquisition request message also includes a second public key, and receiving the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device in response to the public key acquisition request message and verifying that the second public key is a trusted public key.

[0014] Based on the embodiment of the present application, the second electronic device sends the first public key to the first electronic device only after verifying that the second public key is trustworthy. This technical solution can improve the security of information interaction.

[0015] In combination with the first aspect, in an implementation of the first aspect, the public key acquisition request message also includes a third public key, which is the public key used by the first electronic device to verify the first application, and the receiving of the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device in response to the public key acquisition request message and verifying that the third public key is a trusted public key.

[0016] Based on the embodiment of the present application, the second electronic device will send the first public key to the first electronic device only after verifying that the first application is trustworthy, thereby avoiding the leakage of user information when the first application is an untrustworthy application, thereby improving the security of information interaction.

[0017] In combination with the first aspect, in an implementation of the first aspect, the public key acquisition request message includes a second public key and a third public key, the third public key is the public key used to verify the first application in the first electronic device, and the receiving of the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device after verifying that the second public key and the third public key are trusted public keys in response to the public key acquisition request message.

[0018] The technical solutions in the embodiments of the present application can further improve the security of the interaction between the first electronic device and the second electronic device.

[0019] In combination with the first aspect, in one implementation of the first aspect, the second public key is stored in the source code of the first application; or the second public key is stored in the system storage space of the first application; or the second public key is stored in the configuration file of the first application; or the second public key is stored in the cloud.

[0020] The cloud in the embodiment of the present application may be a server of the first application, for example, a server provided by the developer of the first application, in which the second public key is stored.

[0021] In combination with the first aspect, in an implementation manner of the first aspect, the second public key and the application identifier of the second application are stored in the source code of the first application in the form of a comparison list.

[0022] In combination with the first aspect, in an implementation of the first aspect, the second data is used to indicate that the processing of the first data is completed; or, the second data is data after the processing of the first data is completed.

[0023] In combination with the first aspect, in an implementation manner of the first aspect, the first application and the second application have the same application name.

[0024] In combination with the first aspect, in an implementation manner of the first aspect, the first application and the second application are different types of applications.

[0025] In a second aspect, a method for verifying an application is provided. The method is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device has a first application installed in it and the second electronic device has a second application installed in it. The method includes: the first electronic device detecting a first operation of the user on the first application; the first electronic device obtaining a first public key of the second application in response to the first operation; the first electronic device judging the authenticity of the second application based on the first public key and the second public key; and the first electronic device prompting the user that the second application is untrustworthy when judging that the second application is untrustworthy.

[0026] Based on the embodiment of the present application, in response to the user's operation, the first electronic device obtains the public key of the second application, and determines the authenticity of the second application based on the trusted public key and the obtained public key. If the second application is judged to be untrustworthy, the user is prompted that the second application is untrustworthy, thereby avoiding the leakage of user information.

[0027] In a third aspect, an electronic device is provided, comprising one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the function of the first electronic device in the method for verifying an application as described in the first aspect and any possible implementation thereof to be executed, or the function of the first electronic device in the method for verifying an application as described in the second aspect to be executed.

[0028] In a fourth aspect, an electronic device is provided, comprising one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by one or more processors, enable the function of the second electronic device in the method for verifying an application as described in the first aspect and any possible implementation thereof to be executed, or the function of the second electronic device in the method for verifying an application as described in the second aspect to be executed.

[0029] In a fifth aspect, a chip is provided, which is arranged in a first electronic device, and the chip includes a processor and a communication interface, the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the method for verifying the application as described in the first aspect and any possible implementation thereof is executed, or the method for verifying the application as described in the second aspect is executed.

[0030] In a sixth aspect, a chip is provided, which is arranged in a second electronic device, the chip including a processor and a communication interface, the communication interface being used to receive a signal and transmit the signal to the processor, the processor processing the signal so that the method for verifying an application as described in the first aspect and any possible implementation thereof is executed, or the method for verifying an application as described in the second aspect is executed.

[0031] In the seventh aspect, a computer-readable storage medium is provided, in which computer instructions are stored. When the computer instructions are run on a computer, the method for verifying an application as described in the first aspect and any possible implementation thereof is executed, or the method for verifying an application as described in the second aspect is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a structural diagram of an electronic device provided in an embodiment of the present application.

[0033] Figure 2 This is a software structure block diagram of the electronic device provided in the embodiment of the present application.

[0034] Figure 3 A schematic diagram of an electronic device installation application provided in an embodiment of the present application.

[0035] Figure 4 A schematic diagram of another electronic device installation application provided in an embodiment of the present application.

[0036] Figure 5 This is a schematic flowchart of a method for verifying an application provided in an embodiment of the present application.

[0037] Figure 6 This is a schematic diagram of a set of GUIs provided in an embodiment of the present application.

[0038] Figure 7 This is a schematic diagram of another set of GUIs provided in an embodiment of the present application.

[0039] Figure 8 This is a schematic flowchart of a method for verifying an application provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features.

[0042] The verification application method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0043] For example, Figure 1: The figure shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0044] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0045] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0046] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0047] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0048] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0049] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0050] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0051] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0052] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0053] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0054] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0055] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0056] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0057] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0058] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0059] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0060] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0061] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0062] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0063] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0064] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0065] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0066] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0067] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0068] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0069] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0070] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0071] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0072] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0074] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0075] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0076] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0077] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0078] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0079] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0080] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0081] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0082] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0083] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0084] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0085] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0086] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0087] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0088] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0089] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0090] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0091] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.

[0092] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0093] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0094] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0095] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0096] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0097] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0098] Figure 2 This is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0099] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0100] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0101] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a package manager service (PMS), a public key acquisition module, and the like.

[0102] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0103] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0104] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0105] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0106] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0107] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0108] The PMS manages the installation and uninstallation of applications. For example, when installing an application, it verifies the application's digital signature and stores the application's public key information and the corresponding relationship between the application.

[0109] The public key acquisition module is used to provide an interface for the application, so that the application can obtain the public key information of the application of the remote device through the interface.

[0110] For example, when application A in electronic device A calls application B in electronic device B, application A can send a request message to electronic device A. Electronic device A accesses another electronic device B through the public key acquisition module based on the request message of application A, thereby obtaining the public key information of application B in electronic device B. In this way, electronic device A can verify the authenticity of application B to avoid leakage of user information.

[0111] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0112] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0113] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0114] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0115] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0116] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0117] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0118] A 2D graphics engine is a drawing engine for 2D drawings.

[0119] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0120] For ease of understanding, the following examples of this application will be described with Figure 1 and Figure 2 Taking the electronic device with the structure shown as an example, the verification application method provided in the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.

[0121] Before introducing the embodiments of the present application, some professional terms involved in the present application are briefly introduced.

[0122] 1. Android Application Package (APK): This is an application package file format used by the Android operating system for distributing and installing mobile applications and middleware. To run an Android application on an Android device, the code must first be compiled and packaged into a file recognized by the Android system. This file format, recognized and executed by the Android system, is called an APK. An APK consists of XML, resource files, and a dex (binary bytecode) file.

[0123] 2. Digital digest: This converts a message of any length into a short message of fixed length. It is similar to a function whose independent variable is the message, also known as a hash function. A digital digest uses a one-way hash function to "summarize" the plaintext to be encrypted into a fixed-length ciphertext. This ciphertext is also called a digital fingerprint. It has a fixed length, and different plaintext summaries always produce different ciphertexts. However, the digital digest of the same plaintext is always the same.

[0124] Simply put, for data of any length, after calculating it through a Hash algorithm, you can get binary data of a fixed length. This data is called a "digital summary".

[0125] 3. Digital Signature: This is a process of performing another encryption on the basis of the digital summary. The encrypted data of the digital summary can be called a "digital signature." This digital signature can also be called digital signature information or signature information.

[0126] When installing an application (App), an electronic device needs to ensure the authenticity of the source of the APP's APK file and that the APK file has not been maliciously tampered with by a third party after being digitally signed. Therefore, developers can digitally sign the APK file. When installing the application, the electronic device verifies the digital signature and only installs the application after the verification passes. This ensures that the application has not been tampered with after being digitally signed. The authenticity of the APK file can be verified by a reliable third-party organization.

[0127] 4. Public key and private key: A public key and a private key are a key pair (one public key and one private key) derived from an algorithm. One key is publicly available, called the public key; the other is kept private, called the private key. When using this key pair, if you encrypt data with one key, you must decrypt it with the other. For example, if you encrypt data with the public key, you must decrypt it with the private key. Similarly, if you encrypt data with the private key, you must decrypt it with the public key; otherwise, decryption will fail.

[0128] Figure 3 This is a schematic diagram of an electronic device installation application provided by an embodiment of the present application. Figure 3 As shown, when developing an application, the developer of the application writes the digital signature into the APK file of the application. When electronic device A installs the application App1, it needs to verify the digital signature of the application to ensure the security of the application.

[0129] For example, the developer's digital signature process for the APK file is as follows:

[0130] (1) Calculate the digital summary. The developer of App1 performs a hash operation on the APK file of App1 to obtain the digital summary of the APK file.

[0131] Among them, a hash algorithm such as MD5 and SHA1 can be used to perform a hash operation on the APK file to obtain a digital summary of the APK file.

[0132] (2) Calculate the digital signature. The developer encrypts the digital summary using a key-based asymmetric encryption algorithm to obtain a digital signature.

[0133] Among them, developers can encrypt the digital summary through the private key.

[0134] (3) Write the digital signature. The developer writes the digital signature of App1 into the signature block of the APK file.

[0135] The process of electronic device verification of digital signature is as follows:

[0136] (1) Calculate the digital summary. The electronic device performs a hash operation on the APK file of App1 using the hash algorithm used by the developer to calculate the digital summary, and obtains the digital summary of the APK file.

[0137] (2) Decrypt the digital signature. The electronic device uses the public key to decrypt the digital signature and obtain a digital summary.

[0138] (3) Compare the digital digests. The electronic device compares the calculated digital digest with the digital digest decrypted by the public key to see if they are the same.

[0139] If the two are the same, the verification passes; if they are different, the verification fails, indicating that the APK file has been tampered with by a third party and is not a safe APK file.

[0140] After the verification is passed, the electronic device saves the application identifier of App1 (eg, the package name of the App) and the public key in the form of a key-value pair or a comparison list to the system storage space.

[0141] It's worth noting that during the verification process, the electronic device needs to know the public key corresponding to the developer's private key, as well as the hash algorithm used by the developer. If both the digital signature and the public key are tampered with, it becomes a counterfeit application. While the electronic device will still verify the counterfeit application when installing it, the application will be unsafe. In this case, if an application on another electronic device calls the unsafe application, user information will be leaked, threatening user information security.

[0142] Therefore, an embodiment of the present application provides a method for verifying applications, which can identify the authenticity of another application when an application in an electronic device calls another application in another electronic device, that is, can realize cross-device verification of application authenticity.

[0143] Figure 4 This is a schematic diagram of another electronic device installation application provided by the embodiment of the present application. Figure 4 As shown in (a) of the figure, when developing application App1, in addition to writing the digital signature into App1's APK file, the application developer can also write the public keys of multiple applications that App1 can access into App1's APK file. For example, the public keys of App2, App3, or more apps can be written into App1's APK file.

[0144] In one possible implementation, App1 can be a shopping app, such as Huawei Mall, Taobao, or JD.com. App1 can also be a short video or live streaming app, such as Douyin or Kuaishou. App2 and App3 can be payment apps, such as Huawei Wallet or Alipay. This embodiment of the present application does not specifically limit this. In this case, since the shopping App1 will need to use the payment function in the future, the developer of App1 can write the public keys of various payment apps that may be used in the future into the APK file of App1 to provide convenience for users when using App1 for shopping.

[0145] In another possible implementation, App1 may be a video app, such as Huawei Video, and App2 and App3 may be input method apps, such as Huawei Input Method, iFlytek Input Method, etc. For example, when a user is watching a video on a large-screen device such as a smart screen, App1 may be used to enter comments or barrages to interact with other users. This improves the efficiency of interaction without affecting the user's viewing experience.

[0146] In another possible implementation, App1 and App2 may be applications of the same type, such as the same application in different electronic devices.

[0147] For example, in another possible implementation, App1 can be a large-screen device, such as a video application in a smart screen, such as Huawei Video, and App2 can be a video application in the user's electronic device, such as Huawei Video in a mobile phone. When the user opens Huawei Video in the smart screen, the historical playback record of Huawei Video in the mobile phone can be called, thereby giving the user a more convenient experience. The method for verifying applications in the embodiment of the present application can also be applied to other scenarios that require cross-device application calling, and the embodiment of the present application is not limited to this.

[0148] In the embodiment of the present application, the electronic device can be an electronic device with an Android operating system, an IOS operating system, a Hongmeng operating system, a Microsoft operating system, a Symbian operating system, etc., such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality / virtual reality device, a laptop computer, a super mobile personal computer, a netbook, a personal digital assistant, a large-screen device such as a smart screen, a smart TV, etc., and the embodiment of the present application is not limited to this.

[0149] In some cases, the public keys of the same application in different operating systems may be different. In this case, the developer of App1 can write the public keys of the application in various operating systems into the APK file of App1.

[0150] For example, the public key of App2 in an electronic device with an Android operating system is public key A1, the public key in an electronic device with an iOS operating system is public key A2, and the public key in an electronic device with a Hongmeng operating system is public key A3. The developer of App1 can write the public key A1, public key A2, and public key A3 of App2 in different operating systems into the APK file of App1. These multiple public keys can correspond to App2 in a list or other form. In some cases, the public key of the same application in electronic devices with different operating systems may also be the same, and this embodiment of the application does not specifically limit this.

[0151] In one example, when developing application App1, the developer writes the identifiers (such as package names) of App2 and App3 and the corresponding public keys into the source code of App1 in the form of a comparison list, and then compiles and builds the App1 source code to generate an APK file.

[0152] For example, the package name of App2 is package name 2, and the public key is public key 2; the package name of App3 is package name 3, and the public key is public key 3. The comparison list can be shown in Table 1.

[0153] Table 1

[0154] Package Name Public Key Package name 2 Public Key 2 Package name 3 Public Key 3

[0155] It should be understood that the public key of the App can be obtained through its official website or other channels.

[0156] It should be understood that when App2 and App3 have multiple public keys, such as multiple public keys in different operating systems, the identifiers of App2 and App3 may correspond to the multiple public keys respectively.

[0157] It should be understood that when electronic device A installs application App1, it still needs to verify the digital signature of the application to ensure the security of the application. The specific process can be referred to Figure 3 The relevant description in will not be repeated here.

[0158] In another example, the public key 2 and public key 3 can also be used as a configuration file of App1. When App1 needs to access App2, it can call the configuration file to obtain the public key 2; when App1 needs to access App3, it can call the configuration file to obtain the public key 3; or the public key 2 and public key 3 are stored in the cloud, and App1 can obtain the public key 2 and public key 3 from the cloud by accessing the server. This embodiment of the present application is not limited to this.

[0159] like Figure 4 As shown in (b) in the figure, similarly, when electronic device B installs the App, it also needs to verify the digital signature of the App to ensure the security of the App. After the verification is passed, the App package name and the corresponding public key are stored in the system storage space in the form of a key-value pair. The specific process can be referred to Figure 3 The relevant description in will not be repeated here.

[0160] It is worth noting that electronic device A has a public key acquisition module, which can provide a system interface for the application to obtain the public key information of the remote device, and electronic device B provides a system interface that allows the application in the remote device to obtain the public key of the specified application. Therefore, device A can remotely call the system interface on device B through the public key acquisition module to obtain the public key of the corresponding App.

[0161] Among them, since electronic device B stores the App's identifier (such as package name) and the corresponding public key in the system storage space in the form of a key-value pair when installing the application, when the application in electronic device A remotely accesses the system interface for obtaining the public key provided by electronic device B through the public key acquisition module, it can query its corresponding public key information based on the application's identifier.

[0162] The App's identifier and corresponding public key may also be stored in the system storage space of the electronic device in a comparison list or other form, and this embodiment of the present application does not specifically limit this.

[0163] It should be understood that electronic device A can also provide a system interface that allows applications in remote devices to obtain the public key of a specified application, thereby allowing other devices to remotely obtain the public key of the installed application in electronic device A. Electronic device B can also have a public key acquisition module, which is not limited in this embodiment of the present application.

[0164] This application does not limit the connection method between electronic device A and electronic device B. For example, electronic device A can be associated with electronic device B via wired or wireless means, and electronic device A can also be associated with electronic device B through a server.

[0165] The wireless transmission method may be Bluetooth, cellular, ultra-wideband (UWB), Wi-Fi, near-field communication (NFC), etc. Alternatively, the wired transmission method may be Ethernet, power line, etc. Alternatively, electronic device A and electronic device B are connected to the same server and data is transferred through the server.

[0166] Based on the embodiment of the present application, when application App1 in electronic device A remotely accesses application App2 in electronic device B, App1 will obtain the public key information of App2 installed in electronic device B through the public key acquisition module, and compare the public key information with the public key information of App2 stored in App1. If the two are consistent, it means that App2 installed in electronic device B is not a counterfeit application, and App2 is a safe application that users can use with confidence; if the two are inconsistent, it means that App2 installed in electronic device B is a counterfeit application. At this time, App1 can prompt the user that App2 installed in electronic device B is not trustworthy, thereby avoiding user information leakage and protecting user privacy. Moreover, this technical solution does not require certification from a third-party authority or other calculation processes to identify the authenticity of App2, thereby simplifying the process of verifying application authenticity across devices.

[0167] Figure 5 This is a schematic flow chart of a method for verifying an application provided in an embodiment of the present application. Figure 5 As shown, App1 is installed in the electronic device A, and App2 is installed in the electronic device B. The method may include steps 310 to 370.

[0168] 310. The developer pre-generates the public key a of App2 in App1.

[0169] When developing App1, the developer may write the identifier of App2 (eg, package name APK2) and the public key a into the source code of App1 in the form of a comparison list.

[0170] It should be understood that the developer can write the identifiers and public keys of multiple apps that App1 can access into App1's source code. When a user installs App1, the apps they can access are the apps corresponding to the public keys written in the source code by the developer. In other words, the apps they can access are fixed. If App1 subsequently needs to access more apps or needs to change the apps it can access, it can be upgraded.

[0171] For example, the developer can add the public key of the App that needs to be accessed to its source code, or remove the public key of the App that can be accessed from the source code of App 1. The user only needs to reinstall the App 1 or update the App 1.

[0172] Optionally, in an embodiment of the present application, the public key a of App2 can also be used as a configuration file of App1. When App1 needs to access App2, it can call the configuration file to obtain the public key a; or the public key a of App2 is stored in the cloud, and App1 can obtain the public key a from the cloud by accessing the server. This embodiment of the present application is not limited to this.

[0173] 320 , electronic device A detects an operation of App1 calling App2.

[0174] For example, the electronic device A is a tablet, the App1 is Huawei Mall, the electronic device B is a mobile phone, the App2 is Huawei Wallet, and the operation of App1 calling App2 can be that the user clicks a payment function button or control in the payment interface of Huawei Mall, etc.

[0175] 330 , after detecting that App1 calls App2, electronic device A obtains the public key b of App2 installed in electronic device B.

[0176] Among them, electronic device A remotely accesses the system interface in electronic device B through the public key acquisition module, which allows the application in the remote device to obtain the public key of the specified application, and obtains the public key b by querying the identifier of App2 (such as the package name). The remote device here may refer to an electronic device other than electronic device B, and the remote device is associated with electronic device B. The remote device in the embodiment of the present application may refer to electronic device A.

[0177] The connection method between the electronic device A and the electronic device B is not limited. For example, the electronic device A can be associated with the electronic device B via a wired or wireless method, or the electronic device A can be associated with the electronic device B via a server.

[0178] The wireless transmission method may be Bluetooth, cellular, UWB, Wi-Fi, NFC, etc. Alternatively, the wired transmission method may be Ethernet, power line, etc. Alternatively, electronic device A and electronic device B are connected to the same server and data is transferred through the server.

[0179] Optionally, step 330 may include steps 331 and 332 .

[0180] 331 , after detecting that App1 calls App2, electronic device A sends a public key acquisition request message to electronic device B.

[0181] Among them, electronic device A can directly send a public key acquisition request message to electronic device B to obtain the public key of App2 installed in electronic device B.

[0182] Optionally, the public key acquisition request message can carry App2's public key a, pre-stored in App1, to facilitate electronic device B's verification of the authenticity of App1 installed in electronic device A. If electronic device B determines that App2's public key a, pre-stored in App1, is different from the public key b in the system, electronic device B denies electronic device A access to App2's public key b. This prevents the leakage of user information.

[0183] Alternatively, the public key request message may also carry the public key of App1. The public key of App1 is pre-stored in the electronic device B. When the electronic device B determines that the public key of App1 is different from the public key of App1 pre-stored in the system, it prompts the user that App1 is not trustworthy. This technical solution can avoid the leakage of user information when the caller is a counterfeit application.

[0184] Alternatively, after receiving the public key acquisition request message from electronic device A, electronic device B obtains the trusted public key of App1 from the official website of App1 to verify the authenticity of App1.

[0185] It should be understood that electronic device B can access the official website of App1 and query the public key of App1 from the official website. Therefore, the public key is a real and trustworthy public key.

[0186] 332 , electronic device B sends the public key b of App2 to electronic device A in response to the public key acquisition request message.

[0187] After receiving the public key acquisition request message, electronic device B can directly send the public key b of App2 to electronic device A.

[0188] Optionally, when electronic device B determines that the public key a of App2 pre-stored in App1 is consistent with the public key b stored in the system, it may send the public key b of App2 to electronic device B. Alternatively, when electronic device B determines that the public key of App1 is consistent with the public key stored in the system, it may send the public key of App2 to electronic device B.

[0189] Alternatively, electronic device B may send the public key of App2 to the electronic device when determining that the public key of App1 is consistent with the public key of App1 stored in the system and the public key of App2 pre-stored in App1 is consistent with the public key of App2 stored in the system.

[0190] 340, App1 compares public key a and public key b to see if they are the same.

[0191] Among them, if public key a and public key b are the same, it means that App2 installed in electronic device B is not a counterfeit application and the user can use it with confidence; if public key a and public key b are different, it means that App2 installed in electronic device B is a counterfeit application. At this time, App1 can prompt the user that App2 installed in electronic device B is not trustworthy, thereby avoiding user information leakage and protecting user privacy.

[0192] 350. Electronic device A sends data information to electronic device B.

[0193] Among them, electronic device A can send data information that needs to be executed in App2 to electronic device B.

[0194] For example, when App2 needs to be called for payment, the data information may be payment-related data, such as order number, payment amount, payee, and the like.

[0195] 360. Electronic device B calls App2 to process the data contained in the data information.

[0196] After receiving the data information, electronic device B can open App2 to process the corresponding data to execute the corresponding function.

[0197] For example, App2 is Huawei Wallet, and electronic device B opens Huawei Wallet to execute the payment function.

[0198] 370. After App2 finishes processing the data, electronic device B sends an execution completion message to electronic device A.

[0199] Based on the embodiment of the present application, when developing App1, the developer can write the public key information of multiple apps into the source code of App1, that is, pre-make the public key information of multiple apps in App1. When App1 in electronic device A calls App2 installed in electronic device B, electronic device A will obtain the public key b of App2 installed in electronic device B, and then compare the public key b with the public key a of App2 pre-made in App1. If public key a and public key b are the same, the user can use it with confidence. If public key a and public key b are different, it means that App2 installed in electronic device B is a counterfeit application and cannot be trusted. This technical solution can identify the authenticity of another application when an application in an electronic device calls another application in another electronic device, thereby avoiding user information leakage and protecting user privacy. In addition, this technical solution can identify the authenticity of another application without the need for certification by a third-party authority, simplifying the process of verifying the authenticity of the application.

[0200] Figure 6 is a schematic diagram of a set of graphical user interfaces (GUIs) provided in an embodiment of the present application. Figure 6 (a) to (d) in the figure show the process of an application in a tablet computer calling another application in a mobile phone.

[0201] In an embodiment of the present application, a user uses a tablet computer to shop. For example, the user uses the tablet computer to shop in Huawei Mall. When making a payment on the payment interface, the user selects Huawei Wallet payment (or Huawei Pay) as the payment method. However, Huawei Wallet is not installed on the tablet computer. Therefore, the tablet computer can remotely access Huawei Wallet in the user's mobile phone to make a payment.

[0202] In the embodiment of the present application, there is no limitation on the connection method between the tablet and the mobile phone. For example, the tablet can be associated with the mobile phone via a wired or wireless method, or the tablet can be associated with the mobile phone via a server.

[0203] The wireless transmission method may be Bluetooth, cellular, UWB, Wi-Fi, NFC, etc. Alternatively, the wired transmission method may be Ethernet, power line, etc. Alternatively, the tablet and mobile phone are connected to the same server and data is transferred through the server.

[0204] See also Figure 6In (a), the GUI is the payment interface 710 of the tablet 700a. The payment interface 710 may display "Huawei Cashier" and the amount to be paid "¥100.50" above. The payment interface 710 may also include function controls 701, 702, 703, 704, etc. for users to select different payment methods. Users can also select other payment methods, such as adding a new bank card, etc. A prompt box 705 may be displayed below the function control of the payment method to remind the user of the amount to be paid "¥100.50 to be paid". When the tablet detects that the user clicks on the Huawei Wallet payment 704, it may display the following Figure 6 The GUI shown in (c) in FIG.

[0205] See also Figure 6 In (b), the GUI is a display desktop 720 of the mobile phone 700b, and the desktop 720 includes the application Huawei Wallet 721.

[0206] See also Figure 6 In (c), the GUI is the payment interface 730 of the tablet. In response to the user clicking on the Huawei Wallet Payment 704, the function control of the Huawei Wallet Payment 706 in the payment interface 730 becomes selected. The selected state can be highlighted, filled with a solid color, or displayed with a check mark, etc. At the same time, the prompt box 707 displays "Huawei Wallet Payment ¥100.50" to prompt the user that the Huawei Wallet Payment is selected. When the tablet detects that the user clicks on the prompt box 707, it can display the following Figure 6 The GUI shown in (d) in FIG.

[0207] It should be understood that after the user clicks the operation in prompt box 707, the shopping app (such as Huawei Mall) remotely obtains the public key b of the Huawei Wallet installed on the mobile phone through the system interface of the tablet, and compares the public key b with the public key a of the Huawei Wallet stored in the shopping app to verify the authenticity of the Huawei Wallet installed on the mobile phone.

[0208] See also Figure 6 In (d), the GUI shows a tablet display interface 740 when verification fails. This display interface 740 includes a prompt box 708 that informs the user that the app is untrustworthy, and a prompt box 709 for the user to select an alternative payment method. Prompt box 708 may display "Huawei Wallet Untrustworthy," and prompt box 709 may display "Other Payment Methods." The user can then click prompt box 709 to select another payment method for the current item.

[0209] Based on the embodiments of the present application, when an application in an electronic device calls another application in another electronic device, the authenticity of the other application can be verified. When the verification fails, a prompt box can be displayed to remind the user that the other application is not trustworthy, thereby avoiding the leakage of user information and ensuring the security of user information. In addition, this technical solution can identify the authenticity of another application without the need for certification by a third-party authority, thereby simplifying the process of verifying the authenticity of the application.

[0210] Figure 7 is a schematic diagram of another set of GUIs provided in an embodiment of the present application. Figure 6 (a) to (f) in the figure show the process of an application in a tablet computer calling another application in a mobile phone.

[0211] Figure 7 (a) to (b) can refer to Figure 6 For the sake of brevity, the descriptions of (a) to (c) are omitted here.

[0212] See also Figure 7 In (c), the GUI is when an App in a tablet (such as Huawei Mall) calls the Huawei Wallet in a mobile phone. After the Huawei Wallet is verified, the mobile phone displays an interface 750. The display interface 750 may include a content card 751. The content card 751 may display information such as order information, payee, and amount to be paid. The content card may also include function controls, such as a cancel control 752 and a payment control 753. When the mobile phone detects that the user clicks the cancel control 752, the payment can be canceled; when the mobile phone detects that the user clicks the payment control 753, the Huawei Wallet can be opened and the display will be as follows: Figure 7 The GUI shown in (d) in FIG.

[0213] For example, when the tablet calls the Huawei wallet on the mobile phone to make a payment, after the Huawei wallet in the mobile phone is verified, the tablet can send the relevant information of the order to the mobile phone, and the mobile phone will complete the payment.

[0214] See also Figure 7 In (d), the GUI is a schematic payment interface 760 of Huawei Wallet on the mobile phone. The interface 760 may include the payment amount, order information, payee, payment method, etc. The interface 760 may also include a "pay now" function control 761 below. When the mobile phone detects that the user clicks the "pay now" function control 761, it may display the following: Figure 7 The GUI shown in (e) in FIG.

[0215] See also Figure 7(e) in the figure, the display interface 770 may include a payment card 774, and the card 774 may include a fingerprint display area 773 for prompting the user to verify the fingerprint, and the text "Please verify the fingerprint" and other prompt information may be displayed below the fingerprint display area 773. The card 774 may also include a function control 771 for canceling the payment and a function control 772 for the user to choose to pay with a password. When the user clicks the function control 771, the payment can be canceled. When the user clicks the function control 772, a numeric keyboard may pop up for the user to enter the password. After the mobile phone detects that the user's fingerprint has been verified or the user has entered the correct password, the tablet and mobile phone may display the following Figure 7 The GUI shown in (f) in FIG.

[0216] See also Figure 7 In (f), the GUI shows the tablet display interface 780 and the mobile phone display interface 790 after the user successfully pays using Huawei Wallet. A prompt box 781 stating "Huawei Wallet payment successful" may be displayed on the tablet display interface 780 to inform the user of the successful payment. A payment success reminder card 791 may be displayed on the mobile phone display interface 790 to inform the user of the successful payment.

[0217] Optionally, in an embodiment of the present application, after the tablet verifies that the Huawei Wallet in the mobile phone is a real application, if the user has turned on password-free payment, the payment can be automatically completed directly from the mobile phone without displaying the various interfaces in the above-mentioned mobile phone. After the payment is completed, a payment success prompt box can pop up on the tablet and mobile phone to prompt the user that the payment is complete.

[0218] Based on the embodiments of the present application, when an application in an electronic device calls another application in another electronic device, the authenticity of the other application needs to be verified. Only when the verification is passed can the other application be used normally, thereby avoiding the leakage of user information and ensuring the security of user information. In addition, this technical solution can identify the authenticity of another application without the need for certification by a third-party authority, thereby simplifying the process of verifying the authenticity of the application.

[0219] Figure 8 This is a schematic flow chart of a method for verifying an application provided in an embodiment of the present application. Figure 8 As shown, the method is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device has a first application installed therein and the second electronic device has a second application installed therein. The method may include steps 810 to 860.

[0220] 810. A first electronic device detects a first operation performed by a user on a first application.

[0221] For example, the first electronic device detects a user's operation of calling another application on a certain application. Figure 6 As shown in (c), the first operation may be the user clicking on area 707 on the payment page of Huawei Mall.

[0222] 820. The first electronic device obtains the first public key of the second application in response to the first operation.

[0223] It should be understood that since the first public key is the public key used to verify the digital signature of the second application when the second electronic device is installed, if the digital signature and public key of the second application are tampered with when installing the application, the electronic device will still pass the verification during installation, but the application will be unsafe. Therefore, the second application poses certain risks.

[0224] In one possible implementation, the first electronic device has a public key acquisition module, which can provide the first electronic device with a system interface for remote access to a remote device, so that the first electronic device can access the second electronic device through the system interface, and the second electronic device also provides a system interface that allows the remote device to obtain the public key of a specified application.

[0225] In another possible implementation, the first electronic device may send a request message to the second electronic device to obtain the first public key of the second application in the second electronic device.

[0226] 830. The first electronic device determines the authenticity of the second application according to the first public key and the second public key.

[0227] The second public key may be a trusted public key or a real public key of the second application, for example, obtained by searching the official website of the second application.

[0228] 840. When the first electronic device determines that the second application is trustworthy, the first electronic device sends the first data to the second electronic device.

[0229] The first data may be related to the requirements and type of the first application. For example, if the first application needs to call the second application to perform a payment function, the first data may be data information related to payment.

[0230] For example, Figure 7 As shown in (c), the first data may be order information, payee, payment amount, etc. related to payment.

[0231] 850. The second electronic device calls a second application to process the first data.

[0232] Exemplarily, the second electronic device calls a second application to process the first data, such as Figure 7As shown in (d) and (e), the second electronic device calls Huawei Wallet to perform the payment function.

[0233] 860. The second electronic device sends second data to the first electronic device.

[0234] The second data may be a message indicating that the second electronic device has completed processing the first data, or the second data may be data obtained after processing the first data.

[0235] According to an embodiment of the present application, in response to a user's operation, a first electronic device obtains the public key of a second application and determines the authenticity of the second application based on the trusted public key and the obtained public key. If the second application is determined to be trustworthy, the first electronic device sends first data related to the first application to the second electronic device. The second electronic device then calls the second application to process the first data and provides feedback to the first electronic device. This technical solution can prevent the leakage of user information and improve the security of the interaction between the first and second electronic devices.

[0236] Optionally, the first electronic device determines the authenticity of the second application based on the first public key and the second public key, including: when the first public key and the second public key are consistent, determining that the second application is a trusted application; when the first public key and the second public key are inconsistent, determining that the second application is a counterfeit application.

[0237] Based on the embodiments of the present application, electronic devices can use the public key information of the second application to verify the authenticity of the second application across devices, without the need for certification by a third-party authority or other computing overhead, such as hash operations, etc., thereby simplifying the process of verifying the authenticity of applications across devices and improving the efficiency of verifying the authenticity of applications across devices.

[0238] Optionally, the first electronic device obtains the first public key of the second application in response to the first operation, including: obtaining the first public key according to the application identifier of the second application.

[0239] It should be understood that the first electronic device may have a public key acquisition module, which can provide the first electronic device with a system interface for remote access to a remote device, so that the first electronic device can access the second electronic device through the system interface, and the electronic device also provides a system interface that allows applications in the remote device to obtain the public key of a specified application.

[0240] In the embodiment of the present application, the application identifier of the second application and its corresponding first public key can be stored in the second electronic device in the form of a key-value pair, or in the form of a reference list. Therefore, when the first electronic device accesses the second electronic device, it can query the application identifier of the second application to obtain its corresponding first public key.

[0241] Optionally, the first electronic device obtains the first public key of the second application in response to the first operation, including: sending a public key acquisition request message to the second electronic device, where the public key acquisition request message is used to obtain the first public key; and receiving the first public key sent by the second electronic device in response to the public key acquisition request message.

[0242] In an embodiment of the present application, after detecting the user's operation on the first application, the first electronic device can send a public key acquisition request message to the second electronic device. After receiving the public key acquisition request message, the second electronic device sends the first public key to the first electronic device.

[0243] Optionally, the public key acquisition request message also includes a second public key, and receiving the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device in response to the public key acquisition request message and verifying that the second public key is a trusted public key.

[0244] Based on the embodiment of the present application, the second electronic device sends the first public key to the first electronic device only after verifying that the second public key is trustworthy. This technical solution can improve the security of information interaction.

[0245] Optionally, the public key acquisition request message also includes a third public key, which is the public key used by the first electronic device to verify the first application. The receiving of the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device in response to the public key acquisition request message and verifying that the third public key is a trusted public key.

[0246] In an embodiment of the present application, the public key acquisition request message also includes a third public key used by the first application to verify the first application when the first electronic device installs the first application. The second electronic device can pre-store the trusted public key of the first application and, after verifying that the third public key is a trusted public key, send the first public key to the first electronic device. This technical solution prevents the leakage of user information when the first application is untrusted, thereby improving the security of information exchange.

[0247] Optionally, the public key acquisition request message includes a second public key and a third public key, the third public key is the public key used to verify the first application in the first electronic device, and the receiving of the first public key sent by the second electronic device in response to the public key acquisition request message includes: receiving the first public key sent by the second electronic device after verifying that the second public key and the third public key are trusted public keys in response to the public key acquisition request message.

[0248] The technical solutions in the embodiments of the present application can further improve the security of the interaction between the first electronic device and the second electronic device.

[0249] Optionally, the second public key is stored in the source code of the first application; or the second public key is stored in the system storage space of the first application; or the second public key is stored in the configuration file of the first application; or the second public key is stored in the cloud.

[0250] The source code may be the code developed by the developer for the first application, or an APK file compiled from the source code. The cloud may be a server of the first application, etc.

[0251] When the second public key is in the source code of the first application, the first electronic device can verify the authenticity of the second application across devices without going through the cloud or a third-party authoritative certification agency, thereby simplifying the process of verifying the application.

[0252] Optionally, the second public key and the application identifier of the second application are stored in the source code of the first application in the form of a comparison list.

[0253] In an embodiment of the present application, the developer of the first application may write the public keys and application identifiers of multiple applications that the first application may access in the future into the source code of the first application in the form of a comparison list.

[0254] Optionally, the second data is used to indicate that the processing of the first data is completed; or, the second data is data after the processing of the first data is completed.

[0255] Optionally, the first application and the second application have the same application name.

[0256] For example, the first application and the second application are the same application and are located in electronic devices with different operating systems.

[0257] It should be understood that the first application and the second application may also have the same application identifier.

[0258] Optionally, the first application and the second application are different types of applications.

[0259] An embodiment of the present application also provides a method for verifying an application, which is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device has a first application installed in it and the second electronic device has a second application installed in it, the method comprising: the first electronic device detecting a first operation of the user on the first application; the first electronic device obtaining a first public key of the second application in response to the first operation; the first electronic device is further used to determine the authenticity of the second application based on the first public key and the second public key; the first electronic device is further used to prompt the user that the second application is untrustworthy if it is determined that the second application is untrustworthy.

[0260] For example, Figure 6As shown in (c) and (d) above, when the first electronic device determines that the second application is a counterfeit application, a prompt box may pop up on the screen of the first electronic device to inform the user that the second application is untrustworthy. Alternatively, a voice message may be played to inform the user that the second application is untrustworthy, etc., which is not limited in this embodiment of the present application.

[0261] Based on the embodiment of the present application, in response to the user's operation, the first electronic device obtains the public key of the second application, and determines the authenticity of the second application based on the trusted public key and the obtained public key. If the second application is judged to be untrustworthy, the user is prompted that the second application is untrustworthy, thereby avoiding the leakage of user information.

[0262] An embodiment of the present application also provides an electronic device, comprising one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the functions of the first electronic device in the method for verifying an application as described in any of the foregoing descriptions to be executed.

[0263] An embodiment of the present application also provides an electronic device, comprising one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to perform the function of the second electronic device in the method of executing the verification application described in any of the foregoing.

[0264] For example, the electronic device may be the first electronic device or the second electronic device mentioned above.

[0265] An embodiment of the present application also provides a chip, which is arranged in a first electronic device, and includes a processor and a communication interface. The communication interface is used to receive a signal and transmit the signal to the processor. The processor processes the signal so that the method of verification application described in any one of the above is executed.

[0266] An embodiment of the present application further provides a chip, which is disposed in a second electronic device, and includes a processor and a communication interface, wherein the communication interface is configured to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the method for verifying an application as described above is executed. An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the method for verifying an application as described above is executed.

[0267] It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules that perform the corresponding functions. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0268] In this embodiment, the electronic device can be divided into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.

[0269] This embodiment also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method for verifying the application in the above-mentioned embodiment.

[0270] This embodiment further provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the method for verifying an application in the above-mentioned embodiment.

[0271] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to execute the verification application method in the above-mentioned method embodiments.

[0272] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0273] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0274] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0275] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0276] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0277] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0278] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for verifying an application, characterized in that: The method is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device is communicatively connected to the second electronic device, a first application is installed in the first electronic device, and a second application is installed in the second electronic device, and includes: Detecting, by the first electronic device, a first operation of calling the second application through the first application; The first electronic device obtains, in response to the first operation, a first public key of the second application, wherein the first public key is a public key used by the second electronic device to verify the second application when installing the second application; The first electronic device determines the authenticity of the second application based on the first public key and the second public key, wherein the second public key is a trusted public key of the second application; When the first electronic device determines that the second application is trustworthy, the first electronic device sends first data related to the first application to the second electronic device; The second electronic device calls the second application to process the first data to obtain second data; The second electronic device sends the second data to the first electronic device.

2. The method according to claim 1, characterized in that The first electronic device determining the authenticity of the second application according to the first public key and the second public key includes: When the first public key and the second public key are consistent, determining that the second application is a trusted application; When the first public key and the second public key are inconsistent, the second application is determined to be a counterfeit application.

3. The method according to claim 1 or 2, characterized in that The first electronic device obtaining, in response to the first operation, a first public key of the second application, comprising: The first public key is obtained according to the application identifier of the second application.

4. The method according to claim 1 or 2, characterized in that The first electronic device obtaining, in response to the first operation, a first public key of the second application, comprising: Sending a public key acquisition request message to the second electronic device, where the public key acquisition request message is used to acquire the first public key; Receive the first public key sent by the second electronic device in response to the public key acquisition request message.

5. The method according to claim 4, characterized in that The public key acquisition request message also includes the second public key, and the receiving the first public key sent by the second electronic device in response to the public key acquisition request message includes: The first public key is received after the second electronic device responds to the public key acquisition request message and verifies that the second public key is a trusted public key.

6. The method according to claim 4, characterized in that The public key acquisition request message also includes a third public key, where the third public key is a public key used by the first electronic device to verify the first application. The receiving the first public key sent by the second electronic device in response to the public key acquisition request message includes: The first public key is received after the second electronic device responds to the public key acquisition request message and verifies that the third public key is a trusted public key.

7. The method according to claim 4, characterized in that The public key acquisition request message includes the second public key and a third public key, where the third public key is a public key used by the first electronic device to verify the first application, and the receiving the first public key sent by the second electronic device in response to the public key acquisition request message includes: The first public key is received after the second electronic device verifies that the second public key and the third public key are trusted public keys in response to the public key acquisition request message.

8. The method according to any one of claims 1 or 2, or 5-7, characterized in that The second public key is stored in the source code of the first application; or The second public key is stored in the system storage space of the first application; or The second public key is stored in a configuration file of the first application; or The second public key is stored in the cloud.

9. The method according to any one of claims 1 or 2, or 5-7, characterized in that The second public key and the application identifier of the second application are stored in the source code of the first application in the form of a comparison list.

10. The method according to any one of claims 1 or 2, or 5-7, characterized in that The second data is used to indicate that the processing of the first data is completed; or, The second data is data obtained after the first data is processed.

11. The method according to any one of claims 1 or 2, or 5-7, characterized in that: The first application and the second application have the same application name.

12. The method according to any one of claims 1 or 2, or 5-7, characterized in that The first application and the second application are different types of applications.

13. A method for verifying an application, characterized in that: The method is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device is communicatively connected to the second electronic device, a first application is installed in the first electronic device, and a second application is installed in the second electronic device, and includes: Detecting, by the first electronic device, a first operation of calling the second application through the first application; The first electronic device obtains, in response to the first operation, a first public key of the second application, wherein the first public key is a public key used by the second electronic device to verify the second application when installing the second application; The first electronic device determines the authenticity of the second application based on the first public key and the second public key, wherein the second public key is a trusted public key of the second application; When the first electronic device determines that the second application is not trustworthy, it prompts the user that the second application is not trustworthy.

14. An electronic device, characterized in that: The device comprises one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs including instructions, which, when executed by the one or more processors, cause the function of the first electronic device in the method for verifying an application as described in any one of claims 1 to 12 to be executed, or the function of the first electronic device in the method for verifying an application as described in claim 13 to be executed.

15. An electronic device, characterized in that: The device comprises one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs including instructions, which, when executed by the one or more processors, cause the function of the second electronic device in the method for verifying an application as described in any one of claims 1 to 12 to be executed, or the function of the second electronic device in the method for verifying an application as described in claim 13 to be executed.

16. A chip, characterized in that: The chip is set in a first electronic device, and the chip includes a processor and a communication interface. The communication interface is used to receive a signal and transmit the signal to the processor. The processor processes the signal so that the method for verifying an application as described in any one of claims 1 to 12 is executed, or the method for verifying an application as described in claim 13 is executed.

17. A chip, characterized in that: The chip is set in a second electronic device, and the chip includes a processor and a communication interface. The communication interface is used to receive a signal and transmit the signal to the processor. The processor processes the signal so that the method for verifying an application as described in any one of claims 1 to 12 is executed, or the method for verifying an application as described in claim 13 is executed.

18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the method for verifying an application according to any one of claims 1 to 12 is executed, or the method for verifying an application according to claim 13 is executed.

Citation Information

Patent Citations

  • Method and system for establishing connection relation between mobile devices

    CN106060810A

  • Application login method and system, terminal and electronic equipment

    CN110324276A