Extended resource processing method and system of application program based on quantum key

By encrypting external resource files using quantum key-based methods in applications, the problem that resource files are prone to tampering in the prior art is solved, and the high security and integrity of resource files during transmission is achieved.

CN119583046APending Publication Date: 2025-03-07中电信量子信息科技集团有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411544721.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively protect the external resource files of applications from tampering with criminals, resulting in security vulnerabilities, application crashes and functional abnormalities.

Method used

Using a quantum key-based method, a session key application request is sent to the quantum cryptographic service center, a quantum session key is obtained, and the application's extended resources are encrypted to ensure the security and integrity of the resources during transmission.

Benefits of technology

With the unpredictability and difficulty in cracking of quantum keys, the security and integrity of the external resource files of the application are ensured during the transmission process, preventing the risk of tampering, and providing guarantees for the robust operation of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583046A_ABST
    Figure CN119583046A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an extended resource processing method and system of an application program based on a quantum key, and the method comprises the steps that a server sends a session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains and returns a session key according to the key application request; after the extension resources of the application program are encrypted according to the returned session key, the encrypted extension resources are distributed to the clients, and according to the embodiment of the invention, the security and integrity of the extension resources in the transmission process are ensured by means of the unpredictability and the difficulty in cracking of the quantum key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of extended resource processing of application programs, and in particular to an extended resource processing method and system for an application program based on quantum keys. Background Art

[0002] With the development of technology, in the process of software development, developers usually face various types of applications such as desktop applications, mobile applications, and web-based applications. These applications usually rely on loading external resource files. These external resource files are essential for the normal operation of the application. However, these external resource files may face the risk of criminals replacing the original resource files through secondary packaging or malicious attacks, resulting in security vulnerabilities, application crashes, functional abnormalities and other serious consequences.

[0003] Although there are some technologies to protect resource files from tampering, such as digital signature technology, these methods still face many challenges in practical applications. In order to more effectively protect the external resource files referenced in the application, a more efficient and secure method is needed to ensure that the external resource files of the application will not be tampered with by criminals. Summary of the invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide an extended resource processing method and system for quantum key-based applications that overcome the above problems or at least partially solve the above problems.

[0005] In order to solve the above problems, an embodiment of the present invention discloses an extended resource processing method for an application based on a quantum key, which is applied to a server. The method includes:

[0006] Sending a first session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server;

[0007] Receiving a session key sent by the cryptographic service center;

[0008] Encrypting the extended resource of the application according to the session key to obtain the encrypted extended resource;

[0009] The encrypted extended resource is sent to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

[0010] Optionally, encrypting the extended resource according to the session key to obtain the encrypted extended resource includes:

[0011] Performing integrity encryption on the extended resource according to a preset integrity encryption algorithm;

[0012] The extended resource after integrity encryption is encrypted according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource.

[0013] Optionally, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0014] The receiving the session key sent by the cryptographic service center comprises:

[0015] Receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0016] Obtaining the charging key according to the charging key identifier;

[0017] The encrypted session key is decrypted according to the injection key to obtain the session key.

[0018] On the other hand, an embodiment of the present invention further discloses a method for processing extended resources of an application based on a quantum key, which is applied to a client, and the method includes: receiving an encrypted extended resource sent by a server;

[0019] Sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client;

[0020] Receiving a session key sent by the cryptographic service center;

[0021] Decrypting the encrypted extended resource according to the session key to obtain the extended resource;

[0022] The extended resource is dynamically loaded into the memory, and the extended resource is released immediately after use.

[0023] Optionally, decrypting the encrypted extended resource according to the session key to obtain the extended resource includes:

[0024] Decrypt the encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the integrity-encrypted extended resource;

[0025] An integrity check is performed on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

[0026] Optionally, the second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0027] The receiving the session key sent by the cryptographic service center comprises:

[0028] Receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0029] Obtaining the charging key according to the charging key identifier;

