Interface calling and authentication method and device based on quantum key
By introducing quantum key technology into interface authentication, quantum encryption transmission and decryption verification of target tokens is solved, and the traditional interface authentication solution has been achieved in terms of transmission security and has achieved higher security and reliability.
Patent Information
- Application Number
- CN202411954670.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing interface authentication schemes have shortcomings in terms of transmission security and storage security. Token leakage may lead to insecure authentication, which in turn leads to the risk of sensitive data leakage and system resource services being damaged.
Using the interface call and authentication method based on quantum key, quantum encryption technology is introduced between the terminal device and the service server, the target token is quantum encryption transmission, and the quantum encryption token is decrypted and verified on the service server to ensure the security of the authentication process.
It effectively prevents the leakage of target tokens during transmission, ensures the security of the interface calling process, and avoids the risk of sensitive data leakage and system resource services being damaged.
Smart Images

Figure CN119766551A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of identity authentication technology, and in particular to an interface call based on quantum keys, an authentication method and device, an electronic device and a storage medium. Background Art
[0002] At present, the mainstream APP (Application) interface authentication methods mainly include Token authentication, OAuth (Open Authorization, an authorization protocol) authentication and biometric authentication. Among them, Token authentication is widely used in mobile APPs due to its advantages such as statelessness and cross-domain support, especially in scenarios where frequent identity authentication and authorization are required. OAuth authentication is mainly used in scenarios that require third-party login or access to user sensitive information, and can effectively separate user authorization from resource access. Biometric authentication is usually used in scenarios such as user login verification and payment verification, and improves the security and convenience of identity authentication through technologies such as fingerprint and facial recognition.
[0003] However, mainstream interface authentication solutions also have some shortcomings. Taking the commonly used Token authentication as an example, although it has advantages such as statelessness and cross-domain support, it still has certain risks in terms of transmission security and storage security. Tokens usually contain user identity information and permissions. When transmitted between the client and the server, they may be intercepted by unauthorized third parties, resulting in token leakage. Once the token is leaked, the attacker can impersonate the legitimate user to perform various operations, including accessing sensitive data and executing malicious instructions. Summary of the invention
[0004] The embodiments of the present application provide an interface calling method based on quantum key and an interface authentication method based on quantum key to solve or at least partially solve the above problems.
[0005] Correspondingly, an embodiment of the present application also provides an interface calling device based on quantum key, an interface authentication device based on quantum key, an electronic device and a storage medium to ensure the implementation and application of the above method.
[0006] In order to solve the above problems, the embodiment of the present application discloses an interface calling method based on quantum key, which is applied to a terminal device, wherein the terminal device is connected to a business service end for communication, and the method includes:
[0007] Get the target token;
[0008] Performing quantum encryption on the target token to obtain a quantum encrypted token;
[0009] Sending a service request for a target interface to the service server; the service request includes the quantum encryption token;
[0010] Receiving an authentication result for the quantum encryption token returned by the business service end;
[0011] According to the authentication result, the target interface is called.
[0012] Optionally, the terminal device has a user identity module card, the user identity module card has a corresponding mobile phone number and identification code, and the step of obtaining the target token includes:
[0013] Sending a login request to the business service end, the login request including the mobile phone number and the identification code;
[0014] Receive the target token returned by the business service end; the target token is generated according to the mobile phone number and the identification code.
[0015] Optionally, the user identity module card has a first charging key, the terminal device is in communication connection with a quantum encryption service platform, and the target token is quantum encrypted to obtain a quantum encryption token, including:
[0016] Sending a session key acquisition request to the quantum encryption service platform;
[0017] Receiving the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform; the second charging key is symmetric to the first charging key;
[0018] acquiring the first charging key according to the key identifier corresponding to the second charging key;
[0019] Decrypting the encrypted session key using the first injection key to obtain a 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] Receiving the first charging key generated by the quantum encryption service platform;
[0023] The first injection key is injected into the user identity module card.
[0024] Optionally, after sending the session key acquisition request to the quantum encryption service platform, the method further includes:
[0025] Get quantum random numbers;
[0026] Sending the quantum random number to the quantum encryption service platform, where the quantum random number has a corresponding session key identifier;
[0027] After the quantum encryption service platform uses the session key identifier and the second charging key to generate the encrypted session key, the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform are received.
[0028] The embodiment of the present application also discloses an interface authentication method based on a quantum key, which is applied to a business service end, wherein the business service end is respectively connected to a terminal device and a quantum encryption service platform in communication, and the method comprises:
[0029] Receiving a service request of the terminal device for a target interface; the service request includes a quantum encryption token;
[0030] Obtaining a key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform;
[0031] Acquire a fourth charging key symmetric to the third charging key by using the key identifier corresponding to the third charging key;
[0032] Decrypting the encrypted session key using the fourth charging key to obtain a target session key;
[0033] Decrypting the quantum encryption token using the target session key to obtain a target token;
[0034] Verifying the target token to obtain an authentication result;
[0035] The authentication result is returned to the terminal device.
[0036] The embodiment of the present application also discloses an interface calling device based on quantum key, which is applied to a terminal device, wherein the terminal device is connected to a business service end for communication, and the device comprises:
[0037] A token acquisition module, used to acquire a target token;
[0038] A token encryption module, used for performing quantum encryption on the target token to obtain a quantum encrypted token;
[0039] A service request sending module, used to send a service request for a target interface to the service server; the service request includes the quantum encryption token;
[0040] An authentication result receiving module, used to receive the authentication result for the quantum encryption token returned by the business service end;
[0041] The interface calling module is used to call the target interface according to the authentication result.
[0042] The embodiment of the present application also discloses an interface authentication device based on a quantum key, which is applied to a business service end, wherein the business service end is respectively connected to a terminal device and a quantum encryption service platform for communication, and the device comprises:
[0043] A service request receiving module, configured to receive a service request of the terminal device for a target interface; the service request includes a quantum encryption token;
[0044] A key receiving module, used to obtain the encrypted session key and the key identifier corresponding to the third injection key sent by the quantum encryption service platform;
[0045] a charging key acquisition module, configured to acquire a fourth charging key symmetrical to the third charging key by using a key identifier corresponding to the third charging key;
[0046] A session key decryption module, used to decrypt the encrypted session key using the fourth injection key to obtain a target session key;
[0047] A token decryption module, used to decrypt the quantum encryption token using the target session key to obtain a target token;
[0048] A token verification module, used to verify the target token and obtain an authentication result;
[0049] The authentication result returning module is used to return the authentication result to the terminal device.
[0050] An embodiment of the present application also discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the quantum key-based interface call and authentication method as described in one or more of the embodiments of the present application.
[0051] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes the quantum key-based interface call and authentication method as described in one or more of the embodiments of the present application.
[0052] Compared with the prior art, the embodiments of the present application have the following advantages:
[0053] In an embodiment of the present application, a target token is obtained; the target token is quantum encrypted to obtain a quantum encryption token; a business request for a target interface is sent to a business service end; the business request includes a quantum encryption token; an authentication result for the quantum encryption token returned by the business service end is received; and the target interface is called according to the authentication result. The embodiment of the present application effectively solves the shortcomings of the traditional target token authentication method in terms of transmission security by introducing a quantum key to encrypt and transmit the target token. Quantum encryption technology is based on the principles of quantum mechanics, which ensures the absolute security of encrypted information in theory. Any attempt to eavesdrop or tamper with the quantum key will be discovered immediately, thereby effectively preventing the target token from being leaked during transmission.
[0054] In an embodiment of the present application, a service request for a target interface from a terminal device is received; the service request includes a quantum encryption token; the encrypted session key and the key identifier corresponding to the third charging key sent by the quantum encryption service platform are obtained; the key identifier corresponding to the third charging key is used to obtain a fourth charging key symmetric to the third charging key; the fourth charging key is used to decrypt the encrypted session key to obtain the target session key; the target session key is used to decrypt the quantum encryption token to obtain the target token; the target token is verified to obtain an authentication result; and the authentication result is returned to the terminal device. In order to solve the security problem of the target token when it is transmitted between the client and the server, the embodiment of the present application introduces a quantum key to encrypt and transmit the target token, and decrypts and verifies the quantum encryption token at the business service end, thereby effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and system resource service damage caused thereby. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flowchart of a quantum key-based interface calling method embodiment of the present application;
[0056] Figure 2 This is a flowchart of a quantum key-based interface authentication method embodiment of the present application;
[0057] Figure 3 This is a detailed flow chart of an embodiment of an interface call and authentication method based on quantum key of the present application;
[0058] Figure 4 This is a structural block diagram of an embodiment of an interface calling device based on quantum key of the present application;
[0059] Figure 5 This is a structural block diagram of an embodiment of an interface authentication device based on quantum key of the present application;
[0060] Figure 6 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0062] Reference Figure 1 , is a flowchart of an embodiment of an interface calling method based on quantum key of the present application, comprising the following steps:
[0063] Step 101: Get the target token.
[0064] A quantum key-based interface calling method shown in the embodiment of the present application is applied to a terminal device, which is provided with a SIM card (Subscriber Identity Module). The terminal device is also integrated with a quantum security shield application SDK (Software Development Kit), and the terminal device can communicate with the quantum encryption service platform through the quantum security shield application SDK. At the same time, the terminal device communicates with the business service end of the APP as a client, and the business service end has an interface.
[0065] Among them, the quantum encryption service platform can provide quantum key generation and encryption and decryption capabilities. The Quantum Security Shield Application SDK provides session key application, group key application, and injection key acquisition functions to applications in the form of a library. It supports the SSL (Secure Sockets Layer protocol, an encryption protocol used to protect network communication security) protocol and can be applied to key acquisition of terminal devices and business servers in scenarios such as VPN (Virtual Private Network), Internet of Things, and mobile communications.
[0066] In one embodiment, the terminal device can be a customized terminal for quantum VoLTE (Voice over Long-Term Evolution). The customized quantum VoLTE terminal consists of a VoLTE mobile phone, a quantum SIM card, and a security shield APP (i.e., a quantum security shield application). The SIM card serves as a 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 turned on, a target token can be obtained from the business server, and the target token can be used for subsequent authentication of all interface requests of 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 service request needs to be sent to a service server, the target token is quantum encrypted on the terminal device to obtain a quantum encrypted token.
[0070] Step 103: Send a service request for the target interface to the service server; the service request includes the quantum encryption token.
[0071] In step 103, the quantum encryption token is added to the service request as an authentication parameter, 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 service end.
[0073] In step 104, after receiving the service request including the 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: Call the target interface according to the authentication result.
[0075] In step 105, if the business service end authenticates the quantum encryption token, the terminal device can call the target interface to perform the corresponding business operation.
[0076] In an embodiment of the present application, a target token is obtained; the target token is quantum encrypted to obtain a quantum encryption token; a business request for a target interface is sent to a business service end; the business request includes a quantum encryption token; an authentication result for the quantum encryption token returned by the business service end is received; and the target interface is called according to the authentication result. The embodiment of the present application effectively solves the shortcomings of the traditional target token authentication method in terms of transmission security by introducing a quantum key to encrypt and transmit the target token. Quantum encryption technology is based on the principles of quantum mechanics, which ensures the absolute security of encrypted information in theory. Any attempt to eavesdrop or tamper with the quantum key will be discovered immediately, thereby effectively preventing the target token from being leaked during transmission.
[0077] Optionally, the terminal device has a user identity module card, and the user identity module card has a corresponding mobile phone number and identification code. Step 101 includes:
[0078] Sending a login request to the business service end, the login request including the mobile phone number and the identification code;
[0079] Receive the target token returned by the business service end; the target token is generated according to the mobile phone number and the identification code.
[0080] In this embodiment, the specific steps of the terminal device obtaining the target token from the business service end may include the following steps.
[0081] The terminal device is integrated with a security shield APP that supports quantum encryption and decryption capabilities. When the terminal device is turned on, the security shield APP will be called up in the background. The security shield APP uses the mobile phone number corresponding to the SIM card in the terminal device and the ICCID (Integratecircuit card identity) information as parameters to initiate a login request to the business server to apply for login.
[0082] After receiving the login request containing the mobile phone number and identification code, the business server generates a target token based on the mobile phone number and identification code, and returns the login result and target token to the terminal device. The terminal device receives the target token returned by the business server.
[0083] In the embodiment of the present application, when the terminal device is turned on, a target token is obtained from the business service end for authentication when the target interface is subsequently called.
[0084] Optionally, the user identity module card has a first charging key, the terminal device is communicatively connected with the quantum encryption service platform, and the step 102 includes:
[0085] Sending a session key acquisition request to the quantum encryption service platform;
[0086] Receiving the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform; the second charging key is symmetric to the first charging key;
[0087] acquiring the first charging key according to the key identifier corresponding to the second charging key;
[0088] Decrypting the encrypted session key using the first injection key to obtain a 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 including 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 a 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 according to the session key identifier and the second injection key stored in the quantum encryption service platform, and returns the encrypted session key and the key identifier corresponding to the second injection key to the terminal device.
[0092] Among them, the second injection key and the first injection key are a pair of symmetric quantum keys, the second injection key is stored by the quantum encryption service platform, and the first injection 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 charging key returned by the quantum encryption service platform, the terminal device obtains the first charging key corresponding to the second charging key in the SIM card according to the key identifier corresponding to the second charging key, thereby using the first charging key to decrypt the encrypted session key to obtain the target session key, and using the target session key to perform quantum encryption on the target token to obtain a quantum encryption token. The target session key is a quantum key.
[0094] Before sending the target token to the business service end, the embodiment of the present application first performs quantum encryption on the target token on the terminal device to effectively prevent the leakage of the target token during the transmission process.
[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] Receiving the first charging key generated by the quantum encryption service platform;
[0097] The first injection key is injected into the user identity module card.
[0098] In this embodiment, the first charging key may 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 quantum key distribution 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 state. This key is confidential to both parties, and any attempt to intercept or eavesdrop will be detected. One half of the generated pair of keys (i.e., the first injection key) is injected into the SIM card, and the symmetrical other half (i.e., the second injection key) is stored in the quantum encryption service platform. The SIM card injected with the first injection key is integrated into the terminal device to ensure that the connection and communication between the SIM card and the communication module (i.e., the quantum security shield application SDK) are normal.
[0100] In one embodiment, the injection process may use a secure key injection protocol to ensure the security and integrity of the key.
[0101] The embodiment of the present application implants a SIM card charged with a first charging key in a terminal device, encrypts a target token with a quantum key and then transmits it to a business service end, thereby preventing the target token from being stolen, thereby causing the risk of sensitive data leakage and system resource service damage.
[0102] Optionally, after sending the session key acquisition request to the quantum encryption service platform, the method further includes:
[0103] Get quantum random numbers;
[0104] Sending the quantum random number to the quantum encryption service platform, where the quantum random number has a corresponding session key identifier;
[0105] After the quantum encryption service platform uses the session key identifier and the second charging key to generate the encrypted session key, the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform are received.
[0106] In this embodiment, the quantum encryption service platform may specifically generate an encrypted session key by 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 the quantum random number, the quantum encryption service platform obtains the corresponding session key identifier, binds it based on the Session ID and the session key identifier, and obtains the target session key. The target session key is then encrypted with the second injection key to obtain the encrypted session key, and the encrypted session key and the key identifier corresponding to the second injection key are returned to the terminal device.
[0109] The terminal device of the embodiment of the present application can request a session key from the quantum encryption service platform for subsequent target token encryption. The quantum encryption service platform can use the second injection key to encrypt the session key and then transmit it, thereby ensuring the security of the session key transmission.
[0110] In an embodiment of the present application, a target token is obtained; the target token is quantum encrypted to obtain a quantum encryption token; a business request for a target interface is sent to a business service end; the business request includes a quantum encryption token; an authentication result for the quantum encryption token returned by the business service end is received; and the target interface is called according to the authentication result. The embodiment of the present application effectively solves the shortcomings of the traditional target token authentication method in terms of transmission security by introducing a quantum key to encrypt and transmit the target token. Quantum encryption technology is based on the principles of quantum mechanics, which ensures the absolute security of encrypted information in theory. Any attempt to eavesdrop or tamper with the quantum key will be discovered immediately, thereby effectively preventing the target token from being leaked during transmission.
[0111] Based on the above embodiment, this embodiment also provides an interface authentication method based on quantum key.
[0112] Reference Figure 2 , shows a flowchart of an embodiment of an interface authentication method based on quantum key of the present application, comprising the following steps:
[0113] Step 201: Receive a service request for a target interface from the terminal device; the service request includes a quantum encryption token.
[0114] A quantum key-based interface authentication method shown in an embodiment of the present application is applied to a business service end, and the business service end is communicated with a terminal device and a quantum encryption service platform respectively.
[0115] In step 201, the business service end may receive a business request for a target interface sent by a terminal device, wherein the business 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 injection key sent by the quantum encryption service platform.
[0117] In step 202, the business service end may request the corresponding session key from the quantum encryption service platform according to the session ID. After the quantum encryption service platform encrypts the session key using the third charging key, it sends the encrypted session key and the key identifier corresponding to the third charging key to the business service end.
[0118] The third charging key and the fourth charging key 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 service end. The third charging key and the fourth charging key are generated synchronously when the first charging key and the second charging key are generated.
[0119] Step 203: Use the key identifier corresponding to the third charging key to obtain a fourth charging key that is symmetric to the third charging key.
[0120] In step 203, the service server uses the key identifier corresponding to the third charging key to obtain a fourth charging key stored in the service server that is symmetrical to the third charging key.
[0121] Step 204: Use the fourth charging key to decrypt the encrypted session key to obtain the target session key.
[0122] In step 204, after obtaining the fourth charging key, the service server uses the fourth charging key to decrypt the encrypted session key to obtain the target session key.
[0123] Step 205: Use the target session key to decrypt the quantum encryption token to obtain a target token.
[0124] In step 205, after the business service end obtains the target session key, it 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 an authentication result.
[0126] Step 207: Return the authentication result to the terminal device.
[0127] In step 206 and step 207, after the business service end completes the decryption of the target token, it verifies the target token to obtain the authentication result, and returns the authentication result to the terminal device.
[0128] In an embodiment of the present application, a service request for a target interface from a terminal device is received; the service request includes a quantum encryption token; the encrypted session key and the key identifier corresponding to the third charging key sent by the quantum encryption service platform are obtained; the key identifier corresponding to the third charging key is used to obtain a fourth charging key symmetric to the third charging key; the fourth charging key is used to decrypt the encrypted session key to obtain the target session key; the target session key is used to decrypt the quantum encryption token to obtain the target token; the target token is verified to obtain an authentication result; and the authentication result is returned to the terminal device. In order to solve the security problem of the target token when it is transmitted between the client and the server, the embodiment of the present application introduces a quantum key to encrypt and transmit the target token, and decrypts and verifies the quantum encryption token at the business service end, thereby effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and system resource service damage caused thereby.
[0129] The following will be combined Figure 3 An interface call and authentication method based on quantum key shown in an embodiment of the present application is described in detail so that those skilled in the art can understand the technical solution of the present application.
[0130] Reference Figure 3 , is a detailed flow chart of an embodiment of an interface call and authentication method based on quantum key of the present application.
[0131] Step 301: The VoLTE customized terminal requests to log in to the service server according to the phone number (phone) 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 applies for a session key from the cryptographic service platform using the session id through the Security Shield APP.
[0134] Step 304: The cryptographic service platform generates a session key HKey according to the session ID, and encrypts HKey using the injection key CKey (the second injection key), and returns the ciphertext HKey and the KeyTag corresponding to CKey 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 according to 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 a service interface from the service server according to the encrypted Token and session ID.
[0138] Step 308: The business server requests the corresponding HKey from the cryptographic service platform according to the session id.
[0139] Step 309: After the cryptographic service platform encrypts HKey using the charging key CKey" (the third charging key), it returns the ciphertext HKey and the KeyTag corresponding to CKey" to the business service end.
[0140] Step 310: The service server requests the corresponding charging key Ckey"' (the fourth charging key) according to KeyTag, uses Ckey"' to decrypt the encrypted ciphertext HKey, uses the plaintext HKey to decrypt Token, verifies the legitimacy of Token, and returns the service result to the VoLTE customized terminal.
[0141] In an embodiment of the present application, a target token is obtained; the target token is quantum encrypted to obtain a quantum encryption token; a business request for a target interface is sent to a business service end; the business request includes a quantum encryption token; an authentication result for the quantum encryption token returned by the business service end is received; and the target interface is called according to the authentication result. The embodiment of the present application effectively solves the shortcomings of the traditional target token authentication method in terms of transmission security by introducing a quantum key to encrypt and transmit the target token. Quantum encryption technology is based on the principles of quantum mechanics, which ensures the absolute security of encrypted information in theory. Any attempt to eavesdrop or tamper with the quantum key will be discovered immediately, thereby effectively preventing the target token from being leaked during transmission.
[0142] In an embodiment of the present application, a service request for a target interface from a terminal device is received; the service request includes a quantum encryption token; the encrypted session key and the key identifier corresponding to the third charging key sent by the quantum encryption service platform are obtained; the key identifier corresponding to the third charging key is used to obtain a fourth charging key symmetric to the third charging key; the fourth charging key is used to decrypt the encrypted session key to obtain the target session key; the target session key is used to decrypt the quantum encryption token to obtain the target token; the target token is verified to obtain an authentication result; and the authentication result is returned to the terminal device. In order to solve the security problem of the target token when it is transmitted between the client and the server, the embodiment of the present application introduces a quantum key to encrypt and transmit the target token, and decrypts and verifies the quantum encryption token at the business service end, thereby effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and system resource service damage caused thereby.
[0143] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0144] On the basis of the above embodiments, this embodiment further provides an interface calling device based on quantum key and an interface authentication device based on quantum key, which are applied to electronic devices such as terminal devices and servers.
[0145] Reference Figure 4 , shows a structural block diagram of an embodiment of an interface calling device based on quantum key of the present application, which may specifically include the following modules:
[0146] The token acquisition module 401 is used to acquire a target token;
[0147] A token encryption module 402, used to perform quantum encryption on the target token to obtain a quantum encrypted token;
[0148] A 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] An authentication result receiving module 404 is used to receive the authentication result for the quantum encryption token returned by the business service end;
[0150] The interface calling module 405 is used to call the target interface according to the authentication result.
[0151] Optionally, the terminal device has a user identity module card, the user identity module card has a corresponding mobile phone number and identification code, and the token acquisition module 401 includes:
[0152] A login request submodule, used to send a login request to the business service end, wherein the login request includes 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 service end; the target token is generated according to the mobile phone number and the identification code.
[0154] Optionally, the user identity module card has a first charging key, the terminal device is communicatively connected with the quantum encryption service platform, and the token encryption module 402 includes:
[0155] A session key request submodule, used to send a session key acquisition request to the quantum encryption service platform;
[0156] A session key receiving submodule, used to receive the encrypted session key returned by the quantum encryption service platform and the key identifier corresponding to the second charging key; the second charging key is symmetrical to the first charging key;
[0157] A first charging key acquisition submodule, configured to acquire the first charging key according to the key identifier corresponding to the second charging key;
[0158] A first charging key decryption submodule, used to decrypt the encrypted session key using the first charging key to obtain a 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] A first charging key generation module, used to receive the first charging 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 identity module card.
[0163] Optionally, the device further comprises:
[0164] A random number acquisition module, used to obtain quantum random numbers;
[0165] A random number sending module, used to send the quantum random number to the quantum encryption service platform, where the quantum random number has a corresponding session key identifier;
[0166] An identification binding module is used to receive the key identification corresponding to the encrypted session key and the second charging key returned by the quantum encryption service platform after the quantum encryption service platform uses the session key identification and the second charging key to generate the encrypted session key.
[0167] In an embodiment of the present application, a target token is obtained; the target token is quantum encrypted to obtain a quantum encryption token; a business request for a target interface is sent to a business service end; the business request includes a quantum encryption token; an authentication result for the quantum encryption token returned by the business service end is received; and the target interface is called according to the authentication result. The embodiment of the present application effectively solves the shortcomings of the traditional target token authentication method in terms of transmission security by introducing a quantum key to encrypt and transmit the target token. Quantum encryption technology is based on the principles of quantum mechanics, which ensures the absolute security of encrypted information in theory. Any attempt to eavesdrop or tamper with the quantum key will be discovered immediately, thereby effectively preventing the target token from being leaked during transmission.
[0168] Reference Figure 5 , shows a structural block diagram of an embodiment of an interface authentication device based on quantum key of the present application, which may specifically include the following modules:
[0169] A service request receiving module 501 is used to receive a service request of the terminal device for a target interface; the service request includes a quantum encryption token;
[0170] A key receiving module 502 is used to obtain the encrypted session key and the key identifier corresponding to the third injection key sent by the quantum encryption service platform;
[0171] A charging key acquisition module 503, configured to acquire a fourth charging key symmetrical to the third charging key by using the key identifier corresponding to the third charging key;
[0172] The session key decryption module 504 is used to decrypt the encrypted session key using the fourth charging key to obtain a target session key;
[0173] A token decryption module 505 is used to decrypt the quantum encryption token using the target session key to obtain a target token;
[0174] A token verification module 506, used to verify the target token and obtain an authentication result;
[0175] The authentication result returning module 507 is used to return the authentication result to the terminal device.
[0176] In an embodiment of the present application, a service request for a target interface from a terminal device is received; the service request includes a quantum encryption token; the encrypted session key and the key identifier corresponding to the third charging key sent by the quantum encryption service platform are obtained; the key identifier corresponding to the third charging key is used to obtain a fourth charging key symmetric to the third charging key; the fourth charging key is used to decrypt the encrypted session key to obtain the target session key; the target session key is used to decrypt the quantum encryption token to obtain the target token; the target token is verified to obtain an authentication result; and the authentication result is returned to the terminal device. In order to solve the security problem of the target token when it is transmitted between the client and the server, the embodiment of the present application introduces a quantum key to encrypt and transmit the target token, and decrypts and verifies the quantum encryption token at the business service end, thereby effectively preventing the target token from being stolen and avoiding the risk of sensitive data leakage and system resource service damage caused thereby.
[0177] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0178] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0179] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices and servers (clusters). Figure 6 An exemplary apparatus 600 that may be used to implement various embodiments described in this application is schematically illustrated.
[0180] For one embodiment, Figure 6 An exemplary apparatus 600 is shown having one or more processors 602, a control module (chip set) 604 coupled to at least one of the processor(s) 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] The processor 602 may include one or more single-core or multi-core processors, and the processor 602 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 600 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present 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 combined with the one or more computer-readable media and configured to execute the instructions 614 to implement a module to perform the actions described in the present disclosure.
[0183] For one embodiment, control module 604 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 602 and / or any suitable device or component in communication with 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] The memory 606 may be used, for example, to load and store data and / or instructions 614 for the device 600. For one embodiment, the memory 606 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 606 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0186] For one embodiment, control module 604 may include one or more input / output controllers to provide an interface to NVM / storage device 608 and input / output device(s) 610 .
[0187] For example, NVM / storage 608 may be used to store data and / or instructions 614. NVM / storage 608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0188] NVM / storage device 608 may include storage resources that are physically part of the device on which apparatus 600 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 608 may be accessed via input / output device(s) 610 over a network.
[0189] (One or more) input / output devices 610 may provide an interface for the apparatus 600 to communicate with any other appropriate device, and the input / output device 610 may include a communication component, an audio component, a sensor component, etc. The network interface 612 may provide an interface for the apparatus 600 to communicate through one or more networks, and the apparatus 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, for example, access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
[0190] For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 604. For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers of the control module 604 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604. For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604 to form a system-on-chip (SoC).
[0191] In various embodiments, the device 600 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 600 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0192] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.
[0193] 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.
[0194] 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.
[0195] The embodiments of the present application 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 application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable quantum key-based interface call, an authentication terminal device processor to generate a machine, so that the instructions executed by the computer or other programmable quantum key-based interface call, the authentication terminal device processor generate instructions for implementing the process. 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.
[0196] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable quantum key-based interface call and authentication 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 that implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A 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 call, authentication terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0198] Although the preferred embodiments of the present application 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 application.
[0199] 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.
[0200] The above is a detailed introduction to an interface call, an authentication method and a device based on quantum key, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for a person skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A quantum key-based interface calling method, characterized in that: Applied to a terminal device, the terminal device is connected to a business service end for communication, and the method includes: Get the target token; Performing quantum encryption on the target token to obtain a quantum encrypted token; Sending a service request for a target interface to the service server; the service request includes the quantum encryption token; Receiving an authentication result for the quantum encryption token returned by the business service end; According to the authentication result, the target interface is called.
2. The method according to claim 1, characterized in that The terminal device has a user identity module card, and the user identity module card has a corresponding mobile phone number and an identification code. The step of obtaining a target token includes: Sending a login request to the business service end, the login request including the mobile phone number and the identification code; Receive the target token returned by the business service end; the target token is generated according to the mobile phone number and the identification code.
3. The method according to claim 2, characterized in that The user identity module card has a first charging key, the terminal device is connected to the quantum encryption service platform for communication, and the target token is quantum encrypted to obtain a quantum encryption token, including: Sending a session key acquisition request to the quantum encryption service platform; Receiving the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform; the second charging key is symmetric to the first charging key; acquiring the first charging key according to the key identifier corresponding to the second charging key; Decrypting the encrypted session key using the first injection key to obtain a target session key; The target token is quantum encrypted using the target session key to obtain the quantum encrypted token.
4. The method according to claim 3, 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: Receiving the first charging key generated by the quantum encryption service platform; The first injection key is injected into the user identity module card.
5. The method according to claim 3, characterized in that: After sending the session key acquisition request to the quantum encryption service platform, the method further includes: Get quantum random numbers; Sending the quantum random number to the quantum encryption service platform, where the quantum random number has a corresponding session key identifier; After the quantum encryption service platform uses the session key identifier and the second charging key to generate the encrypted session key, the encrypted session key and the key identifier corresponding to the second charging key returned by the quantum encryption service platform are received.
6. An interface authentication method based on quantum key, characterized in that: Applied to a business service end, the business service end is communicated and connected with a terminal device and a quantum encryption service platform respectively, and the method includes: Receiving a service request of the terminal device for a target interface; the service request includes a quantum encryption token; Obtaining a key identifier corresponding to the encrypted session key and the third injection key sent by the quantum encryption service platform; Acquire a fourth charging key symmetric to the third charging key by using the key identifier corresponding to the third charging key; Decrypting the encrypted session key using the fourth charging key to obtain a target session key; Decrypting the quantum encryption token using the target session key to obtain a target token; Verifying the target token to obtain an authentication result; The authentication result is returned to the terminal device.
7. An interface calling device based on quantum key, characterized in that: Applied to a terminal device, the terminal device is connected to a business service end for communication, and the device comprises: A token acquisition module, used to acquire a target token; A token encryption module, used for performing quantum encryption on the target token to obtain a quantum encrypted token; A service request sending module, used to send a service request for a target interface to the service server; the service request includes the quantum encryption token; An authentication result receiving module, used to receive the authentication result for the quantum encryption token returned by the business service end; The interface calling module is used to call the target interface according to the authentication result.
8. An interface authentication device based on quantum key, characterized in that: Applied to a business service end, the business service end is communicated and connected with a terminal device and a quantum encryption service platform respectively, and the device includes: A service request receiving module, configured to receive a service request of the terminal device for a target interface; the service request includes a quantum encryption token; A key receiving module, used to obtain the encrypted session key and the key identifier corresponding to the third injection key sent by the quantum encryption service platform; a charging key acquisition module, configured to acquire a fourth charging key symmetrical to the third charging key by using a key identifier corresponding to the third charging key; A session key decryption module, used to decrypt the encrypted session key using the fourth injection key to obtain a target session key; A token decryption module, used to decrypt the quantum encryption token using the target session key to obtain a target token; A token verification module, used to verify the target token and obtain an authentication result; The authentication result returning module is used to return the authentication result to the terminal device.
9. An electronic device, characterized in that: include: processor; and A memory having executable code stored thereon, which, when the executable code is executed, enables the processor to execute the interface calling method based on quantum key as described in any one of claims 1 to 6, or the interface authentication method based on quantum key as described in claim 7.
10. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to execute the quantum key-based interface calling method as described in any one of claims 1 to 6, or the quantum key-based interface authentication method as described in claim 7.
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
Method, device and system for one-key login of terminal application program
CN113765906A
Unified identity authentication method, device and system based on quantum security middleware
CN115567223A
Verification information sending method and device
CN116233832A
Cited By
Key authentication method for quantum encryption call
CN121333744A