Identity authentication method and device, equipment, storage medium and product
By generating target ciphertext and authentication code between the SIM card and the server, the security issues existing in SMS verification code authentication are solved, and the efficiency and security of authentication are improved.
Patent Information
- Application Number
- CN202411606622.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-12-12
AI Technical Summary
Existing SMS verification code authentication methods suffer from security vulnerabilities such as man-in-the-middle attacks, SIM card cloning attacks, and verification code leaks, resulting in low authentication efficiency.
By working together between the SIM card and the server, the target ciphertext and authentication code are generated using time information and preset encryption keys, thereby improving the security and efficiency of identity verification.
It improves the security and efficiency of identity verification, reduces the risk of man-in-the-middle attacks and CAPTCHA leakage, and enhances data security.
Smart Images

Figure CN121125133A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to authentication methods, devices, equipment, storage media and products. Background Technology
[0002] SMS verification codes are a commonly used identity verification mechanism in numerous online interactions. This mechanism sends a one-time verification code to the user's mobile phone, which the user then enters into a verification interface to confirm their identity. SMS verification codes are widely used in various scenarios such as account registration, login verification, password reset, and payment confirmation, and are characterized by their simplicity and ease of implementation. However, SMS verification codes are vulnerable to security vulnerabilities such as man-in-the-middle attacks, SIM card cloning attacks, and verification code leaks. Therefore, improving the efficiency of user identity verification has become a pressing technical challenge. Summary of the Invention
[0003] The main purpose of this application is to provide an identity authentication method, apparatus, device, storage medium, and product, which aims to solve the technical problem of low efficiency in existing identity authentication.
[0004] To achieve the above objectives, this application proposes an identity authentication method applied to a SIM card, the identity authentication method comprising the following steps:
[0005] Upon receiving an authentication code retrieval request from the client, determine time information based on the authentication code retrieval request;
[0006] The target ciphertext is determined based on the time information and the preset encryption key;
[0007] An authentication code is determined based on the target ciphertext, and the authentication code is fed back to the client. The client is used to send the authentication code to the server for identity authentication.
[0008] Optionally, before the step of determining the target ciphertext based on the time information and the preset encryption key, the method further includes:
[0009] Determine the XOR index of the randomly generated random number;
[0010] The key salt is determined based on the XOR index and the card serial number;
[0011] The preset root key is encrypted based on the key salt to obtain the preset encryption key.
[0012] Optionally, the step of determining the target ciphertext based on the time information and the preset encryption key includes:
[0013] The time information is preprocessed to obtain the time factor;
[0014] The time factor is filled in to obtain plaintext data;
[0015] The plaintext data is encrypted using a preset algorithm and the preset encryption key to obtain the target ciphertext.
[0016] To achieve the above objectives, this application proposes an authentication method applied to a server, the authentication method comprising the following steps:
[0017] Upon receiving the authentication code sent by the client, determine the preset encryption key;
[0018] The authentication code set is determined based on the preset encryption key and the current time information;
[0019] Authentication is performed based on the set of authentication codes and the authentication codes themselves.
[0020] Optionally, the step of determining the authentication code set based on the preset encryption key and the current time information includes:
[0021] Determine the target time range based on the current time information;
[0022] Determine the target time factor based on the target time range;
[0023] The target time factor is encrypted using the preset encryption key to obtain ciphertext data;
[0024] The set of authentication codes is determined based on the encrypted data.
[0025] Furthermore, to achieve the above objectives, this application also proposes an identity authentication device for use with a SIM card, the identity authentication device comprising:
[0026] The determination module is used to determine time information based on the authentication code acquisition request when it receives an authentication code acquisition request sent by the client;
[0027] The target ciphertext determination module is used to determine the target ciphertext based on the time information and the preset encryption key.
[0028] The authentication code determination module is used to determine the authentication code based on the target ciphertext and feed the authentication code back to the client. The client is used to send the authentication code to the server for identity authentication.
[0029] Furthermore, to achieve the above objectives, this application also proposes an identity authentication device applied to a server, the identity authentication device comprising:
[0030] The receiving module is used to determine the preset encryption key when it receives the authentication code sent by the client;
[0031] The authentication code set determination module is used to determine the authentication code set based on the preset encryption key and the current time information;
[0032] An authentication module is used to perform authentication based on the authentication code set and the authentication codes.
[0033] In addition, to achieve the above objectives, this application also proposes an identity authentication device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the identity authentication method as described above.
[0034] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the authentication method described above.
[0035] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the authentication method described above.
[0036] When the SIM card of this application receives an authentication code retrieval request from a client, it determines time information based on the request; determines target ciphertext based on the time information and a preset encryption key; determines an authentication code based on the target ciphertext, and sends the authentication code back to the client. The client then sends the authentication code to the server for identity authentication. Compared to existing methods of identity authentication via SMS verification codes, the method described in this application improves identity verification efficiency.
[0037] When the server receives an authentication code sent by the client, it determines a preset encryption key; it then determines an authentication code set based on the preset encryption key and the current time information; and finally, it performs identity verification based on the authentication code set and the authentication codes. Compared to existing methods of identity verification via SMS verification codes, the method described in this application improves identity verification efficiency. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart illustrating an embodiment of the identity authentication method in this application.
[0041] Figure 2 This is a schematic diagram of the authentication code calculation provided in Embodiment 1 of the identity authentication method of this application;
[0042] Figure 3 This is a flowchart illustrating the second embodiment of the identity authentication method in this application.
[0043] Figure 4 This is a schematic diagram of the module structure of the identity authentication device in Embodiment 1 of this application;
[0044] Figure 5 This is a schematic diagram of the module structure of the identity authentication device in Embodiment 2 of this application;
[0045] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the identity authentication method in the embodiments of this application.
[0046] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0048] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of this application embodiment is as follows: Upon receiving an authentication code retrieval request from a client, time information is determined based on the authentication code retrieval request; target ciphertext is determined based on the time information and a preset encryption key; an authentication code is determined based on the target ciphertext, and the authentication code is fed back to the client, which then sends the authentication code to the server for identity authentication. Upon receiving the authentication code from the client, the server determines a preset encryption key; an authentication code set is determined based on the preset encryption key and current time information; and identity verification is performed based on the authentication code set and the authentication code. Compared to existing methods of identity authentication via SMS verification codes, the above method of this application can improve identity verification efficiency.
[0050] This application provides an identity authentication method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the identity authentication method of this application in Embodiment 1.
[0051] In this embodiment, the identity authentication method includes the following steps:
[0052] Step S10: Upon receiving an authentication code retrieval request from the client, determine time information based on the authentication code retrieval request;
[0053] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or SIM card capable of performing the above functions. The following description uses a SIM card as an example to illustrate this embodiment and the subsequent embodiments.
[0054] It should be noted that the SIM card is installed on the client, which can be a user's mobile phone, computer, or other terminal. The authentication code retrieval request can be a command sent by the client to the SIM card to retrieve the authentication code. It may include information such as the current timestamp.
[0055] Step S20: Determine the target ciphertext based on the time information and the preset encryption key;
[0056] It should be noted that determining the target ciphertext based on the time information and the preset encryption key can involve the SIM card generating a random number, determining an index value based on the random number, and then distributing a preset k1 root key using the SIM card's Secure Element Identifier (SEID) and the index value corresponding to the random number to obtain the preset encryption key. The current timestamp in the time information is then encrypted using the preset encryption key to obtain the target ciphertext.
[0057] Furthermore, in order to improve the efficiency of authentication, before step S20, the method further includes: determining the XOR index of the randomly generated random number;
[0058] The key salt is determined based on the XOR index and the card serial number;
[0059] The preset root key is encrypted based on the key salt to obtain the preset encryption key.
[0060] It should be noted that before authentication, key distribution and key initialization are required. Key distribution can be achieved by first configuring a symmetric key K1, and then determining the salt required for business key distribution based on the 16-byte random number generated by the SIM card and the card SEID (i.e., the card serial number). Finally, the root key k1 and the salt KD required for business key distribution are encrypted using the SM4_ECB algorithm, distributing k1 into a symmetric key L, which is the preset encryption key. Specifically, determining the XOR index of the randomly generated random number can be achieved by converting the random number into a byte array data. The first byte is taken from the data array and its value is assigned to the variable index. Starting from the second byte of the data array, each byte is XORed sequentially, and the result is updated in the index variable. Specifically, for each byte data[i] in the array (where i ranges from 1 to data.length-1), index = index^data[i] is executed. Then, a modulo operation is performed: the final index value is bitwise ANDed with 0xFF to ensure that it is between 0 and 255. Then, the result is moduloed by the specified size (e.g., 16 bytes) to obtain the final index value. Return result: Returns the calculated index value, i.e., the XOR index of the random number. This embodiment also requires sending the 16-byte random number generated by the SIM card to the server via SIM card communication (SIM card to SIM card) for the authentication code process.
[0061] It should be noted that determining the key salt based on the XOR index and card serial number can be done as follows: Padding the end of the SEID with bytes 0x80 to 16 to obtain the padded SEID. Based on the XOR index (i.e., index L1) of the calculated random number, the L1-th byte of the SEID is XORed with 0x0E to generate the key salt KD. The preset root key is then encrypted based on the key salt to obtain the preset encryption key. This can be achieved by using the SM4 algorithm in ECB mode to encrypt the k1 root key and KD, generating the final k1 distributed key, i.e., the preset encryption key. The SIM card stores the preset encryption key in a designated area. The preset encryption key can also be updated periodically using the above process to ensure data security.
[0062] The APDU instructions for obtaining random numbers are shown in Table 1 below:
[0063] Table 1 - APDU Command Table for Generating Random Numbers
[0064]
[0065] Here's an example of obtaining a random number using a command: Execute: 0084000008, Response: 0CA32F1CF E653401.
[0066] SEID is used for subsequent key distribution. The APDU instructions for obtaining SEID are designed as shown in Table 2 below: APDU instructions for obtaining SEID:
[0067] Table 2 - APDU commands for obtaining SEID
[0068]
[0069] Here's an example of obtaining the SEID via command: Execute: 80CA004400, Response: 22960004100000008386
[0070] Furthermore, in order to improve the efficiency of identity verification, step S20 may include: preprocessing the time information to obtain a time factor;
[0071] The time factor is filled in to obtain plaintext data;
[0072] The plaintext data is encrypted using a preset algorithm and the preset encryption key to obtain the target ciphertext.
[0073] It should be noted that the preprocessing of the time information to obtain the time factor can be performed after obtaining the time information T, which requires rounding and padding the time T. Specifically, this includes dividing the time T by 30000, rounding it, and then padding it with leading zeros to 14 bits. This preprocessing step can also be performed by the client. Specifically, the client divides the time T by 30000, rounds it, pads it with leading zeros to 14 bits, assembles it into an APDU instruction, and sends it to the SIM card.
[0074] In specific implementation, the timestamp T: 1723780849469, / 1000 rounded down to 1723780849, / 30 rounded down to 57459561, padded with leading zeros to 14 bits: 00000057459561 (the leading zeros can be within 32 bits). Assemble the APDU instruction: 80CC01000700000057459561. Fixed: 80CC010007 + time factor (00000057459561). Read and send the following two instructions: Select card application, obtain OTP authentication code. The time factor is calculated in real time each time: Select card application: 00A4040010D1560001018003900000000AB0030102. Obtain the OTP ciphertext: 80CC01000700000057459561 Response authentication code A (374699). After the SIM card receives the time factor, it calculates the OTP authentication code. The time factor is padded to obtain plaintext data, which can be plaintext data S by padding the end of the time factor with 80 to 16 bytes. The plaintext data is then encrypted using a preset algorithm and a preset encryption key to obtain the target ciphertext. This can be ciphertext P obtained by encrypting S using the SM4_ECB algorithm, with the key being the K1 distributed key, i.e., the preset encryption key.
[0075] Step S30: Determine the authentication code based on the target ciphertext and send the authentication code back to the client. The client is used to send the authentication code to the server for identity authentication.
[0076] It should be noted that determining the authentication code based on the target ciphertext can be achieved by processing the target ciphertext using a preset first function to obtain the authentication code. Specifically, the process of processing the target ciphertext using the preset first function is as follows:
[0077] First, calculate the offset based on the target ciphertext P, specifically including:
[0078] (1) Extract the fifth byte from the end of the target ciphertext P (i.e., P
[11] , the target ciphertext P is 16 bytes of data).
[0079] (2) Perform a bitwise AND operation between the byte and 0xf to extract its lower 4 bits.
[0080] (3) Take the modulo of 12 on the extracted lower 4 bits to obtain the offset.
[0081] Then calculate the integer H, specifically including:
[0082] (1) Extract four consecutive bytes from P starting from offset.
[0083] (2) Perform a bitwise AND operation on P[offset]: P[offset]&0x7f, extract its lower 7 bits, and shift the result left by 24 bits.
[0084] (3) Perform a bitwise AND operation on P[offset+1]: P[offset+1]&0xff, extract all 8 bits, and shift the result left by 16 bits.
[0085] (4) Perform a bitwise AND operation on P[offset+2] P[offset+2]&0xff to extract all 8 bits, and then shift the result left by 8 bits.
[0086] (5) Perform a bitwise AND operation on P[offset+3] P[offset+3]&0xff to extract all 8 bits.
[0087] (6) Combine the above parts into a 32-bit integer H by bitwise OR operation.
[0088] Finally, the authentication code T is generated based on the integer H. Specifically, if the length of H is greater than or equal to 6, the remainder of H is taken as the last 6 bits. If the length of H is less than 6, zeros are padded to the beginning of H until the length is 6. The result is the authentication code T.
[0089] In specific implementation, it can be referred to Figure 2 , Figure 2 This is a schematic diagram of the authentication code calculation provided in Embodiment 1 of the identity authentication method of this application. The client establishes a card-machine channel with the SIM card for data transmission. The client obtains the terminal time and then sends an OTP authentication code acquisition request to the SIM card based on the terminal time. After preprocessing the terminal time, the SIM card fills in 80 to 16 bytes to obtain plaintext S. S is then encrypted using the SM4_ECB algorithm and the distributed key L1 of K1 to obtain ciphertext P. The ciphertext P is processed by the aforementioned preset first function to obtain the authentication code. Then, the SIM card returns the authentication code to the client.
[0090] In this embodiment, upon receiving an authentication code retrieval request from a client, time information is determined based on the request; the target ciphertext is determined based on the time information and a preset encryption key; an authentication code is determined based on the target ciphertext, and the authentication code is fed back to the client, which then sends the authentication code to the server for identity authentication. This embodiment uses SIM card random numbers and SEID for key distribution: a 16-byte random number and SEID are obtained from the SIM card, combined with a specific function to generate a salt, and the SM4_ECB algorithm is used to distribute the root key K1 into the symmetric key L required for encryption. This achieves one-time pad encryption, improving data security. Furthermore, this embodiment uses a random number to calculate an index value, which is used to XOR a byte in the SEID with a fixed value to generate the final salt KD. This increases the randomness and security of the key distribution process.
[0091] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of the identity authentication method of this application. In this embodiment, the identity authentication method is applied to a server and includes the following steps:
[0092] Step S40: Upon receiving the authentication code sent by the client, determine the preset encryption key;
[0093] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or server capable of performing the above functions. The following description uses a server as an example to illustrate this embodiment and the subsequent embodiments.
[0094] It should be noted that the preset encryption key can be a distributed key of the pre-set root key K1, i.e., the preset encryption key. The server will first configure a symmetric key K1, and then use the SIM card communication (SIM card) capability to obtain a 16-byte random number and card SEID from the SIM card.
[0095] Step S50: Determine the authentication code set based on the preset encryption key and the current time information;
[0096] It should be noted that determining the authentication code set based on the preset encryption key and the current time information can be achieved by determining a target timestamp based on the current time information. The target timestamp can be a timestamp from 30 seconds or 1 minute prior to the current time. Then, the authentication code set is determined based on the target timestamp and the preset encryption key. The specific steps can refer to the steps in the above embodiment where the target ciphertext is determined based on the time information and the preset encryption key, and the authentication code is determined based on the target ciphertext. The difference is that, since multiple timestamps are used in this embodiment, multiple authentication codes are obtained, forming an authentication code set.
[0097] Furthermore, in order to improve the efficiency of identity verification, step S50 may include: determining the target time range based on the current time information;
[0098] Determine the target time factor based on the target time range;
[0099] The target time factor is encrypted using the preset encryption key to obtain ciphertext data;
[0100] The set of authentication codes is determined based on the encrypted data.
[0101] It should be noted that the target time range can be a period of time before and after the current server time, for example, a time range of one minute before and after the current time. The determination of the target time factor based on the target time range can be multiple timestamps within the target time range. For example, if the target time range is one minute before and after, the target time factor can be the timestamp of one minute before the current time, the timestamp of the previous 30 seconds, the timestamp corresponding to the current time, the timestamp of the next 30 seconds, and the timestamp of the next minute. To avoid network latency, the target time range can be appropriately expanded or reduced. Encrypting the target time factor using the preset encryption key can involve first preprocessing the target time factor, then encrypting it using the preset encryption key, and finally processing it using a preset first function to obtain the authentication code. Specifically, refer to the steps in the above embodiment for determining the target ciphertext based on the time information and the preset encryption key, and determining the authentication code based on the target ciphertext. The authentication codes corresponding to multiple timestamps constitute the authentication code set.
[0102] Step S60: Perform identity verification based on the set of authentication codes and the authentication codes.
[0103] It should be noted that the authentication based on the authentication code set and the authentication code can be determined as successful if the authentication code is the same as any one of the authentication codes in the authentication code set, otherwise the authentication fails.
[0104] In this embodiment, upon receiving an authentication code from the client, a preset encryption key is determined; an authentication code set is determined based on the preset encryption key and the current time information; and authentication is performed based on the authentication code set and the authentication codes. Compared to existing methods of authentication via SMS verification codes, the above method in this embodiment can improve authentication efficiency.
[0105] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the identity authentication method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0106] This application also provides an identity authentication device for use with a SIM card; please refer to [reference needed]. Figure 4 , Figure 4 This is a schematic diagram of the module structure of an identity authentication device according to Embodiment 1 of this application; the identity authentication device includes:
[0107] The determining module 10 is used to determine time information based on the authentication code acquisition request when it receives an authentication code acquisition request sent by the client;
[0108] The target ciphertext determination module 20 is used to determine the target ciphertext based on the time information and the preset encryption key.
[0109] The authentication code determination module 30 is used to determine an authentication code based on the target ciphertext and feed the authentication code back to the client. The client is used to send the authentication code to the server for identity authentication.
[0110] In this embodiment, upon receiving an authentication code retrieval request from a client, time information is determined based on the request; target ciphertext is determined based on the time information and a preset encryption key; an authentication code is determined based on the target ciphertext, and the authentication code is sent back to the client. The client then sends the authentication code to the server for identity authentication. Compared to existing methods of identity authentication via SMS verification codes, this embodiment improves identity verification efficiency.
[0111] This application also provides an authentication device for use on a server; please refer to [reference needed]. Figure 5 , Figure 5 This is a schematic diagram of the module structure of an identity authentication device according to a second embodiment of this application; the identity authentication device includes:
[0112] The receiving module 40 is used to determine the preset encryption key when it receives the authentication code sent by the client;
[0113] The authentication code set determination module 50 is used to determine the authentication code set based on the preset encryption key and the current time information;
[0114] The authentication module 60 is used to perform authentication based on the authentication code set and the authentication code.
[0115] In this embodiment, upon receiving an authentication code from the client, a preset encryption key is determined; an authentication code set is determined based on the preset encryption key and the current time information; and authentication is performed based on the authentication code set and the authentication codes. Compared to existing methods of identity authentication via SMS verification codes, the method described in this application can improve the efficiency of identity verification.
[0116] The identity authentication device provided in this application, employing the identity authentication method described in the above embodiments, can solve the technical problem of low efficiency in existing identity authentication methods. Compared with the prior art, the beneficial effects of the identity authentication device provided in this application are the same as those of the identity authentication method described in the above embodiments, and other technical features in the identity authentication device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0117] This application provides an identity authentication device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the identity authentication method in Embodiment 1 above.
[0118] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an identity authentication device suitable for implementing embodiments of this application. The identity authentication device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The identity authentication device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0119] like Figure 6As shown, the authentication device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the authentication device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the authentication device to communicate wirelessly or wiredly with other devices to exchange data. Although authentication devices with various systems are shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0120] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0121] The identity authentication device provided in this application, employing the identity authentication method described in the above embodiments, can solve the technical problem of low efficiency in existing identity authentication methods. Compared with the prior art, the beneficial effects of the identity authentication device provided in this application are the same as those of the identity authentication method described in the above embodiments, and other technical features of this identity authentication device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0122] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0123] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0124] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the authentication method described in the above embodiments.
[0125] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0126] The aforementioned computer-readable storage medium may be included in the authentication device; or it may exist independently and not assembled into the authentication device.
[0127] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0129] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0130] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described authentication method, thereby solving the technical problem of low efficiency in existing authentication methods. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the authentication method provided in the above embodiments, and will not be repeated here.
[0131] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the authentication method described above.
[0132] The computer program product provided in this application can solve the technical problem of low efficiency in existing identity authentication. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the identity authentication method provided in the above embodiments, and will not be repeated here.
[0133] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. An identity authentication method, characterized in that, Applied to SIM cards, the authentication method includes the following steps: Upon receiving an authentication code retrieval request from the client, determine time information based on the authentication code retrieval request; The target ciphertext is determined based on the time information and the preset encryption key; An authentication code is determined based on the target ciphertext, and the authentication code is fed back to the client. The client is used to send the authentication code to the server for identity authentication.
2. The identity authentication method as described in claim 1, characterized in that, Before the step of determining the target ciphertext based on the time information and the preset encryption key, the method further includes: Determine the XOR index of the randomly generated random number; The key salt is determined based on the XOR index and the card serial number; The preset root key is encrypted based on the key salt to obtain the preset encryption key.
3. The identity authentication method as described in claim 1, characterized in that, The step of determining the target ciphertext based on the time information and the preset encryption key includes: The time information is preprocessed to obtain the time factor; The time factor is filled in to obtain plaintext data; The plaintext data is encrypted using a preset algorithm and the preset encryption key to obtain the target ciphertext.
4. An identity authentication method, characterized in that, When applied to a server, the authentication method includes the following steps: Upon receiving the authentication code sent by the client, a preset encryption key is determined based on the authentication code; The authentication code set is determined based on the preset encryption key and the current time information; Authentication is performed based on the set of authentication codes and the authentication codes themselves.
5. The identity authentication method as described in claim 4, characterized in that, The step of determining the authentication code set based on the preset encryption key and the current time information includes: Determine the target time range based on the current time information; Determine the target time factor based on the target time range; The target time factor is encrypted using the preset encryption key to obtain ciphertext data; The authentication code set is determined based on the encrypted data.
6. An identity authentication device, characterized in that, The authentication device, applied to a SIM card, includes: The determination module is used to determine time information based on the authentication code acquisition request when it receives an authentication code acquisition request sent by the client; The target ciphertext determination module is used to determine the target ciphertext based on the time information and the preset encryption key. The authentication code determination module is used to determine the authentication code based on the target ciphertext and feed the authentication code back to the client. The client is used to send the authentication code to the server for identity authentication.
7. An identity authentication device, characterized in that, The authentication device, applied to a server, includes: The receiving module is used to determine a preset encryption key based on the authentication code sent by the client when it receives the authentication code; The authentication code set determination module is used to determine the authentication code set based on the preset encryption key and the current time information; An authentication module is used to perform authentication based on the authentication code set and the authentication codes.
8. An identity authentication device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the authentication method as described in any one of claims 1 to 3 and / or 4 to 5.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the authentication method as described in any one of claims 1 to 3 and / or 4 to 5.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the authentication method as described in any one of claims 1 to 3 and / or 4 to 5.