[0030] The encrypted session key is decrypted according to the injection key to obtain the session key.

[0031] On the other hand, the present invention also discloses an extended resource processing system for an application based on a quantum key, the system comprising: a server, a client and a quantum cryptography service center

[0032] The server is used to send a first session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server; receive the session key sent by the cryptography service center; encrypt the extended resource of the application according to the session key to obtain an encrypted extended resource; send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource;

[0033] The client is used to receive the encrypted extended resources sent by the server;

[0034] Sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client; receiving the session key sent by the cryptography service center, decrypting the encrypted extended resource according to the session key, and obtaining the extended resource; dynamically loading the extended resource into the memory, and releasing the extended resource immediately after use;

[0035] The quantum cryptography service center is used to receive a first session key application request sent by a server; obtain a session key according to the first session key application request; send the session key to the server; receive a second session key application request sent by a client; obtain the session key according to the second session key application request; and send the session key to the client.

[0036] Optionally, the server is used to perform integrity encryption on the extended resource according to a preset integrity encryption algorithm; perform file encryption on the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource;

[0037] The client is used to decrypt the encrypted extended resource according to the session key and the preset file encryption algorithm to obtain the extended resource encrypted with integrity; and perform integrity verification on the extended resource encrypted with integrity according to the preset integrity encryption algorithm to obtain the extended resource.

[0038] Optionally, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the charging key; the server is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; obtain the charging key according to the charging key identifier; decrypt the encrypted session key according to the charging key to obtain the session key;

[0039] The second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the charging key; the client is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; obtain the charging key according to the charging key identifier; decrypt the encrypted session key according to the charging key to obtain the session key;

[0040] The quantum cryptography service center is used to encrypt the session key corresponding to the session identifier according to the injection key; send the encrypted session key and the injection key identifier corresponding to the injection key to the server; and send the encrypted session key and the injection key identifier corresponding to the injection key to the client.

[0041] On the other hand, an embodiment of the present invention further discloses an extended resource processing device for an application based on a quantum key, which is applied to a server, and the device includes:

[0042] A server application module, used for sending a first session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request, and returns the session key to the server;

[0043] A server receiving module, used for receiving the session key sent by the cryptographic service center;

[0044] A server encryption module, used for encrypting the extended resources of the application according to the session key to obtain the encrypted extended resources;

[0045] The server sending module is used to send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

[0046] Optionally, the extended resource encryption module further includes:

[0047] An integrity encryption submodule, used to perform integrity encryption on the extended resource according to a preset integrity encryption algorithm;

[0048] The file encryption submodule is used to perform file encryption on the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource.

[0049] Optionally, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0050] The server receiving module comprises:

[0051] A server receiving submodule, configured to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0052] A server acquisition submodule, configured to obtain the charging key according to the charging key identifier;

[0053] The server encryption submodule is used to decrypt the encrypted session key according to the injection key to obtain the session key.

[0054] On the other hand, an embodiment of the present invention further discloses an extended resource processing device for an application based on a quantum key, which is applied to a client, and the device includes:

[0055] The client communication module is used to receive the encrypted extension resources sent by the server;

[0056] A client application module, used for sending a second session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client;

[0057] A client receiving module, used for receiving the session key sent by the cryptographic service center;

[0058] A client decryption module, used to decrypt the encrypted extended resource according to the session key to obtain the extended resource;

[0059] The client loading module is used to dynamically load the extended resource into the memory and release the extended resource immediately after use.

[0060] Optionally, the client decryption module includes:

[0061] An integrity check submodule, used for decrypting the encrypted extension resource according to the session key and a preset file encryption algorithm to obtain the integrity encrypted extension resource;

[0062] The file decryption submodule is used to perform integrity verification on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

[0063] Optionally, the second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0064] The client receiving module includes:

[0065] The client receiving submodule is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0066] A client acquisition submodule, configured to obtain the charging key according to the charging key identifier;

[0067] The client decryption submodule is used to decrypt the encrypted session key according to the injection key to obtain the session key.

