Android resource file encryption method and device based on quantum encryption technology
Through the Android resource file encryption method based on quantum encryption technology, quantum encryption of Android resource files is solved, and the problem of insufficient security of resource file protection schemes in the existing technology is achieved, and efficient resource file encryption and decryption is achieved.
Patent Information
- Application Number
- CN202411493021.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the protection scheme of Android resource files has the potential to have limited security strength and key cracking, making it difficult to effectively ensure the security of resource files.
The Android resource file encryption method based on quantum encryption technology is adopted. By obtaining the signature file of the target application, generating a session identifier, and obtaining the quantum key, the resource file is quantized, and the encrypted resource file is stored in the folder of the target application to generate an APK quantum encryption compressed package.
This not only increases the time cost of cracking, but also effectively avoids the hidden danger of key cracking, significantly improving the security of resource files.
Smart Images

Figure CN119519941A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mobile application security technology, and in particular to an Android resource file encryption method and device based on quantum encryption technology. Background Art
[0002] The resource files of Android App (i.e., Android system application) store a large number of application UI interface images, UI layout files, privacy data files, etc. How to ensure the security of these resource files has always been a key concern for developers and application security personnel.
[0003] In the prior art, there are mainly two ways to protect resource files:
[0004] (1) Resource file obfuscation protection method: obfuscate the resource file path, shorten the folder and file name, and replace / delete the name of a resource. It should be noted that although this method increases the reading difficulty for crackers during cracking, the security strength is limited. In other words, simply renaming the resource file cannot effectively protect the resource file. Crackers can still view and modify the content of the resource file, but it increases the time cost of cracking the resource file content.
[0005] (2) Resource file encryption protection method: Encrypt, hide and compress the contents of the assets and res directories of Android resources through encryption means, and then decompress and decrypt the files when using them. It should be noted that this method has relatively high security strength, and crackers cannot easily view and modify resource files; however, whether it is stored in the software sandbox (retrieved by the software when used) or the key is obtained remotely, the common key acquisition methods in the prior art have the risk of key being cracked.
[0006] In view of this, it is necessary to provide a new resource file protection solution, which not only increases the time cost of cracking, but also effectively avoids the hidden danger of the key being cracked, thereby effectively ensuring the security of resource files. Summary of the invention
[0007] This application shows an Android resource file encryption method and device based on quantum encryption technology.
[0008] In the first aspect, the present application shows an Android resource file encryption method based on quantum encryption technology, which is applied to the packaging process of the target application, and the method includes:
[0009] Get the signature file of the target application;
[0010] Generate a first session identifier corresponding to the signature file according to a preset encryption algorithm;
[0011] Obtaining a first quantum key encrypted with a charging key from a quantum key management service platform according to the first session identifier;
[0012] Using the first quantum key to quantum encrypt the resource file of the target application, and storing the quantum encrypted resource file in a folder of the target application;
[0013] The encrypted resource files are packaged and compressed to generate an APK quantum encrypted compressed package of the target application.
[0014] Optionally, the step of generating a first session identifier corresponding to the signature file according to a preset encryption algorithm includes:
[0015] Generate a first MD5 value of the signature file based on the MD5 information digest algorithm;
[0016] The first MD5 value of the signature file is determined as the first session identifier.
[0017] Optionally, the method further includes:
[0018] The APK quantum encrypted compressed package of the encrypted resource file is uploaded to the application market for users to download, or the APK quantum encrypted compressed package of the encrypted resource file is directly provided to users for installation and use.
[0019] Optionally, the method is applied to the process of installing an APK compression package of a target application on a mobile terminal, and a quantum encryption SIM card is provided in the mobile terminal, and the method further includes:
[0020] In response to an application installation request of a target application, detecting whether an APK compression package of the target application is an APK quantum encrypted compression package;
[0021] If it is determined that the APK compression package of the target application is an APK quantum encrypted compression package, the mobile terminal obtains a signature file of the target application;
[0022] Generate a second session identifier corresponding to the signature file according to the encryption algorithm;
[0023] Obtaining a second quantum key encrypted with the injection key from the quantum key management service platform according to the second session identifier;
[0024] Install the APK quantum encrypted compressed package of the encrypted resource file;
[0025] Using the second quantum key to quantum decrypt the resource file of the target application, and storing the quantum encrypted resource file in a folder of the target application;
[0026] Install and run the decrypted resource file of the target application.
[0027] Optionally, the step of generating a second session identifier corresponding to the signature file according to the encryption algorithm includes:
[0028] Generate a second MD5 value of the signature file based on the MD5 information digest algorithm;
[0029] The second MD5 value of the signature file is determined as the second session identifier.
[0030] In the second aspect, the present application shows an Android resource file encryption device based on quantum encryption technology, which is applied to the packaging process of the target application, and the device includes:
[0031] A first signature file acquisition module, used to acquire a signature file of a target application;
[0032] A first session identifier generating module, used to generate a first session identifier corresponding to the signature file according to a preset encryption algorithm;
[0033] A first quantum key application module is used to obtain a first quantum key encrypted by a charging key from a quantum key management service platform according to the first session identifier;
[0034] A resource file encryption module, used to perform quantum encryption on the resource file of the target application using the first quantum key, and store the quantum encrypted resource file in a folder of the target application;
[0035] The resource file packaging module is used to package and compress the encrypted resource files to generate an APK quantum encrypted compressed package of the target application.
[0036] Optionally, the session identifier generation module is used to generate a first MD5 value of the signature file based on an MD5 information digest algorithm; and determine the first MD5 value of the signature file as the first session identifier.
[0037] Optionally, it also includes an APK compression package providing module, which is used to upload the APK quantum encrypted compression package of the encrypted resource file to the application market for users to download, or directly provide the APK quantum encrypted compression package of the encrypted resource file to users for installation and use.
[0038] Optionally, the process of installing an APK compression package of a target application on a mobile terminal, and the mobile terminal is provided with a quantum encryption SIM card, the device further includes:
[0039] An APK compression package detection module is used to detect whether the APK compression package of the target application is an APK quantum encrypted compression package when responding to an application installation request of the target application;
[0040] A second signature file acquisition module, configured to, when determining that the APK compression package of the target application is an APK quantum encrypted compression package, enable the mobile terminal to acquire the signature file of the target application;
[0041] A second session identifier generating module, used to generate a second session identifier corresponding to the signature file according to the encryption algorithm;
[0042] A second quantum key application module is used to obtain a second quantum key encrypted by a charging key from a quantum key management service platform according to the second session identifier;
[0043] An APK compression package installation module, used to install the APK quantum encrypted compression package of the encrypted resource file;
[0044] A resource file decryption module, used to use the second quantum key to quantum decrypt the resource file of the target application, and store the quantum encrypted resource file in a folder of the target application;
[0045] The APK compression package installation module is also used to install and run the decrypted resource files of the target application.
[0046] Optionally, the second session identifier generating module is used to generate a second MD5 value of the signature file based on the MD5 information digest algorithm; and determine the second MD5 value of the signature file as the second session identifier.
[0047] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0048] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.
[0049] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0050] The technical solution provided by this application may have the following beneficial effects:
[0051] The solution provided in this application uses quantum keys to encrypt APK compression packages during the packaging process of resource files. The quantum keys generate a one-time key through quantum key distribution based on the principles of quantum mechanics to encrypt resource files. This not only increases the time cost of cracking, but also effectively avoids the risk of key cracking, thereby ensuring the security of resource files. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of the Android resource file encryption method based on quantum encryption technology provided in this application.
[0053] Figure 2 Another flowchart of the Android resource file encryption method based on quantum encryption technology provided by this application.
[0054] Figure 3 A structural diagram of an Android resource file encryption device based on quantum encryption technology provided in this application.
[0055] Figure 4 Another structural diagram of the Android resource file encryption device based on quantum encryption technology provided in this application.
[0056] Figure 5 A block diagram of an electronic device provided in this application.
[0057] Figure 6 A block diagram of another electronic device provided by the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] To solve the above problems, this application provides the following Android resource file encryption solution based on quantum encryption technology. The following is a description of the Android resource file encryption method based on quantum encryption technology provided by this application.
[0060] Embodiment 1
[0061] Reference Figure 1, is a flow chart of the Android resource file encryption method based on quantum encryption technology provided by this application. The Android resource file encryption method based on quantum encryption technology provided by this application is applied to the packaging process of the target application. The method may specifically include the following steps:
[0062] Step S101: Obtain the signature file of the target application.
[0063] Specifically, in the Android operating system, the system signature file plays a vital role, ensuring the security and integrity of applications and systems. The Android system signature is used to verify whether the application or system update comes from a trusted source and has not been tampered with. This process involves a series of security mechanisms, including public key encryption, digital signatures, and certificate verification.
[0064] Step S102: Generate a first session identifier corresponding to the signature file according to a preset encryption algorithm.
[0065] In one case, the first session identifier corresponding to the signature file can be generated in the following manner: generating the first MD5 value of the signature file based on the MD5 message digest algorithm; determining the first MD5 value of the signature file as the first session identifier. The MD5 message digest algorithm, whose English name is MD5 Message-Digest Algorithm, is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure that information transmission is complete and consistent. It should be noted that the MD5 algorithm listed in this application is only a specific encryption algorithm, and it can also be other encryption algorithms, such as MD4, etc., which are not limited in this application.
[0066] Step S103: Obtaining the first quantum key encrypted by the injection key from the quantum key management service platform according to the first session identifier.
[0067] The quantum key management service platform has a quantum key distribution function. Quantum Key Distribution (QKD) is a technology that uses the characteristics of quantum mechanics to ensure the security of communications. It enables both parties in communication to generate a random and secure key for encrypting and decrypting messages through the transmission and measurement of quantum states. The quantum key generated by this application is based on the true randomness of quantum and is generated using the above-mentioned quantum encryption machine. Due to the very fragile nature of quantum states, any attempt to eavesdrop or interfere will be immediately discovered, thereby ensuring the security of communications.
[0068] Step S104: Use the first quantum key to quantum encrypt the resource file of the target application, and store the quantum encrypted resource file in the folder of the target application.
[0069] Step S105: Pack and compress the encrypted resource files to generate the APK quantum encrypted compressed package of the target application. It should be noted that when packaging the application of the Android system, the original UI images, UI layout files, privacy data and other files need to be compressed. This is a conventional compression method, which can be specifically implemented by referring to the methods in the prior art.
[0070] Furthermore, after the encrypted resource files are packaged and compressed, and the APK quantum encrypted compressed package of the target application is generated, the APK quantum encrypted compressed package of the encrypted resource files can be uploaded to the application market for users to download, or the APK quantum encrypted compressed package of the encrypted resource files can be directly provided to users for installation and use.
[0071] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. For example, the "first session identifier" and the "second session identifier", the "first quantum key" and the "second quantum key" are only conceptually distinguished to indicate that the session identifiers and quantum keys are generated by different processes, and do not mean that the specific contents of the "first session identifier" and the "second session identifier", the "first quantum key" and the "second quantum key" are different.
[0072] In summary, the method provided by this application uses quantum keys to encrypt APK compressed packages during the packaging process of resource files, and the quantum keys generate one-time keys through quantum key distribution based on the principles of quantum mechanics, thereby ensuring the security of resource files. It can be seen that this application aims to provide a new Android resource file encryption method to ensure resource integrity and security, and protect resource files from being modified and stolen at will.
[0073] The keys used in this application are generated and issued by the key management platform. The application for session keys (i.e., the first quantum key and the second quantum key) is based on software (i.e., target application) related information, security media related ID and other information (such as signature files).
[0074] The key management platform generates a quantum random number as a session key, and encrypts the generated session key and returns it. The software encrypts the encrypted session key according to the pre-charged key in the SIM card. The software uses the session key to encrypt and transmit the communication content according to the national secret algorithm. After the other end receives it, the software obtains the session key from the key management platform in the above manner and decrypts the resource file content, thereby ensuring the integrity and security of the resource file.
[0075] Embodiment 2
[0076] See also Figure 2 , which is another flow chart of the Android resource file encryption method based on quantum encryption technology provided by this application, is applied to the process of installing the APK compression package of the target application on the mobile terminal, and the mobile terminal is provided with a quantum encryption SIM card. It should be noted that during the use of the mobile device, the user needs to apply for the corresponding quantum security SIM card, which is a security SIM card with a built-in quantum injection key. When using it, the quantum security SIM card needs to be correctly inserted into the card slot. Specifically, the method may include the following steps:
[0077] Step S201: Obtain the signature file of the target application.
[0078] Step S202: Generate a first session identifier corresponding to the signature file according to a preset encryption algorithm.
[0079] Step S203: Obtaining the first quantum key encrypted with the injection key from the quantum key management service platform according to the first session identifier.
[0080] Step S204: Use the first quantum key to quantum encrypt the resource file of the target application, and store the quantum encrypted resource file in the folder of the target application.
[0081] Step S205: Pack and compress the encrypted resource files to generate an APK quantum encrypted compressed package of the target application.
[0082] It should be noted that steps S201 to S205 in the second embodiment are similar to steps S101 to S105 in the first embodiment. For the relevant details, please refer to the first embodiment and will not be described again here.
[0083] Step S206: In response to the application installation request of the target application, detect whether the APK compression package of the target application is an APK quantum encrypted compression package.
[0084] Step S207: If it is determined that the APK compression package of the target application is an APK quantum encrypted compression package, the mobile terminal obtains the signature file of the target application.
[0085] It should be noted that in actual applications, the judgment of the APK quantum encrypted compressed package can be set as needed. For example, it can be determined whether the APK quantum encrypted compressed package is installed for the first time, or the APK compressed package of the target application can be detected each time to see whether it is an APK quantum encrypted compressed package. This application does not limit the specific setting method and can be set according to the needs of actual applications.
[0086] Step S208: Generate a second session identifier corresponding to the signature file according to the encryption algorithm.
[0087] Step S209: Obtain the second quantum key encrypted with the injection key from the quantum key management service platform according to the second session identifier.
[0088] In one case, the second session identifier corresponding to the signature file may be generated in the following manner: generating a second MD5 value of the signature file based on the MD5 information digest algorithm; and determining the second MD5 value of the signature file as the second session identifier.
[0089] Step S210: Install the APK quantum encrypted compressed package of the encrypted resource file.
[0090] Step S211: Use the second quantum key to quantum decrypt the resource file of the target application, and store the quantum encrypted resource file in the folder of the target application.
[0091] Step S212: Install and run the decrypted resource file of the target application. Specifically, when the Android system installs and runs the target application, it can obtain the corresponding resource file from the directory, thereby achieving the purpose of encrypting the resource file.
[0092] In summary, the method provided by the present application uses a quantum key to encrypt an APK compression package during the packaging process of resource files, and the quantum key generates a one-time key through quantum key distribution based on the principle of quantum mechanics to encrypt the resource file; in this way, when the user installs the target application on the mobile terminal, the resource file installed by the user can be guaranteed not to have been cracked based on the quantum key one-time key strategy, and not only the time cost of cracking is increased, but also the hidden danger of the key being cracked is effectively avoided, thereby ensuring the security of the resource file.
[0093] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0094] Corresponding to the above method embodiment, the present application provides the following device embodiment, and the Android resource file encryption device based on quantum encryption technology provided by the present application is described in detail below.
[0095] Embodiment 3
[0096] See also Figure 3 , is a structural diagram of an Android resource file encryption device based on quantum encryption technology provided by this application, the device comprising:
[0097] The first signature file acquisition module 310 is used to acquire the signature file of the target application during the packaging process of the target application.
[0098] The first session identifier generating module 320 is used to generate a first session identifier corresponding to the signature file according to a preset encryption algorithm.
[0099] The first quantum key application module 330 is used to obtain the first quantum key encrypted by the injection key from the quantum key management service platform according to the first session identifier.
[0100] The resource file encryption module 340 is used to use the first quantum key to quantum encrypt the resource file of the target application, and store the quantum encrypted encrypted resource file in the folder of the target application.
[0101] The resource file packaging module 350 is used to package and compress the encrypted resource files to generate an APK quantum encrypted compressed package of the target application.
[0102] In one case, the first session identifier generating module 320 is configured to generate a first MD5 value of the signature file based on an MD5 message digest algorithm; and determine the first MD5 value of the signature file as the first session identifier.
[0103] Furthermore, the device may also include an APK compression package providing module, which is used to upload the APK quantum encrypted compression package of the encrypted resource file to the application market for users to download, or directly provide the APK quantum encrypted compression package of the encrypted resource file to users for installation and use.
[0104] It can be seen that the device provided in this application uses quantum keys to encrypt APK compression packages during the packaging process of resource files. The quantum keys generate a one-time key through quantum key distribution based on the principles of quantum mechanics, thereby ensuring the security of resource files.
[0105] Embodiment 4
[0106] See also Figure 4 , corresponding to Figure 2 The method embodiment shown is applied to the process of installing an APK compressed package of a target application in a mobile terminal, and a quantum encryption SIM card is provided in the mobile terminal, and the device includes:
[0107] The first signature file acquisition module 411 is used to acquire the signature file of the target application.
[0108] The first session identifier generating module 412 is used to generate a first session identifier corresponding to the signature file according to a preset encryption algorithm.
[0109] The first quantum key application module 413 is used to obtain the first quantum key encrypted by the injection key from the quantum key management service platform according to the first session identifier.
[0110] The resource file encryption module 414 is used to use the first quantum key to quantum encrypt the resource file of the target application, and store the quantum encrypted encrypted resource file in the folder of the target application.
[0111] The resource file packaging module 415 is used to package and compress the encrypted resource files to generate an APK quantum encrypted compressed package of the target application.
[0112] The APK compression package detection module 421 is used to detect whether the APK compression package of the target application is an APK quantum encrypted compression package when responding to an application installation request of the target application.
[0113] The second signature file acquisition module 422 is used for the mobile terminal to acquire the signature file of the target application when it is determined that the APK compression package of the target application is an APK quantum encrypted compression package.
[0114] The second session identifier generating module 423 is used to generate a second session identifier corresponding to the signature file according to the encryption algorithm.
[0115] The second quantum key application module 424 is used to obtain the second quantum key encrypted by the injection key from the quantum key management service platform according to the second session identifier.
[0116] The APK compression package installation module 425 is used to install the APK quantum encrypted compression package of the encrypted resource file.
[0117] The resource file decryption module 426 is used to use the second quantum key to quantum decrypt the resource file of the target application, and store the quantum encrypted resource file in the folder of the target application.
[0118] The APK compression package installation module 425 is also used to install and run the decrypted resource files of the target application.
[0119] In one case, the second session identifier generating module 423 is used to generate a second MD5 value of the signature file based on the MD5 information digest algorithm; and determine the second MD5 value of the signature file as the second session identifier.
[0120] In summary, the device provided by the present application uses a quantum key to encrypt an APK compression package during the packaging process of resource files, and the quantum key generates a one-time key through quantum key distribution based on the principle of quantum mechanics to encrypt the resource file; in this way, when the user installs the target application on the mobile terminal, the resource file installed by the user can be guaranteed not to have been cracked based on the quantum key one-time key strategy, and not only the time cost of cracking is increased, but also the hidden danger of the key being cracked is effectively avoided, thereby ensuring the security of the resource file.
[0121] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0122] Embodiment 5
[0123] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0124] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0125] Figure 5 The present application provides a block diagram of an electronic device 800. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0126] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0127] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0128] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0129] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0130] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0131] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0132] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0133] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0134] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0135] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0136] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0137] Embodiment 6
[0138] Figure 6 This is a block diagram of another electronic device 1900 provided in the present application. For example, the electronic device 1900 may be provided as a server.
[0139] Reference Figure 6 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0140] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0141] Embodiment 7
[0142] The present application shows a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in any one of the above aspects.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0145] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0148] In the embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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.
[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0151] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the 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 a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0152] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An Android resource file encryption method based on quantum encryption technology, characterized in that: Applied to the packaging process of the target application, the method comprises: Get the signature file of the target application; Generate a first session identifier corresponding to the signature file according to a preset encryption algorithm; Obtaining a first quantum key encrypted with a charging key from a quantum key management service platform according to the first session identifier; Using the first quantum key to quantum encrypt the resource file of the target application, and storing the quantum encrypted resource file in a folder of the target application; The encrypted resource files are packaged and compressed to generate an APK quantum encrypted compressed package of the target application.
2. According to the Android resource file encryption method based on quantum encryption technology according to claim 1, it is characterized in that: The step of generating the first session identifier corresponding to the signature file according to the preset encryption algorithm includes: Generate a first MD5 value of the signature file based on the MD5 information digest algorithm; The first MD5 value of the signature file is determined as the first session identifier.
3. According to the Android resource file encryption method based on quantum encryption technology according to claim 1, it is characterized in that: Also includes: The APK quantum encrypted compressed package of the encrypted resource file is uploaded to the application market for users to download, or the APK quantum encrypted compressed package of the encrypted resource file is directly provided to users for installation and use.
4. The Android resource file encryption method based on quantum encryption technology according to any one of claims 1 to 3, characterized in that: The method is applied to the process of installing the APK compression package of the target application on the mobile terminal, and the mobile terminal is provided with a quantum encryption SIM card, and the method also includes: In response to an application installation request of a target application, detecting whether an APK compression package of the target application is an APK quantum encrypted compression package; If it is determined that the APK compression package of the target application is an APK quantum encrypted compression package, the mobile terminal obtains a signature file of the target application; Generate a second session identifier corresponding to the signature file according to the encryption algorithm; Obtaining a second quantum key encrypted with the injection key from the quantum key management service platform according to the second session identifier; Install the APK quantum encrypted compressed package of the encrypted resource file; Using the second quantum key to quantum decrypt the resource file of the target application, and storing the quantum encrypted resource file in a folder of the target application; Install and run the decrypted resource file of the target application.
5. According to the Android resource file encryption method based on quantum encryption technology according to claim 1, it is characterized in that: The step of generating a second session identifier corresponding to the signature file according to the encryption algorithm includes: Generate a second MD5 value of the signature file based on the MD5 information digest algorithm; The second MD5 value of the signature file is determined as the second session identifier.
6. An Android resource file encryption device based on quantum encryption technology, characterized in that: Applied to the packaging process of the target application, the apparatus comprises: A first signature file acquisition module, used to acquire a signature file of a target application; A first session identifier generating module, used to generate a first session identifier corresponding to the signature file according to a preset encryption algorithm; A first quantum key application module is used to obtain a first quantum key encrypted by a charging key from a quantum key management service platform according to the first session identifier; A resource file encryption module, used to perform quantum encryption on the resource file of the target application using the first quantum key, and store the quantum encrypted resource file in a folder of the target application; The resource file packaging module is used to package and compress the encrypted resource files to generate an APK quantum encrypted compressed package of the target application.
7. The Android resource file encryption device based on quantum encryption technology according to claim 6 is characterized in that: The session identifier generation module is used to: Generate a first MD5 value of the signature file based on the MD5 information digest algorithm; The first MD5 value of the signature file is determined as the first session identifier.
8. The Android resource file encryption device based on quantum encryption technology according to claim 6 is characterized in that: It also includes an APK package providing module for: The APK quantum encrypted compressed package of the encrypted resource file is uploaded to the application market for users to download, or the APK quantum encrypted compressed package of the encrypted resource file is directly provided to users for installation and use.
9. The Android resource file encryption device based on quantum encryption technology according to any one of claims 6 to 8, characterized in that: The process of installing an APK compressed package of a target application on a mobile terminal, wherein a quantum encryption SIM card is provided in the mobile terminal, and the device further comprises: An APK compression package detection module is used to detect whether the APK compression package of the target application is an APK quantum encrypted compression package when responding to an application installation request of the target application; A second signature file acquisition module, configured to, when determining that the APK compression package of the target application is an APK quantum encrypted compression package, enable the mobile terminal to acquire the signature file of the target application; A second session identifier generating module, used to generate a second session identifier corresponding to the signature file according to the encryption algorithm; A second quantum key application module is used to obtain a second quantum key encrypted by a charging key from a quantum key management service platform according to the second session identifier; An APK compression package installation module, used to install the APK quantum encrypted compression package of the encrypted resource file; A resource file decryption module, used to use the second quantum key to quantum decrypt the resource file of the target application, and store the quantum encrypted resource file in a folder of the target application; The APK compression package installation module is also used to install and run the decrypted resource files of the target application.
10. The Android resource file encryption device based on quantum encryption technology according to claim 9 is characterized in that: The second session identifier generating module is used to: Generate a second MD5 value of the signature file based on the MD5 information digest algorithm; The second MD5 value of the signature file is determined as the second session identifier.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 5 when executed by the processor.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Shared cloud storage method and system supporting multiple clouds based on message digest algorithm
CN110535835A
Mobile service platform security management system based on quantum encryption
CN115208564A
Software upgrading method of vehicle, server, vehicle, storage medium and system
CN116243950A