Quantum key-based interface calling and authentication method and device
By using quantum keys to encrypt and transmit target tokens, the security issues of traditional APP interface authentication methods are solved, ensuring absolute security during token transmission and preventing token and data leakage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM QUANTUM TECH CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-04-17
AI Technical Summary
Existing APP interface authentication methods, such as token authentication, have risks to transmission and storage security. Once the token is leaked, attackers can impersonate legitimate users to perform operations, leading to the leakage of sensitive data and damage to system resources.
The target token is encrypted and transmitted using quantum keys. Session keys are generated and decrypted through a quantum encryption service platform to ensure absolute security during transmission.
It effectively prevents the target token from being leaked during transmission, avoiding the risk of sensitive data leakage and damage to system resource services, and achieves theoretically absolute security.
Smart Images

Figure CN119766551B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of identity authentication technology, and in particular to an interface call, authentication method and apparatus based on quantum key distribution, an electronic device and a storage medium. Background Technology
[0002] Currently, mainstream APP (Application) interface authentication methods mainly include token authentication, OAuth (Open Authorization) authentication, and biometric authentication. Among these, token authentication is widely used in mobile apps due to its stateless nature and cross-domain support, especially in scenarios requiring frequent identity verification and authorization. OAuth authentication is primarily used in scenarios requiring third-party login or access to sensitive user information, effectively separating user authorization from resource access. Biometric authentication is typically used for user login verification, payment verification, and other scenarios, using technologies such as fingerprint and facial recognition to enhance the security and convenience of identity verification.
[0003] However, mainstream API authentication schemes also have some drawbacks. Taking the commonly used token authentication as an example, although it has advantages such as statelessness and cross-domain support, it still carries certain risks in terms of transmission and storage security. Tokens typically contain a user's identity information and permissions, and during transmission between the client and server, they may be intercepted by unauthorized third parties, leading to token leakage. Once a token is leaked, attackers can impersonate legitimate users to perform various operations, including accessing sensitive data and executing malicious commands. Summary of the Invention
[0004] This application provides a quantum key-based interface calling method and a quantum key-based interface authentication method to solve or at least partially solve the above-mentioned problems.
[0005] Accordingly, embodiments of this application also provide a quantum key-based interface calling device, a quantum key-based interface authentication device, an electronic device, and a storage medium to ensure the implementation and application of the above methods.
[0006] To address the aforementioned issues, this application discloses a quantum key-based interface invocation method applied to a terminal device, wherein the terminal device is communicatively connected to a service server. The method includes:
[0007] Obtain the target token;
[0008] The target token is quantum encrypted to obtain a quantum encrypted token;
[0009] Send a business request for the target interface to the business server; the business request includes the quantum encryption token;
[0010] Receive the authentication result for the quantum encryption token returned by the service server;
[0011] Based on the authentication result, the target interface is invoked.
[0012] Optionally, the terminal device has a user identification module card, which has a corresponding mobile phone number and identification code, and the step of obtaining the target token includes:
[0013] Send a login request to the business server, the login request including the mobile phone number and the identification code;
[0014] Receive the target token returned by the service server; the target token is generated based on the mobile phone number and the identification code.
[0015] Optionally, the user identification module card has a first refill key, the terminal device is communicatively connected to the quantum encryption service platform, and the step of quantum encryption of the target token to obtain a quantum encryption token includes:
[0016] Send a session key acquisition request to the quantum encryption service platform;
[0017] Receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform; the second charging key is symmetrical to the first charging key;
[0018] The first charging key is obtained based on the key identifier corresponding to the second charging key;
[0019] The encrypted session key is decrypted using the first filling key to obtain the target session key;
[0020] The target token is quantum encrypted using the target session key to obtain the quantum encrypted token.
[0021] Optionally, the quantum encryption service platform includes a quantum key distribution service and a quantum random number generator, and the method further includes:
[0022] Receive the first injection key generated by the quantum encryption service platform;
[0023] Inject the first charging key into the user identification module card.
[0024] Optionally, after sending the session key acquisition request to the quantum encryption service platform, the method further includes:
[0025] Obtain quantum random numbers;
[0026] The quantum random number is sent to the quantum encryption service platform, and the quantum random number has a corresponding session key identifier;
[0027] After the quantum encryption service platform generates the encrypted session key using the session key identifier and the second charging key, it receives the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform.
[0028] This application also discloses a quantum key-based interface authentication method applied to a business server, wherein the business server is communicatively connected to a terminal device and a quantum encryption service platform, and the method includes:
[0029] Receive a service request from the terminal device for a target interface; the service request includes a quantum encryption token.
[0030] Obtain the key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform;
[0031] A fourth charging key, symmetrical to the third charging key, is obtained using the key identifier corresponding to the third charging key;
[0032] The encrypted session key is decrypted using the fourth injection key to obtain the target session key;
[0033] The quantum encryption token is decrypted using the target session key to obtain the target token;
[0034] Verify the target token to obtain the authentication result;
[0035] The authentication result is returned to the terminal device.
[0036] This application also discloses a quantum key-based interface calling device applied to a terminal device, wherein the terminal device is communicatively connected to a service server, and the device includes:
[0037] The token acquisition module is used to acquire the target token;
[0038] A token encryption module is used to perform quantum encryption on the target token to obtain a quantum encrypted token;
[0039] A business request sending module is used to send a business request for a target interface to the business server; the business request includes the quantum encryption token.
[0040] The authentication result receiving module is used to receive the authentication result for the quantum encryption token returned by the business server;
[0041] The interface invocation module is used to invoke the target interface based on the authentication result.
[0042] This application also discloses a quantum key-based interface authentication device applied to a business server. The business server is communicatively connected to a terminal device and a quantum encryption service platform, respectively. The device includes:
[0043] A service request receiving module is used to receive service requests from the terminal device for a target interface; the service request includes a quantum encryption token.
[0044] The key receiving module is used to obtain the key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform;
[0045] The refill key acquisition module is used to acquire a fourth refill key that is symmetrical to the third refill key by using the key identifier corresponding to the third refill key;
[0046] The session key decryption module is used to decrypt the encrypted session key using the fourth injection key to obtain the target session key;
[0047] The token decryption module is used to decrypt the quantum encryption token using the target session key to obtain the target token;
[0048] The token verification module is used to verify the target token and obtain the authentication result;
[0049] The authentication result return module is used to return the authentication result to the terminal device.
[0050] This application also discloses an electronic device, including: a processor; and a memory storing executable code thereon, wherein when the executable code is executed, the processor performs one or more of the quantum key-based interface call and authentication methods described in the embodiments of this application.
[0051] This application also discloses one or more machine-readable media storing executable code, which, when executed, causes a processor to perform one or more of the quantum key-based interface calls and authentication methods described in this application.
[0052] Compared with the prior art, the embodiments of this application have the following advantages:
[0053] In this embodiment, a target token is obtained; the target token is quantum encrypted to obtain a quantum encrypted token; a business request for the target interface is sent to the business server; the business request includes the quantum encrypted token; the authentication result for the quantum encrypted token returned by the business server is received; and the target interface is invoked based on the authentication result. This embodiment effectively solves the shortcomings of traditional target token authentication methods in terms of transmission security by introducing a quantum key to encrypt the transmission of the target token. Quantum encryption technology, based on the principles of quantum mechanics, ensures the theoretical absolute security of encrypted information. Any attempt to eavesdrop on or tamper with the quantum key will be detected immediately, thereby effectively preventing the leakage of the target token during transmission.
[0054] In this embodiment, a service request from a terminal device for a target interface is received. The service request includes a quantum encryption token. The process involves obtaining the encrypted session key sent by the quantum encryption service platform and the key identifier corresponding to the third recharge key. A fourth recharge key, symmetrical to the third recharge key, is obtained using the key identifier corresponding to the third recharge key. The encrypted session key is decrypted using the fourth recharge key to obtain the target session key. The quantum encryption token is decrypted using the target session key to obtain the target token. The target token is verified to obtain an authentication result. The authentication result is then returned to the terminal device. This embodiment addresses the security issues associated with the transmission of the target token between the client and server by introducing a quantum key to encrypt the target token during transmission. The quantum encryption token is then decrypted and verified on the service server side, effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and damage to system resource services. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating the steps of an embodiment of an interface calling method based on quantum keys according to this application;
[0056] Figure 2 This is a flowchart illustrating the steps of an embodiment of an interface authentication method based on quantum keys according to this application.
[0057] Figure 3 This is a detailed flowchart of an embodiment of an interface call and authentication method based on quantum key distribution according to this application;
[0058] Figure 4 This is a structural block diagram of an embodiment of an interface calling device based on quantum keys according to this application;
[0059] Figure 5 This is a structural block diagram of an embodiment of an interface authentication device based on quantum key distribution according to this application;
[0060] Figure 6 This is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation
[0061] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] Reference Figure 1 This is a flowchart illustrating the steps of an embodiment of an interface invocation method based on quantum keys, as described in this application, including the following steps:
[0063] Step 101: Obtain the target token.
[0064] The quantum key-based interface calling method illustrated in this application is applied to a terminal device equipped with a SIM card (Subscriber Identity Module). The terminal device also integrates a quantum security shield application SDK (Software Development Kit), allowing it to communicate with a quantum encryption service platform. Simultaneously, the terminal device acts as a client, communicating with the business server of an app, and this business server provides an interface.
[0065] Among them, the quantum encryption service platform can provide quantum key generation and encryption / decryption capabilities. The quantum security shield application SDK provides applications with functions such as session key application, group key application, and key refilling in the form of a library. It supports the SSL (Secure Sockets Layer protocol, an encryption protocol used to protect the security of network communications) protocol and can be applied to key acquisition for terminal devices and business servers in scenarios such as VPN (Virtual Private Network), IoT, and mobile communications.
[0066] In one embodiment, the terminal device can be a quantum VoLTE (Voice over Long-Term Evolution) customized terminal. The quantum VoLTE customized terminal consists of a VoLTE mobile phone, a quantum SIM card, and a security shield APP (i.e., the quantum security shield application). The SIM card serves as the quantum key storage medium, and the security shield APP provides the ability to interact with the quantum cryptography service platform.
[0067] In step 101, when the terminal device is powered on, a target token can be obtained from the business server. The target token can be used for authentication of all subsequent interface requests to the business server.
[0068] Step 102: Perform quantum encryption on the target token to obtain a quantum encrypted token.
[0069] In step 102, when a business request needs to be sent to the business server, the target token is quantum encrypted on the terminal device to obtain a quantum encrypted token.
[0070] Step 103: Send a business request for the target interface to the business server; the business request includes the quantum encryption token.
[0071] In step 103, the quantum encryption token is added as an authentication parameter to the service request, and the terminal device sends a service request for the target interface to the service server.
[0072] Step 104: Receive the authentication result for the quantum encryption token returned by the business server.
[0073] In step 104, after receiving a service request containing a quantum encryption token, the service server authenticates the quantum encryption token, obtains the authentication result, and returns the authentication result to the terminal device. The terminal device receives the authentication result for the quantum encryption token returned by the service server.
[0074] Step 105: Based on the authentication result, call the target interface.
[0075] In step 105, if the business server authenticates the quantum encryption token, the terminal device can call the target interface to execute the corresponding business operation.
[0076] In this embodiment, a target token is obtained; the target token is quantum encrypted to obtain a quantum encrypted token; a business request for the target interface is sent to the business server; the business request includes the quantum encrypted token; the authentication result for the quantum encrypted token returned by the business server is received; and the target interface is invoked based on the authentication result. This embodiment effectively solves the shortcomings of traditional target token authentication methods in terms of transmission security by introducing a quantum key to encrypt the transmission of the target token. Quantum encryption technology, based on the principles of quantum mechanics, ensures the theoretical absolute security of encrypted information. Any attempt to eavesdrop on or tamper with the quantum key will be detected immediately, thereby effectively preventing the leakage of the target token during transmission.
[0077] Optionally, the terminal device has a user identification module card, which has a corresponding mobile phone number and identification code. Step 101 includes:
[0078] Send a login request to the business server, the login request including the mobile phone number and the identification code;
[0079] Receive the target token returned by the service server; the target token is generated based on the mobile phone number and the identification code.
[0080] In this embodiment, the specific steps for the terminal device to obtain the target token from the service server may include the following steps.
[0081] The terminal device integrates a security shield APP that supports quantum encryption and decryption capabilities. When the terminal device is powered on, the security shield APP will be launched in the background. The security shield APP uses the mobile phone number corresponding to the SIM card in the terminal device and the ICCID (Integrated Circuit Card Identity) information as parameters to send a login request to the business server to apply for login.
[0082] After receiving a login request containing a mobile phone number and identification code, the service server generates a target token based on the mobile phone number and identification code, and returns the login result and the target token to the terminal device. The terminal device receives the target token returned by the service server.
[0083] In this embodiment of the application, when the terminal device is powered on, a target token is obtained from the business server for authentication when calling the target interface.
[0084] Optionally, the user identification module card has a first charging key, the terminal device is communicatively connected to the quantum encryption service platform, and step 102 includes:
[0085] Send a session key acquisition request to the quantum encryption service platform;
[0086] Receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform; the second charging key is symmetrical to the first charging key;
[0087] The first charging key is obtained based on the key identifier corresponding to the second charging key;
[0088] The encrypted session key is decrypted using the first filling key to obtain the target session key;
[0089] The target token is quantum encrypted using the target session key to obtain the quantum encrypted token.
[0090] In this embodiment, when the terminal device needs to send a service request containing a target token to the service server, the target token is first encrypted on the terminal device, and then the encrypted target token is sent to the service server for authentication.
[0091] Specifically, the terminal device first sends a session key acquisition request to the quantum encryption service platform. In one embodiment, the terminal device can obtain a quantum random number as the session key and send a session key acquisition request containing the session key to the quantum encryption service platform. After receiving the session key acquisition request, the quantum encryption service platform generates an encrypted session key based on the identifier of the session key and the second charging key stored in the quantum encryption service platform, and returns the encrypted session key and the key identifier corresponding to the second charging key to the terminal device.
[0092] The second charging key and the first charging key are a pair of symmetrical quantum keys. The second charging key is stored by the quantum encryption service platform, and the first charging key is stored by the SIM card of the terminal device.
[0093] After receiving the encrypted session key and the key identifier corresponding to the second recharge key from the quantum encryption service platform, the terminal device retrieves the first recharge key corresponding to the second recharge key from the SIM card based on the key identifier corresponding to the second recharge key. It then uses the first recharge key to decrypt the encrypted session key, obtaining the target session key. Finally, it uses the target session key to perform quantum encryption on the target token, obtaining a quantum encryption token. The target session key is a quantum key.
[0094] In this embodiment of the application, the target token is first quantum encrypted on the terminal device before being sent to the service server, which effectively prevents the target token from being leaked during transmission.
[0095] Optionally, the quantum encryption service platform includes a quantum key distribution service and a quantum random number generator, and the method further includes:
[0096] Receive the first injection key generated by the quantum encryption service platform;
[0097] Inject the first charging key into the user identification module card.
[0098] In this embodiment, the first charging key can be injected into the SIM card of the terminal device for subsequent encryption of the target token.
[0099] Specifically, the quantum encryption service platform includes a quantum key distribution (QKD) service and a quantum random number generator. The QKD service and the quantum random number generator exchange quantum states (such as photons) through a quantum channel and negotiate a common key based on the measurement results of the quantum states. This key is kept secret from both parties; any attempt to intercept or eavesdrop will be detected. Half of the generated key pair (the first charging key) is injected into the SIM card, and the symmetrical other half (the second charging key) is stored in the quantum encryption service platform. The SIM card charged with the first charging key is integrated into the terminal device, ensuring normal connection and communication between the SIM card and the communication module (i.e., the quantum security shield application SDK).
[0100] In one embodiment, the injection process may employ a secure key injection protocol to ensure the security and integrity of the key.
[0101] This application embodiment prevents the target token from being stolen by embedding a SIM card with a first charging key into the terminal device, and then encrypting the target token with a quantum key before transmitting it to the service server, thereby preventing the risk of sensitive data leakage and damage to system resource services.
[0102] Optionally, after sending the session key acquisition request to the quantum encryption service platform, the method further includes:
[0103] Obtain quantum random numbers;
[0104] The quantum random number is sent to the quantum encryption service platform, and the quantum random number has a corresponding session key identifier;
[0105] After the quantum encryption service platform generates the encrypted session key using the session key identifier and the second charging key, it receives the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform.
[0106] In this embodiment, the quantum encryption service platform generating the encrypted session key may specifically include the following steps.
[0107] The terminal device obtains a quantum random number as a session key and sends the quantum random number to the quantum encryption service platform. The session key has a corresponding session key identifier.
[0108] After receiving a quantum random number, the quantum encryption service platform obtains its corresponding session key identifier, binds it based on the Session ID and the session key identifier to obtain the target session key. Then, it encrypts the target session key using a second charging key to obtain the encrypted session key, and returns the encrypted session key and the key identifier corresponding to the second charging key to the terminal device.
[0109] The terminal device in this application embodiment can request a session key from the quantum encryption service platform for subsequent target token encryption. The quantum encryption service platform can use a second charging key to encrypt the session key before transmission, thus ensuring the security of the session key transmission.
[0110] In this embodiment, a target token is obtained; the target token is quantum encrypted to obtain a quantum encrypted token; a business request for the target interface is sent to the business server; the business request includes the quantum encrypted token; the authentication result for the quantum encrypted token returned by the business server is received; and the target interface is invoked based on the authentication result. This embodiment effectively solves the shortcomings of traditional target token authentication methods in terms of transmission security by introducing a quantum key to encrypt the transmission of the target token. Quantum encryption technology, based on the principles of quantum mechanics, ensures the theoretical absolute security of encrypted information. Any attempt to eavesdrop on or tamper with the quantum key will be detected immediately, thereby effectively preventing the leakage of the target token during transmission.
[0111] Based on the above embodiments, this embodiment also provides an interface authentication method based on quantum keys.
[0112] Reference Figure 2 The diagram illustrates a flowchart of an embodiment of an interface authentication method based on quantum keys, comprising the following steps:
[0113] Step 201: Receive the service request from the terminal device for the target interface; the service request includes a quantum encryption token.
[0114] The quantum key-based interface authentication method shown in this application is applied to a business server, which is connected to a terminal device and a quantum encryption service platform.
[0115] In step 201, the service server can receive a service request sent by the terminal device for the target interface. The service request includes a quantum encryption token and a session ID.
[0116] Step 202: Obtain the key identifier corresponding to the encrypted session key and the third charging key sent by the quantum encryption service platform.
[0117] In step 202, the service server can request the corresponding session key from the quantum encryption service platform based on the session ID. After encrypting the session key using a third refill key, the quantum encryption service platform sends the encrypted session key and the key identifier corresponding to the third refill key to the service server.
[0118] The third and fourth charging keys are a pair of symmetric quantum keys. The third charging key is stored by the quantum encryption service platform, and the fourth charging key is stored by the business server. The third and fourth charging keys are generated synchronously when the first and second charging keys are generated.
[0119] Step 203: Use the key identifier corresponding to the third charging key to obtain a fourth charging key that is symmetrical to the third charging key.
[0120] In step 203, the service server uses the key identifier corresponding to the third recharge key to obtain the fourth recharge key stored on the service server that is symmetrical to the third recharge key.
[0121] Step 204: Decrypt the encrypted session key using the fourth filling key to obtain the target session key.
[0122] In step 204, after obtaining the fourth recharge key, the service server uses the fourth recharge key to decrypt the encrypted session key to obtain the target session key.
[0123] Step 205: Decrypt the quantum encryption token using the target session key to obtain the target token.
[0124] In step 205, after obtaining the target session key, the business server uses the target session key to decrypt the quantum encryption token to obtain the target token.
[0125] Step 206: Verify the target token to obtain the authentication result.
[0126] Step 207: Return the authentication result to the terminal device.
[0127] In steps 206 and 207, after the service server decrypts the target token, it verifies the target token to obtain the authentication result and returns the authentication result to the terminal device.
[0128] In this embodiment, a service request from a terminal device for a target interface is received. The service request includes a quantum encryption token. The process involves obtaining the encrypted session key sent by the quantum encryption service platform and the key identifier corresponding to the third recharge key. A fourth recharge key, symmetrical to the third recharge key, is obtained using the key identifier corresponding to the third recharge key. The encrypted session key is decrypted using the fourth recharge key to obtain the target session key. The quantum encryption token is decrypted using the target session key to obtain the target token. The target token is verified to obtain an authentication result. The authentication result is then returned to the terminal device. This embodiment addresses the security issues associated with the transmission of the target token between the client and server by introducing a quantum key to encrypt the target token during transmission. The quantum encryption token is then decrypted and verified on the service server side, effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and damage to system resource services.
[0129] The following will combine Figure 3 This application provides a detailed description of an interface call and authentication method based on quantum keys, as illustrated in the embodiments, so that those skilled in the art can understand the technical solution of this application.
[0130] Reference Figure 3 This is a detailed flowchart of an embodiment of an interface call and authentication method based on quantum key distribution, as described in this application.
[0131] Step 301: The VoLTE customized terminal requests login from the service server based on the phone number and ICCID.
[0132] Step 302: The service server returns the login result and authentication token to the VoLTE customized terminal.
[0133] Step 303: The VoLTE customized terminal requests a session key from the security service platform using the session ID through the Security Shield APP.
[0134] Step 304: The secure service platform generates a session key HKey based on the session ID, encrypts the HKey using the charging key CKey (second charging key), and returns the encrypted HKey and the corresponding KeyTag to the VoLTE customized terminal through the security shield APP.
[0135] Step 305: The Security Shield APP requests the corresponding charging key Ckey' (first charging key) from the SIM card based on the KeyTag, and receives the Ckey' returned by the SIM card.
[0136] Step 306: The Security Shield APP uses Ckey' to decrypt the encrypted ciphertext HKey, and the VoLTE customized terminal uses the plaintext HKey to encrypt the Token.
[0137] Step 307: The VoLTE customized terminal requests the service interface from the service server based on the encrypted token and session ID.
[0138] Step 308: The business server requests the corresponding HKey from the security service platform based on the session ID.
[0139] Step 309: The secure service platform encrypts HKey using the injection key CKey" (third injection key) and then returns the encrypted HKey and the KeyTag corresponding to CKey" to the business server.
[0140] Step 310: The service server uses the charging key Ckey"' (fourth charging key) corresponding to the KeyTag request to decrypt the encrypted ciphertext HKey, uses the plaintext HKey to decrypt the Token, verifies the Token's legality, and returns the service result to the VoLTE customized terminal.
[0141] In this embodiment, a target token is obtained; the target token is quantum encrypted to obtain a quantum encrypted token; a business request for the target interface is sent to the business server; the business request includes the quantum encrypted token; the authentication result for the quantum encrypted token returned by the business server is received; and the target interface is invoked based on the authentication result. This embodiment effectively solves the shortcomings of traditional target token authentication methods in terms of transmission security by introducing a quantum key to encrypt the transmission of the target token. Quantum encryption technology, based on the principles of quantum mechanics, ensures the theoretical absolute security of encrypted information. Any attempt to eavesdrop on or tamper with the quantum key will be detected immediately, thereby effectively preventing the leakage of the target token during transmission.
[0142] In this embodiment, a service request from a terminal device for a target interface is received. The service request includes a quantum encryption token. The process involves obtaining the encrypted session key sent by the quantum encryption service platform and the key identifier corresponding to the third recharge key. A fourth recharge key, symmetrical to the third recharge key, is obtained using the key identifier corresponding to the third recharge key. The encrypted session key is decrypted using the fourth recharge key to obtain the target session key. The quantum encryption token is decrypted using the target session key to obtain the target token. The target token is verified to obtain an authentication result. The authentication result is then returned to the terminal device. This embodiment addresses the security issues associated with the transmission of the target token between the client and server by introducing a quantum key to encrypt the target token during transmission. The quantum encryption token is then decrypted and verified on the service server side, effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and damage to system resource services.
[0143] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0144] Based on the above embodiments, this embodiment also provides a quantum key-based interface calling device and a quantum key-based interface authentication device, which can be applied to terminal devices, servers and other electronic devices.
[0145] Reference Figure 4 The diagram illustrates a structural block diagram of an embodiment of an interface calling device based on quantum keys, which may specifically include the following modules:
[0146] Token acquisition module 401 is used to acquire the target token;
[0147] Token encryption module 402 is used to perform quantum encryption on the target token to obtain a quantum encrypted token;
[0148] The service request sending module 403 is used to send a service request for a target interface to the service server; the service request includes the quantum encryption token.
[0149] The authentication result receiving module 404 is used to receive the authentication result for the quantum encryption token returned by the business server;
[0150] The interface invocation module 405 is used to invoke the target interface based on the authentication result.
[0151] Optionally, the terminal device has a user identification module card, which has a corresponding mobile phone number and identification code. The token acquisition module 401 includes:
[0152] The login request submodule is used to send a login request to the business server, the login request including the mobile phone number and the identification code;
[0153] The target token receiving submodule is used to receive the target token returned by the business server; the target token is generated based on the mobile phone number and the identification code.
[0154] Optionally, the user identification module card has a first charging key, the terminal device is communicatively connected to the quantum encryption service platform, and the token encryption module 402 includes:
[0155] The session key request submodule is used to send a session key acquisition request to the quantum encryption service platform;
[0156] The session key receiving submodule is used to receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform; the second charging key is symmetrical to the first charging key;
[0157] The first refill key acquisition submodule is used to acquire the first refill key according to the key identifier corresponding to the second refill key;
[0158] The first injection key decryption submodule is used to decrypt the encrypted session key using the first injection key to obtain the target session key;
[0159] The target token encryption submodule is used to perform quantum encryption on the target token using the target session key to obtain the quantum encrypted token.
[0160] Optionally, the quantum encryption service platform includes a quantum key distribution service and a quantum random number generator, and the device further includes:
[0161] The first injection key generation module is used to receive the first injection key generated by the quantum encryption service platform;
[0162] The first charging key injection module is used to inject the first charging key into the user identification module card.
[0163] Optionally, the device further includes:
[0164] The random number generation module is used to obtain quantum random numbers;
[0165] A random number sending module is used to send the quantum random number to the quantum encryption service platform, wherein the quantum random number has a corresponding session key identifier;
[0166] The identifier binding module is used to receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform after the quantum encryption service platform generates the encrypted session key using the session key identifier and the second charging key.
[0167] In this embodiment, a target token is obtained; the target token is quantum encrypted to obtain a quantum encrypted token; a business request for the target interface is sent to the business server; the business request includes the quantum encrypted token; the authentication result for the quantum encrypted token returned by the business server is received; and the target interface is invoked based on the authentication result. This embodiment effectively solves the shortcomings of traditional target token authentication methods in terms of transmission security by introducing a quantum key to encrypt the transmission of the target token. Quantum encryption technology, based on the principles of quantum mechanics, ensures the theoretical absolute security of encrypted information. Any attempt to eavesdrop on or tamper with the quantum key will be detected immediately, thereby effectively preventing the leakage of the target token during transmission.
[0168] Reference Figure 5 The diagram shows a structural block diagram of an embodiment of an interface authentication device based on quantum key distribution according to this application, which may specifically include the following modules:
[0169] The service request receiving module 501 is used to receive a service request from the terminal device for a target interface; the service request includes a quantum encryption token.
[0170] The key receiving module 502 is used to obtain the key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform;
[0171] The refill key acquisition module 503 is used to acquire a fourth refill key that is symmetrical to the third refill key by using the key identifier corresponding to the third refill key;
[0172] The session key decryption module 504 is used to decrypt the encrypted session key using the fourth injection key to obtain the target session key;
[0173] Token decryption module 505 is used to decrypt the quantum encryption token using the target session key to obtain the target token;
[0174] The token verification module 506 is used to verify the target token and obtain the authentication result.
[0175] The authentication result return module 507 is used to return the authentication result to the terminal device.
[0176] In this embodiment, a service request from a terminal device for a target interface is received. The service request includes a quantum encryption token. The process involves obtaining the encrypted session key sent by the quantum encryption service platform and the key identifier corresponding to the third recharge key. A fourth recharge key, symmetrical to the third recharge key, is obtained using the key identifier corresponding to the third recharge key. The encrypted session key is decrypted using the fourth recharge key to obtain the target session key. The quantum encryption token is decrypted using the target session key to obtain the target token. The target token is verified to obtain an authentication result. The authentication result is then returned to the terminal device. This embodiment addresses the security issues associated with the transmission of the target token between the client and server by introducing a quantum key to encrypt the target token during transmission. The quantum encryption token is then decrypted and verified on the service server side, effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and damage to system resource services.
[0177] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0178] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0179] The embodiments of this disclosure can be implemented as an apparatus configured as desired using any suitable hardware, firmware, software, or any combination thereof, including electronic devices such as terminal devices, servers (clusters), etc. Figure 6 An exemplary apparatus 600 is schematically shown that can be used to implement the various embodiments described in this application.
[0180] In one embodiment, Figure 6 An exemplary device 600 is shown, which includes one or more processors 602, a control module (chipset) 604 coupled to at least one of the processors 602, a memory 606 coupled to the control module 604, a non-volatile memory (NVM) / storage device 608 coupled to the control module 604, one or more input / output devices 610 coupled to the control module 604, and a network interface 612 coupled to the control module 604.
[0181] Processor 602 may include one or more single-core or multi-core processors, and processor 602 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 600 can serve as a terminal device, server (cluster), or other device as described in the embodiments of this application.
[0182] In some embodiments, the apparatus 600 may include one or more computer-readable media (e.g., memory 606 or NVM / storage device 608) having instructions 614 and one or more processors 602 that are combined with the one or more computer-readable media and configured to execute the instructions 614 to implement the module and thus perform the actions described in this disclosure.
[0183] In one embodiment, the control module 604 may include any suitable interface controller to provide any suitable interface to at least one of the processors 602 and / or any suitable device or component communicating with the control module 604.
[0184] The control module 604 may include a memory controller module to provide an interface to the memory 606. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0185] Memory 606 may be used, for example, to load and store data and / or instructions 614 for device 600. In one embodiment, memory 606 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 606 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0186] In one embodiment, the control module 604 may include one or more input / output controllers to provide an interface to the NVM / storage device 608 and (one or more) input / output devices 610.
[0187] For example, NVM / storage device 608 may be used to store data and / or instructions 614. NVM / storage device 608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0188] NVM / storage device 608 may include storage resources that are physically part of a device on which device 600 is mounted, or that are accessible to the device but do not necessarily have to be part of the device. For example, NVM / storage device 608 may be accessed via a network through one or more input / output devices 610.
[0189] One or more input / output devices 610 may provide an interface for device 600 to communicate with any other suitable device. Input / output devices 610 may include communication components, audio components, sensor components, etc. A network interface 612 may provide an interface for device 600 to communicate via one or more networks. Device 600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0190] In one embodiment, at least one of the processors 602 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 604. In one embodiment, at least one of the processors 602 may be logically packaged with one or more controllers of the control module 604 to form a system-in-package (SiP). In one embodiment, at least one of the processors 602 may be integrated with the logic of one or more controllers of the control module 604 on the same die. In one embodiment, at least one of the processors 602 may be integrated with the logic of one or more controllers of the control module 604 on the same die to form a system-on-a-chip (SoC).
[0191] In various embodiments, device 600 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop, handheld computing device, tablet, netbook, etc.). In various embodiments, device 600 may have more or fewer components and / or different architectures. For example, in some embodiments, device 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0192] The detection device can use a main control chip as a processor or control module, and sensor data, position information, etc. can be stored in a memory or NVM / storage device. The sensor group can be used as an input / output device, and the communication interface can include a network interface.
[0193] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0194] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0195] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, special-purpose computer, embedded processor, or other programmable quantum key-based interface call, authentication terminal device processor to produce a machine, such that the instructions executed via the computer or other programmable quantum key-based interface call, authentication terminal device processor generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0196] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable quantum key-based interface call, authentication terminal device to function in a specific manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, which is implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0197] These computer program instructions can also be loaded onto a computer or other programmable quantum key-based interface calling and authentication terminal device, causing a series of operational steps to be executed on the computer or other programmable terminal device to produce a computer-implemented process. Thus, the instructions that execute on the computer or other programmable terminal device provide the means to implement the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0198] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0199] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0200] The foregoing has provided a detailed description of a quantum key-based interface calling, authentication method and apparatus, an electronic device and a storage medium. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A quantum key-based interface calling method, characterized in that, The method is applied to a terminal device, which is communicatively connected to a service server. The terminal device has a user identification module card with a first filling key. The terminal device is also communicatively connected to a quantum encryption service platform. The method includes: Obtain the target token; The target token is quantum encrypted to obtain a quantum encrypted token, comprising: Send a session key acquisition request to the quantum encryption service platform; Receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform; the second charging key is symmetrical to the first charging key; The first charging key is obtained based on the key identifier corresponding to the second charging key; The encrypted session key is decrypted using the first filling key to obtain the target session key; The target token is quantum encrypted using the target session key to obtain the quantum encrypted token. Send a business request for the target interface to the business server; the business request includes the quantum encryption token; Receive the authentication result for the quantum encryption token returned by the service server; Based on the authentication result, the target interface is invoked.
2. The method according to claim 1, characterized in that, The user identification module card has a corresponding mobile phone number and identification code. The step of obtaining the target token includes: Send a login request to the business server, the login request including the mobile phone number and the identification code; Receive the target token returned by the service server; the target token is generated based on the mobile phone number and the identification code.
3. The method according to claim 1, characterized in that, The quantum encryption service platform includes a quantum key distribution service and a quantum random number generator, and the method further includes: Receive the first injection key generated by the quantum encryption service platform; Inject the first charging key into the user identification module card.
4. The method according to claim 1, characterized in that, After sending the session key acquisition request to the quantum encryption service platform, the method further includes: Obtain quantum random numbers; The quantum random number is sent to the quantum encryption service platform, and the quantum random number has a corresponding session key identifier; After the quantum encryption service platform generates the encrypted session key using the session key identifier and the second charging key, it receives the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform.
5. A quantum key-based interface authentication method, characterized in that, Applied to a business server, wherein the business server is communicatively connected to a terminal device and a quantum encryption service platform, the method includes: Receive a service request from the terminal device for a target interface; the service request includes a quantum encryption token. Obtain the key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform; A fourth charging key, symmetrical to the third charging key, is obtained using the key identifier corresponding to the third charging key; The encrypted session key is decrypted using the fourth injection key to obtain the target session key; The quantum encryption token is decrypted using the target session key to obtain the target token; Verify the target token to obtain the authentication result; The authentication result is returned to the terminal device.
6. A quantum key-based interface calling device, characterized in that, An apparatus applied to a terminal device, the terminal device being communicatively connected to a service server, the terminal device having a user identification module card, the user identification module card having a first filling key, and the terminal device being communicatively connected to a quantum encryption service platform, the apparatus comprising: The token acquisition module is used to acquire the target token; A token encryption module is used to perform quantum encryption on the target token to obtain a quantum encrypted token; The token encryption module includes: The session key request submodule is used to send a session key acquisition request to the quantum encryption service platform; The session key receiving submodule is used to receive the key identifier corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform; the second charging key is symmetrical to the first charging key; The first refill key acquisition submodule is used to acquire the first refill key according to the key identifier corresponding to the second refill key; The first injection key decryption submodule is used to decrypt the encrypted session key using the first injection key to obtain the target session key; The target token encryption submodule is used to perform quantum encryption on the target token using the target session key to obtain the quantum encrypted token. A business request sending module is used to send a business request for a target interface to the business server; the business request includes the quantum encryption token. The authentication result receiving module is used to receive the authentication result for the quantum encryption token returned by the business server; The interface invocation module is used to invoke the target interface based on the authentication result.
7. A quantum key-based interface authentication device, characterized in that, The device is applied to a business server, which is communicatively connected to a terminal device and a quantum encryption service platform, and includes: A service request receiving module is used to receive service requests from the terminal device for a target interface; the service request includes a quantum encryption token. The key receiving module is used to obtain the key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform; The refill key acquisition module is used to acquire a fourth refill key that is symmetrical to the third refill key by using the key identifier corresponding to the third refill key; The session key decryption module is used to decrypt the encrypted session key using the fourth injection key to obtain the target session key; The token decryption module is used to decrypt the quantum encryption token using the target session key to obtain the target token; The token verification module is used to verify the target token and obtain the authentication result; The authentication result return module is used to return the authentication result to the terminal device.
8. An electronic device, characterized in that, include: processor; and A memory storing executable code, which, when executed, causes the processor to perform the quantum key-based interface invocation method as described in any one of claims 1-4, or the quantum key-based interface authentication method as described in claim 5.
9. One or more machine-readable media having executable code stored thereon, which, when executed, causes a processor to perform a quantum key-based interface invocation method as described in any one of claims 1-4, or a quantum key-based interface authentication method as described in claim 5.
Citation Information
Patent Citations
Method and system for website registration on the basis of mobile phone message
CN105592065A
Encryption and decryption method and system based on software and hardware collaboration
CN113722726A
Unified identity authentication method, device and system based on quantum security middleware
CN115567223A
Verification information sending method and device
CN116233832A