[0068] Correspondingly, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, each step of an embodiment of an extended resource processing method for an application based on a quantum key is implemented.

[0069] Accordingly, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the embodiment of the extended resource processing method for the above-mentioned quantum key-based application are implemented.

[0070] The embodiment of the present invention includes the following advantages: After the server sends a session key application request to the quantum cryptography service center, the embodiment of the present invention can dynamically obtain a quantum session key with extremely high security. And the quantum session key is used to encrypt the extended resources. Therefore, the unpredictability and difficulty of cracking the quantum key ensure the security and integrity of the extended resources during the transmission process. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 is a flowchart of an embodiment of a method for processing extended resources of an application based on a quantum key of the present invention;

[0072] Figure 2 It is a structural diagram of a key generation embodiment of an extended resource processing system for an application based on quantum keys of the present invention;

[0073] Figure 3 It is a flow chart of an embodiment of a method for packaging and encrypting extended resources of an application based on a quantum key of the present invention;

[0074] Figure 4 is a flowchart of another embodiment of an extended resource processing method for an application based on a quantum key of the present invention;

[0075] Figure 5 It is a structural block diagram of an embodiment of an extended resource processing device for an application based on a quantum key of the present invention;

[0076] Figure 6is a structural block diagram of another embodiment of an extended resource processing device for an application based on a quantum key of the present invention; DETAILED DESCRIPTION

[0077] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0078] In the current development environment, developers are faced with applications of various types and functions, such as standalone software installed on user computers, usually desktop applications with complete user interfaces and functions, software installed on smartphones or tablets, usually mobile applications downloaded and installed through application stores, Web (World Wide Web) applications accessed online through browsers, and embedded applications embedded in specific devices such as smart home devices. The implementation of some functions of these applications usually relies on various types of external extension resource files, such as audio and video files, configuration files, dynamic link libraries (DLLs) and many other types of external extension resources.

[0079] Quantum cryptography, also known as quantum key distribution, is a new cryptographic technology based on the principles of quantum mechanics. It uses the uncertainty principle and entangled state characteristics in quantum mechanics to achieve secure information transmission and encryption. In quantum cryptography, the generation, distribution and verification of keys all rely on the preparation, measurement and entanglement of quantum states.

[0080] One of the core concepts of the embodiments of the present invention is to ensure the file integrity and security of extended resources during transmission by leveraging the unpredictability and difficulty of cracking of quantum keys, and to obtain a highly secure extended resource processing method for an application by combining the transmission and use of extended resources with a quantum key distribution system.

[0081] Reference Figure 1 , shows a flowchart of an embodiment of an extended resource processing method for an application based on a quantum key of the present invention, which may specifically include the following steps:

[0082] Step 101, sending a first session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request, and returns the session key to the server;

[0083] When extended resource transmission is required, the server will send a first session key application request to the sub-cryptographic service center to request a session key for subsequent operations.

[0084] The Quantum Cryptography Service Center is a platform or service that focuses on providing quantum cryptography-related services and solutions, and usually has security functions such as quantum key distribution and quantum identity authentication;

[0085] In one example, the quantum cryptography service platform can be an integrated security management system, consisting of four core components: management background, key management service, cryptographic operation service and cryptographic service SDK (Software Development Kit). Among them, the management background provides comprehensive user management, application management, key management, and cryptographic device management functions, and supports diversified services such as key synchronization, symmetric / asymmetric operations, hash operations, and platform monitoring. The key management service focuses on the full life cycle management of keys, including key operations such as key generation, update, and destruction, and especially supports key filling functions. The cryptographic operation service provides high-performance symmetric and asymmetric encryption and decryption computing capabilities. The cryptographic service SDK serves as a bridge connecting the platform and applications to achieve seamless access and efficient use of various functions of the cryptographic service platform.

[0086] In another example, the process of obtaining the session key according to the key application request by the quantum cryptography service center can be a pair of symmetric keys generated by QKD (Quantum Key Distribution). QKD technology relies on advanced technologies such as quantum random number generators and quantum key distribution protocols to exchange quantum states (such as photons) through quantum channels. The communicating parties negotiate a common key based on the measurement results. The key is kept confidential between the two parties, and any attempt to intercept or eavesdrop will be detected immediately.

[0087] Reference Figure 2 , showing a structural diagram of a key generation embodiment of an extended resource processing system for an application based on a quantum key of the present invention;

[0088] The key generation embodiment includes a quantum cryptography service center for processing quantum key application services; a quantum key filling machine for filling quantum keys; a quantum cryptography switch for quantum key management; a quantum random number generator for generating quantum keys;

[0089] When the quantum service center needs to obtain a key, it will send a key application request to the quantum key switch. After the quantum key switch receives the key application, it will send a key generation application to the quantum random number generator. This application triggers the quantum random number generator to start its internal quantum random process, which relies on the principles of quantum physics and can generate truly unpredictable random numbers, and then use these random numbers to generate a session key. After the session key is generated, it is returned to the quantum key switch.

[0090] Subsequently, to ensure that the session key can be securely injected into the device that needs to use it, the quantum key exchange sends a key injection request to the quantum key injection machine. After receiving the request, the quantum key injection machine will generate a injection key, which is used to securely transmit and inject the session key into the target device. After the injection key is generated, it is also returned to the quantum key exchange.

[0091] At this point, the quantum key exchange has obtained the session key and the injection key. It will return these two keys together to the quantum service center.

[0092] Step 102, receiving the session key sent by the cryptographic service center;

[0093] After the quantum cryptography service center generates the session key, it will transmit the session key to the server.

[0094] In one embodiment, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0095] Step 102 includes the following sub-steps:

[0096] Sub-step S11, receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0097] After receiving the first session key application request, the quantum cryptography service center will obtain a session key based on the session identifier, and encrypt the session key with the injection key corresponding to this business, thereby ensuring the security of the session key.

[0098] In one example, the cryptographic service platform generates a session key by calling the quantum key distribution module and associates it with the session identifier. Subsequently, the cryptographic service platform encrypts the session key using the injection key and returns the ciphertext of the session key and the key identifier corresponding to the injection key to the server.

[0099] Sub-step S12, obtaining the charging key according to the charging key identifier;

[0100] After receiving the encrypted session key, the server obtains the charging key according to the charging key identifier;

[0101] In one example, the server applies to the quantum security shield for the corresponding injection key according to the injection key identifier.

[0102] Sub-step S13, decrypting the encrypted session key according to the injection key to obtain the session key.

[0103] The corresponding session key is indicated by the session identifier, ensuring that each session uses a different key, which enhances the security of communication. In addition, the returned session key is encrypted by the injection key, so that even if the session key is intercepted by an attacker during transmission, the attacker cannot directly obtain the real session key.

[0104] Step 103, encrypting the extended resource of the application according to the session key to obtain the encrypted extended resource;

[0105] After the session key is decrypted, the extended resource is encrypted using the session key and a preset encryption algorithm, thereby obtaining the encrypted extended resource.

[0106] In one embodiment, step 103 includes the following sub-steps:

[0107] Sub-step S21, performing integrity encryption on the extended resource according to a preset integrity encryption algorithm;

[0108] To ensure the transmission security of extended resources, the extended resources can be encrypted with the digest information encryption algorithm.

[0109] In one instance, the integrity encryption algorithm may be a summary information algorithm, such as a cryptographic hash algorithm (SM3, SM3 Cryptographic Hash Algorithm), a file signature technology, a SHA (Secure Hash Algorithm) series algorithm, and an MD series algorithm (Message-Digest Algorithm, message digest algorithm) and other types of algorithms, which are not limited in the embodiments of the present invention.

[0110] Sub-step S22, encrypting the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource.

[0111] After integrity encryption, a highly secure quantum key is used as the key to encrypt the data, further ensuring the integrity and security of the data.

[0112] In an example, the preset file encryption algorithm may be any one of symmetric encryption algorithms such as 3DES (Triple Data Encryption Standard), AES (Advanced Encryption Standard) and SM4, and the embodiment of the present invention is not limited to this.

[0113] Step 104: Send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

[0114] The embodiment of the present invention can dynamically obtain a highly secure quantum session key after the server sends a session key application request to the quantum cryptography service center. And the quantum session key is used to encrypt the extended resources. Therefore, the security and integrity of the extended resources during transmission are ensured by the unpredictability and difficulty of cracking the quantum key. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application.

[0115] Reference Figure 3 , showing a schematic flow chart of an embodiment of a method for packaging and encrypting extended resources of an application based on a quantum key of the present invention;

[0116] First, prepare the extended resource file to be operated. The file type can be .dll, .so (SharedObject), .exe (Executable File), and other types of extended resource files;

[0117] Then configure the packaging tool. Taking the electron application as an example, you can use the beforePack hook function provided by electron-builder to customize the processing flow before packaging and compress the external resource files. Other applications such as Web applications can use the Webpack construction tool to complete the above operations. Since this is the existing technology, it will not be repeated here.

[0118] After the file is compressed, the quantum key is combined with the encryption algorithm to encrypt the compressed file; after the encryption is completed, the packaging process continues; after the packaging is completed, the server distributes the packaged file to each client.

[0119] Reference Figure 4 , shows a flowchart of another embodiment of an extended resource processing method for an application based on a quantum key of the present invention, which may specifically include the following steps:

[0120] Step 201, receiving the encrypted extension resource sent by the server;

[0121] When the client needs to use the extended resource, it can send an application to the server and receive the double-encrypted extended resource file sent by the server.

[0122] Step 202, sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client;

[0123] After receiving the double-encrypted extended resource file, the client will request the quantum cryptography service center to obtain the session key for file decryption;

[0124] In one example, when sending the encrypted extended resource, the server will simultaneously send the session identifier of this service. The client adds the session identifier as a parameter to the key request and requests the session key from the quantum cryptography service center.

[0125] Step 203, receiving the session key sent by the cryptographic service center;

[0126] In one embodiment, the second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0127] In one example, after receiving the session identifier transmitted by the client, the quantum cryptography service center will first verify the identity of the client. After completing the verification, the quantum cryptography service center will query the session key associated with the session identifier, encrypt it with the injection key, and then return the injection key identifier and the encrypted session key to the client.

[0128] Step 203 includes the following sub-steps:

[0129] Sub-step S31, receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0130] Sub-step S32, obtaining the charging key according to the charging key identifier;

[0131] After receiving the encrypted session key, the client obtains the charging key according to the charging key identifier;

[0132] In one example, the client applies to the quantum security shield for the corresponding injection key according to the injection key identifier.

[0133] Sub-step S33, decrypting the encrypted session key according to the injection key to obtain the session key.

[0134] The corresponding session key is indicated by the session identifier, ensuring that each session uses a different key, which enhances the security of communication. In addition, the returned session key is encrypted by the injection key, so that even if the session key is intercepted by an attacker during transmission, the attacker cannot directly obtain the real session key.

[0135] Step 204, the session key decrypts the encrypted extended resource to obtain the extended resource;

[0136] In one embodiment, step 204 includes the following sub-steps:

[0137] Sub-step S41, decrypting the encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the integrity-encrypted extended resource;

[0138] Sub-step S42: performing integrity check on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

[0139] When using extended resources, the client will first use the same algorithm as the server encryption algorithm to perform the corresponding decryption; this double encryption method further ensures data security during data transmission.

[0140] Step 205: dynamically load the extended resource into the memory, and release the extended resource immediately after use.

[0141] When the application starts, the client decrypts the compressed and encrypted resource files and loads the decrypted files directly into the memory for calling, without leaving the decrypted plaintext files locally. If the files are tampered with, the decryption will fail and cannot be used.

[0142] In one example, when the extended function corresponding to the extended resource in the application needs to be used, the corresponding extended resource is loaded into the memory and released in time after use. This ensures the security of the resource file and avoids the risk of the decrypted plaintext file being obtained and tampered by criminals.

[0143] The embodiment of the present invention can dynamically obtain a highly secure quantum session key after the server sends a session key application request to the quantum cryptography service center. And the quantum session key is used to encrypt the extended resources. Therefore, the security and integrity of the extended resources during transmission are ensured by the unpredictability and difficulty of cracking the quantum key. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application.

[0144] 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 embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, 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 preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0145] On the other hand, the embodiment of the present invention also discloses an extended resource processing system for an application based on a quantum key, the system comprising: a server, a client and a quantum cryptography service center

[0146] The server is used to send a first session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server; receive the session key sent by the cryptography service center; encrypt the extended resource of the application according to the session key to obtain an encrypted extended resource; send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource;

[0147] The client is used to receive the encrypted extended resources sent by the server;

[0148] Sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client; receiving the session key sent by the cryptography service center, decrypting the encrypted extended resource according to the session key, and obtaining the extended resource; dynamically loading the extended resource into the memory, and releasing the extended resource immediately after use;

[0149] The quantum cryptography service center is used to receive a first session key application request sent by a server; obtain a session key according to the first session key application request; send the session key to the server; receive a second session key application request sent by a client; obtain the session key according to the second session key application request; and send the session key to the client.

[0150] In one embodiment, the server is used to perform integrity encryption on the extended resource according to a preset integrity encryption algorithm; perform file encryption on the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource;

[0151] The client is used to decrypt the encrypted extended resource according to the session key and the preset file encryption algorithm to obtain the extended resource encrypted with integrity; and perform integrity verification on the extended resource encrypted with integrity according to the preset integrity encryption algorithm to obtain the extended resource.

[0152] In one embodiment, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the charging key; the server is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; obtain the charging key according to the charging key identifier; decrypt the encrypted session key according to the charging key to obtain the session key;

[0153] The second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the charging key; the client is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; obtain the charging key according to the charging key identifier; decrypt the encrypted session key according to the charging key to obtain the session key;

[0154] The quantum cryptography service center is used to encrypt the session key corresponding to the session identifier according to the injection key; send the encrypted session key and the injection key identifier corresponding to the injection key to the server; and send the encrypted session key and the injection key identifier corresponding to the injection key to the client.

[0155] The embodiment of the present invention can dynamically obtain a highly secure quantum session key after the server sends a session key application request to the quantum cryptography service center. And the quantum session key is used to encrypt the extended resources. Therefore, the security and integrity of the extended resources during transmission are ensured by the unpredictability and difficulty of cracking the quantum key. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application.

[0156] Reference Figure 5 , shows a structural block diagram of an embodiment of an extended resource processing device for an application based on a quantum key of the present invention, which may specifically include the following modules:

[0157] The server application module 301 is used to send a first session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server;

[0158] The server receiving module 302 is used to receive the session key sent by the cryptographic service center;

[0159] The server encryption module 303 is used to encrypt the extended resource of the application according to the session key to obtain the encrypted extended resource;

[0160] The server sending module 304 is used to send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

[0161] In one embodiment, the extended resource encryption module further includes:

[0162] An integrity encryption submodule, used to perform integrity encryption on the extended resource according to a preset integrity encryption algorithm;

[0163] The file encryption submodule is used to perform file encryption on the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource.

[0164] In one embodiment, the first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0165] The server receiving module comprises:

[0166] A server receiving submodule, configured to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0167] A server acquisition submodule, configured to obtain the charging key according to the charging key identifier;

[0168] The server encryption submodule is used to decrypt the encrypted session key according to the injection key to obtain the session key.

[0169] The embodiment of the present invention can dynamically obtain a highly secure quantum session key after the server sends a session key application request to the quantum cryptography service center. And the quantum session key is used to encrypt the extended resources. Therefore, the security and integrity of the extended resources during transmission are ensured by the unpredictability and difficulty of cracking the quantum key. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application.

[0170] Reference Figure 6 , shows a structural block diagram of another embodiment of an extended resource processing device for an application based on a quantum key of the present invention, which may specifically include the following modules:

[0171] The client communication module 401 is used to receive the encrypted extended resources sent by the server;

[0172] The client application module 402 is used to send a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains the session key according to the second session key application request and returns the session key to the client;

[0173] The client receiving module 403 is used to receive the session key sent by the cryptographic service center;

[0174] The client decryption module 404 is used to decrypt the encrypted extended resource according to the session key to obtain the extended resource;

[0175] The client loading module 405 is used to dynamically load the extended resource into the memory and release the extended resource immediately after the use is over.

[0176] In one embodiment, the client decryption module includes:

[0177] An integrity check submodule, used for decrypting the encrypted extension resource according to the session key and a preset file encryption algorithm to obtain the integrity encrypted extension resource;

[0178] The file decryption submodule is used to perform integrity verification on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

[0179] In one embodiment, the second session key application request carries a session identifier, and the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key;

[0180] The client receiving module comprises:

[0181] The client receiving submodule is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center;

[0182] A client acquisition submodule, configured to obtain the charging key according to the charging key identifier;

[0183] The client decryption submodule is used to decrypt the encrypted session key according to the injection key to obtain the session key.

[0184] The embodiment of the present invention can dynamically obtain a highly secure quantum session key after the server sends a session key application request to the quantum cryptography service center. And the quantum session key is used to encrypt the extended resources. Therefore, the security and integrity of the extended resources during transmission are ensured by the unpredictability and difficulty of cracking the quantum key. In addition, the encrypted extended resources are securely sent to the client, so that the client can use the corresponding decryption mechanism to decrypt and use these resources. This process not only ensures the safe use of resources on the client, but also further strengthens the security of the entire extended resource distribution and use process. Therefore, the embodiment of the present invention can effectively solve the risk of tampering that the external resource files of the application may face, and provide a solid guarantee for the stable operation of the application.

[0185] 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.

[0186] An embodiment of the present invention further provides an electronic device, including:

[0187] The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of an embodiment of an extended resource processing method for an application based on a quantum key is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0188] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned embodiment of an extended resource processing method for an application based on a quantum key are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0189] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0190] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0191] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0192] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0194] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0195] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0196] The above is a detailed introduction to an extended resource processing method and system for a quantum key-based application provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for processing extended resources of an application based on quantum keys, characterized in that: Applied to a server, the method comprises: Sending a first session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server; Receiving a session key sent by the cryptographic service center; Encrypting the extended resource of the application according to the session key to obtain the encrypted extended resource; The encrypted extended resource is sent to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

2. The method according to claim 1, characterized in that The step of encrypting the extended resource according to the session key to obtain the encrypted extended resource includes: Performing integrity encryption on the extended resource according to a preset integrity encryption algorithm; The extended resource after the integrity encryption is encrypted according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource.

3. The method according to claim 1 or 2, characterized in that: The first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key; The receiving the session key sent by the cryptographic service center comprises: Receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; Obtaining the charging key according to the charging key identifier; The encrypted session key is decrypted according to the injection key to obtain the session key.

4. A method for processing extended resources of an application based on quantum keys, characterized in that: Applied to a client, the method comprises: Receive the encrypted extension resource sent by the server; Sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client; Receiving a session key sent by the cryptographic service center; Decrypting the encrypted extended resource according to the session key to obtain the extended resource; The extended resource is dynamically loaded into the memory, and the extended resource is released immediately after use.

5. The method according to claim 4, characterized in that The decrypting the encrypted extended resource according to the session key to obtain the extended resource comprises: Decrypt the encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the integrity-encrypted extended resource; An integrity check is performed on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

6. The method according to claim 4 or 5, characterized in that: The second session key application request carries a session identifier, where the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key; The receiving the session key sent by the cryptographic service center comprises: Receiving the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; Obtaining the charging key according to the charging key identifier; The encrypted session key is decrypted according to the injection key to obtain the session key.

7. An extended resource processing system for quantum key-based applications, characterized in that: The system includes: a server, a client and a quantum cryptography service center The server is used to send a first session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server; receive the session key sent by the cryptography service center; encrypt the extended resource of the application according to the session key to obtain an encrypted extended resource; send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource; The client is used to receive the encrypted extended resources sent by the server; Sending a second session key application request to the quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client; receiving the session key sent by the cryptography service center, decrypting the encrypted extended resource according to the session key, and obtaining the extended resource; dynamically loading the extended resource into the memory, and releasing the extended resource immediately after use; The quantum cryptography service center is used to receive a first session key application request sent by a server; obtain a session key according to the first session key application request; send the session key to the server; receive a second session key application request sent by a client; obtain the session key according to the second session key application request; and send the session key to the client.

8. The system according to claim 7, characterized in that The server is used to perform integrity encryption on the extended resource according to a preset integrity encryption algorithm; perform file encryption on the integrity-encrypted extended resource according to the session key and a preset file encryption algorithm to obtain the encrypted extended resource; The client is used to decrypt the encrypted extension resource according to the session key and a preset file encryption algorithm to obtain the integrity-encrypted extension resource; An integrity check is performed on the integrity-encrypted extended resource according to a preset integrity encryption algorithm to obtain the extended resource.

9. The system according to claim 8, characterized in that The first session key application request carries the session identifier; the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key; The server is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; and obtain the charging key according to the charging key identifier; Decrypting the encrypted session key according to the injection key to obtain the session key; The second session key application request carries a session identifier, where the session identifier is used to indicate the session key corresponding to the session identifier; the session key returned by the cryptographic service center is the session key corresponding to the session identifier encrypted by the cryptographic service center according to the injection key; The client is used to receive the encrypted session key and the charging key identifier corresponding to the charging key sent by the cryptographic service center; and obtain the charging key according to the charging key identifier; Decrypting the encrypted session key according to the injection key to obtain the session key; The quantum cryptography service center is used to encrypt the session key corresponding to the session identifier according to the injection key; send the encrypted session key and the injection key identifier corresponding to the injection key to the server; and send the encrypted session key and the injection key identifier corresponding to the injection key to the client.

10. An extended resource processing device for an application based on quantum key, characterized in that: Applied to a server, the device comprises: A server application module is used to send a first session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the key application request and returns the session key to the server; A server receiving module, used for receiving the session key sent by the cryptographic service center; A server encryption module, used for encrypting the extended resources of the application according to the session key to obtain the encrypted extended resources; The server sending module is used to send the encrypted extended resource to the client, so that the client obtains and uses the extended resource according to the encrypted extended resource.

11. An extended resource processing device for an application based on quantum key, characterized in that: Applied to a client, the device comprises: The client communication module is used to receive the encrypted extension resources sent by the server; A client application module, used for sending a second session key application request to a quantum cryptography service center, so that the quantum cryptography service center obtains a session key according to the second session key application request, and returns the session key to the client; A client receiving module, used for receiving the session key sent by the cryptographic service center; A client decryption module, used to decrypt the encrypted extended resource according to the session key to obtain the extended resource; The client loading module is used to dynamically load the extended resource into the memory and release the extended resource immediately after use.

12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of an extended resource processing method for an application based on a quantum key as described in any one of claims 1-3 or 4-6 are implemented.

13. 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 the processor, the steps of the extended resource processing method for an application based on a quantum key as described in any one of claims 1-3 or 4-6 are implemented.

Citation Information

Patent Citations

  • Secret communication method, secret key distribution center, equipment, medium and product

    CN118827017A