Digital key authentication method, device, computer equipment and storage medium
By exchanging password algorithm information and matching response data between the digital key end and the unlocking terminal, the password algorithm to be used is determined, and the authentication failure problem caused by inconsistent multiple cryptographic algorithms in the prior art is solved, and multi-algorithm authentication across terminals is achieved.
Patent Information
- Application Number
- CN202211724761.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing digital key authentication method cannot successfully authenticate when multiple password algorithms are preset at the terminal and the terminal password algorithms are inconsistent.
The digital key end responds to the matching instructions sent by the unlocking terminal, determines the locally supported password algorithm, and generates matching response data containing password algorithm information. The unlocking terminal determines the password matching response result based on the analysis results of the response data and the password selection policy, thereby determining the password algorithm to be used for authentication processing.
It realizes successful authentication of the digital key end and the unlocking terminal under various password algorithm environments, solving the authentication failure problem caused by inconsistent cryptographic algorithms in the prior art.
Smart Images

Figure CN116012982B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital key communication technology, and in particular to a digital key authentication method, device, computer equipment and storage medium. Background Art
[0002] With the development of digital key communication technology, digital key authentication technology has emerged, through which the digital key terminal and the unlocking end can be successfully authenticated, and then the unlocking end can be successfully unlocked. The digital key terminal is a terminal containing a digital key, such as a smartphone, a wearable smart device, etc. The unlocking end is a terminal to be unlocked, such as a car.
[0003] In the conventional technology, the digital key terminal authenticates with the unlocking terminal based on a cryptographic algorithm preset in the digital key terminal, and during the authentication process, the unlocking terminal authenticates with the digital key terminal based on a cryptographic algorithm preset in the unlocking terminal.
[0004] However, in the current digital key authentication method, both the digital key terminal and the unlocking terminal only pre-set one locally supported cryptographic algorithm, and the digital key terminal and the unlocking terminal can only successfully authenticate when the cryptographic algorithm preset in the digital key terminal is the same as the cryptographic algorithm preset in the unlocking terminal. If there are multiple cryptographic algorithms preset in the terminal (i.e., the digital key terminal and / or the unlocking terminal), and the cryptographic algorithm preset in the digital key terminal is the same as the cryptographic algorithm preset in the unlocking terminal, then the current digital key authentication method cannot be used for authentication. Summary of the invention
[0005] Based on this, it is necessary to provide a digital key authentication method, device, computer equipment, computer-readable storage medium and computer program product that can successfully authenticate the digital key end and the unlocking terminal in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for authenticating a digital key. The method is applied to a digital key end, and the method includes:
[0007] In response to a matching instruction sent by the unlocking terminal, determining a cryptographic algorithm supported locally;
[0008] When the locally supported cryptographic algorithm meets the preset conditions, generating matching response data including cryptographic algorithm information; the cryptographic algorithm information includes priority information corresponding to each of the cryptographic algorithms;
[0009] Returning the matching response data to the unlocking terminal, the matching response data being used to instruct the unlocking terminal to determine a password matching response result according to the parsing result of the password algorithm information and the password selection strategy;
[0010] The cryptographic algorithm to be used is determined according to the cryptographic matching response result corresponding to the matching response data, and authentication processing is performed based on the cryptographic algorithm to be used.
[0011] In one embodiment, determining the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data includes:
[0012] When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used;
[0013] When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, a first type of locally supported password algorithm is used as the password algorithm to be used.
[0014] In one embodiment, when the matching instruction includes a matching application identifier, when the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes:
[0015] In a case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information;
[0016] The method further comprises:
[0017] When the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm, comparing the matching application identifier with a preset application identifier to determine a comparison result;
[0018] If the comparison result indicates that the identifiers are consistent, generating a second matching result indicating successful matching, and based on the second matching result, generating matching response data including a matching result identifier corresponding to the second matching result;
[0019] When the comparison result indicates that the identifiers are inconsistent, a first matching result indicating a matching failure is generated, and based on the first matching result, matching response data including a matching result identifier corresponding to the first matching result is generated.
[0020] In one embodiment, when the matching instruction does not include a matching application identifier, when the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes:
[0021] In response to the matching instruction, generating a second matching result indicating a successful match;
[0022] Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0023] In a second aspect, the present application provides a method for authenticating a digital key. The method is applied to unlock a terminal, and the method includes:
[0024] Sending a matching instruction to the digital key terminal, wherein the matching instruction is used to instruct the digital key terminal to return matching response data based on the matching instruction;
[0025] In the case that the matching response data contains the cryptographic algorithm information corresponding to the digital key end, the cryptographic matching response result corresponding to the matching response data is determined according to the parsing result of the cryptographic algorithm information and the cryptographic selection strategy; the cryptographic matching response result is used for the digital key end to determine the cryptographic algorithm to be used, and perform authentication processing based on the cryptographic algorithm to be used.
[0026] In one embodiment, determining the password matching response result corresponding to the matching response data according to the parsing result of the password algorithm information and the password selection strategy includes:
[0027] In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy;
[0028] When the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the cryptographic matching response result is determined as not sending the cryptographic algorithm indication data to the digital key terminal.
[0029] In one embodiment, the method further comprises:
[0030] In a case where the matching instruction includes a matching application identifier and the matching response data does not include cryptographic algorithm information corresponding to the digital key terminal, determining the matching result based on a matching result identifier included in the matching response data;
[0031] In the case where the matching result is a first matching result indicating a matching failure, using a first type of cryptographic algorithm as a cryptographic algorithm to be used, and determining that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key terminal;
[0032] When the matching result is a second matching result indicating a successful match, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key end.
[0033] In a third aspect, the present application also provides a digital key authentication system. The system includes a digital key terminal and an unlocking terminal, wherein:
[0034] The unlocking terminal is used to send a matching instruction to the digital key terminal;
[0035] The digital key terminal is used to determine the locally supported cryptographic algorithm in response to the matching instruction sent by the unlocking terminal; if the locally supported cryptographic algorithm meets the preset conditions, generate matching response data containing cryptographic algorithm information; the cryptographic algorithm information contains priority information corresponding to each locally supported cryptographic algorithm; the unlocking terminal is further used to determine the password matching response result corresponding to the matching response data according to the parsing result of the cryptographic algorithm information and the password selection strategy;
[0036] The digital key end is also used to determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
[0037] In one embodiment, the digital key terminal is specifically used for:
[0038] When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used;
[0039] When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, the first type of password algorithm supported locally is used as the password algorithm to be used.
[0040] In one embodiment, when the matching instruction includes a matching application identifier, the digital key terminal is specifically used to:
[0041] In the case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information;
[0042] The digital key terminal is also used for:
[0043] When the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm, comparing the matching application identifier with a preset application identifier to determine a comparison result;
[0044] If the comparison result indicates that the identifiers are consistent, generating a second matching result indicating successful matching, and based on the second matching result, generating matching response data including the matching result identifier corresponding to the second matching result;
[0045] When the comparison result indicates that the identifiers are inconsistent, a first matching result indicating a matching failure is generated, and based on the first matching result, matching response data including a matching result identifier corresponding to the first matching result is generated.
[0046] In one embodiment, when the matching instruction does not include a matching application identifier, the digital key terminal is specifically used to:
[0047] In response to the matching instruction, generating a second matching result indicating a successful match;
[0048] Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0049] In one embodiment, the unlocking terminal is specifically used for:
[0050] In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy;
[0051] When the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the cryptographic matching response result is determined to be not sending the cryptographic algorithm indication data to the digital key end.
[0052] In one embodiment, the unlocking terminal is further used for:
[0053] In a case where the matching instruction includes a matching application identifier and the matching response data does not include cryptographic algorithm information corresponding to the digital key terminal, determining the matching result based on a matching result identifier included in the matching response data;
[0054] In the case where the matching result is a first matching result indicating a matching failure, using a first type of cryptographic algorithm as a cryptographic algorithm to be used, and determining that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key terminal;
[0055] When the matching result is a second matching result indicating a successful match, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key end.
[0056] In a fourth aspect, the present application also provides a digital key authentication device. The device is applied to a digital key end, and the device includes:
[0057] A response module, configured to determine a locally supported cryptographic algorithm in response to a matching instruction sent by the unlocking terminal;
[0058] A first determination module is used to generate matching response data including cryptographic algorithm information when the locally supported cryptographic algorithm meets a preset condition; the cryptographic algorithm information includes priority information corresponding to each of the cryptographic algorithms;
[0059] A sending module, used for returning the matching response data to the unlocking terminal, wherein the matching response data is used for instructing the unlocking terminal to determine a password matching response result according to the parsing result of the password algorithm information and the password selection strategy;
[0060] The second determination module is used to determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
[0061] In one embodiment, the second determining module is specifically configured to:
[0062] When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used;
[0063] When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, a first type of locally supported password algorithm is used as the password algorithm to be used.
[0064] In one of the embodiments, when the matching instruction includes a matching application identifier, the first determining module is specifically configured to:
[0065] In a case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information;
[0066] The digital key authentication device also includes:
[0067] A third determination module is used to compare the matching application identifier with a preset application identifier to determine a comparison result when the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm;
[0068] A first matching module, configured to generate a second matching result indicating a successful match if the comparison result indicates that the identifiers are consistent, and generate matching response data including a matching result identifier corresponding to the second matching result based on the second matching result;
[0069] The second matching module is configured to generate a first matching result indicating a matching failure when the comparison result indicates that the identifiers are inconsistent, and generate matching response data including a matching result identifier corresponding to the first matching result based on the first matching result.
[0070] In one embodiment, when the matching instruction does not include a matching application identifier, the first determining module is specifically configured to:
[0071] In response to the matching instruction, generating a second matching result indicating a successful match;
[0072] Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0073] In a fifth aspect, the present application also provides a digital key authentication device. The device is applied to unlock the terminal, and the device includes:
[0074] A sending module, used for sending a matching instruction to the digital key end, wherein the matching instruction is used for instructing the digital key end to return matching response data based on the matching instruction;
[0075] The first determination module is used to determine the password matching response result corresponding to the matching response data according to the parsing result of the password algorithm information and the password selection strategy when the matching response data contains the password algorithm information corresponding to the digital key end; the password matching response result is used for the digital key end to determine the password algorithm to be used, and perform authentication processing based on the password algorithm to be used.
[0076] In one embodiment, the first determining module is specifically configured to:
[0077] In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy;
[0078] When the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the cryptographic matching response result is determined as not sending the cryptographic algorithm indication data to the digital key terminal.
[0079] In one embodiment, the digital key authentication device further includes:
[0080] A second determination module, configured to determine the matching result based on the matching result identifier included in the matching response data when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end;
[0081] a first matching module, configured to, when the matching result is a first matching result indicating a matching failure, use a first type of cryptographic algorithm as a cryptographic algorithm to be used, and determine that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key terminal;
[0082] The second matching module is used to use the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier as the cryptographic algorithm to be used when the matching result is a second matching result indicating a successful match, and determine that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key end.
[0083] In a sixth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps described in the first aspect or the second aspect are implemented.
[0084] In a seventh aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps described in the first aspect or the second aspect are implemented.
[0085] In an eighth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps described in the first aspect or the second aspect are performed.
[0086] The above-mentioned digital key authentication method, device, computer equipment, storage medium and computer program product determine the locally supported cryptographic algorithm by responding to the matching instruction sent by the unlocking terminal; generate matching response data containing cryptographic algorithm information when the locally supported cryptographic algorithm meets the preset conditions; the cryptographic algorithm information contains the priority information corresponding to each cryptographic algorithm; return matching response data to the unlocking terminal, the matching response data is used to instruct the unlocking terminal to determine the password matching response result according to the parsing result of the cryptographic algorithm information and the password selection strategy; determine the cryptographic algorithm to be used according to the password matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used. In the above scheme, the unlocking terminal receives the matching response data determined by the digital key end based on the locally supported cryptographic algorithm. Therefore, the unlocking terminal can know the cryptographic algorithm supported locally by the digital key end based on the matching response data, and then determine the cryptographic algorithm to be used by the unlocking terminal. Then, the cryptographic algorithm to be used by the digital key end is determined based on the password matching response result of the unlocking terminal, that is, the digital key end can determine the cryptographic algorithm to be used by the unlocking terminal based on the password matching response result, and then determine the cryptographic algorithm to be used by itself (i.e., the digital key end). In this way, it is ensured that the cryptographic algorithms to be used by the digital key end and the unlocking terminal are the same cryptographic algorithm, and then the authentication can be successful by adopting this scheme for authentication. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 A diagram of an application environment of a digital key authentication method in one embodiment;
[0088] Figure 2 1 is a flow chart of a method for authenticating a digital key in one embodiment;
[0089] Figure 3 A schematic flow chart of a method for determining a cryptographic algorithm to be used in one embodiment;
[0090] Figure 4 is a flowchart of a digital key authentication method in another embodiment;
[0091] Figure 5 is a flow chart of a method for determining a cryptographic algorithm to be used in another embodiment;
[0092] Figure 6 is a structural block diagram of a digital key authentication device in one embodiment;
[0093] Figure 7 is a structural block diagram of a digital key authentication device in another embodiment;
[0094] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0095] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0096] The digital key authentication method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the digital key terminal 102 communicates with the unlocking terminal 104 through the network. The digital key terminal 102 can be, but is not limited to, various smart phones and portable wearable devices, and the portable wearable devices can be smart watches, smart bracelets, etc. Two cryptographic algorithms are pre-set in at least one of the digital key terminal 102 or the unlocking terminal 104. Among them, the types of cryptographic algorithms include international algorithms and national secret algorithms. International algorithms include but are not limited to Elliptic Curve Cryptography (ECC) algorithms; national secret algorithms include but are not limited to SM1 algorithms, SM2 algorithms, and SM3 algorithms.
[0097] When the unlocking terminal 104 detects the digital key end 102, the unlocking terminal 104 sends a matching instruction to the digital key end 102. The matching instruction is used to match the digital key application in the digital key end. The digital key end 102 responds to the matching instruction sent by the unlocking terminal 104 and determines the cryptographic algorithm supported locally by the digital key end 102. Specifically, the digital key end 102 responds to the matching instruction sent by the unlocking terminal 104, and matches the digital key application corresponding to the matching instruction based on the matching instruction. The digital key end 102 uses the cryptographic algorithm supported by the digital key application corresponding to the matching instruction as the locally supported cryptographic algorithm. Optionally, the digital key application corresponding to the matching instruction may be one or more. If there are multiple digital key applications corresponding to the matching instruction, different digital key applications corresponding to the matching instruction may support different cryptographic algorithms. It can be understood that when there are multiple digital key applications corresponding to the matching instruction, the digital key end 102 uses the cryptographic algorithm supported by each digital key application corresponding to the matching instruction as the locally supported cryptographic algorithm. It can be understood that the cryptographic algorithm supported by the digital key application in the digital key terminal 102 must be the cryptographic algorithm preset by the digital key terminal. When the locally supported cryptographic algorithm meets the preset conditions, the digital key terminal 102 generates matching response data containing cryptographic algorithm information. Among them, the preset condition is that the locally supported cryptographic algorithms include international algorithms and national secret algorithms. The cryptographic algorithm information is determined based on the priority of each cryptographic algorithm supported locally, and the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm. The matching response data also includes a matching result. The matching result includes a first matching result and a second matching result, the first matching result indicates that the matching is successful, and the second matching result indicates that the matching fails. Specifically, when the locally supported cryptographic algorithms include international algorithms and national secret algorithms, the digital key terminal 102 generates matching response data containing cryptographic algorithm information and matching results, and returns the matching response data to the unlocking terminal 104. The unlocking terminal 104 parses the matching response data and obtains the parsing result of the cryptographic algorithm information in the matching response data. Among them, the parsing result includes priority information corresponding to each cryptographic algorithm, or the cryptographic algorithm information cannot be parsed. The unlocking terminal 104 generates a password matching response result corresponding to the matching response data according to the parsing result and the password selection strategy. The password selection strategy has a corresponding relationship with the parsing result of the matching response data. The parsing result of the matching response data includes the parsing result and the matching result of the cryptographic algorithm information. The password matching response result is that the unlocking terminal 104 sends the cryptographic algorithm indication data to the digital key end 102, or the unlocking terminal 104 does not send the cryptographic algorithm indication data to the digital key end 102. It can be understood that the parsing result of the matching response data has a corresponding relationship with the password matching response result. The digital key end 102 determines the cryptographic algorithm to be used according to the password matching response result corresponding to the matching response data.Specifically, when the password matching response result corresponding to the matching response data is that the unlocking terminal 104 sends the cryptographic algorithm indication data to the digital key end 102, the unlocking terminal 104 sends the cryptographic algorithm indication data to the digital key end 102, and the digital key end 102 uses the cryptographic algorithm corresponding to the cryptographic algorithm identifier as the cryptographic algorithm to be used based on the cryptographic algorithm identifier in the cryptographic algorithm indication data. When the password matching response result corresponding to the matching response data is that the unlocking terminal 104 does not send the cryptographic algorithm indication data to the digital key end 102, the digital key end 102 uses the first type of cryptographic algorithm supported locally as the cryptographic algorithm to be used. The first type of cryptographic algorithm includes international algorithms. In one embodiment, within a preset receiving time, if the digital key end 102 does not receive the cryptographic algorithm indication data sent by the unlocking terminal 104, the digital key end 102 uses the first type of cryptographic algorithm supported locally as the cryptographic algorithm to be used. The digital key end 102 performs authentication processing based on the cryptographic algorithm to be used. Specifically, the unlocking terminal 104 performs encryption processing based on the cryptographic algorithm to be used in the unlocking terminal 104, and the digital key end 102 performs decryption processing based on the cryptographic algorithm to be used in the digital key end 102. It can be understood that the cryptographic algorithm to be used in the unlocking terminal 104 and the cryptographic algorithm to be used in the digital key terminal 102 are the same cryptographic algorithm.
[0098] In one embodiment, Figure 2 As shown, a digital key authentication method is provided, and the method is applied to Figure 1 The digital key authentication system in the example is used to illustrate the following steps:
[0099] Step 202: In response to a matching instruction sent by the unlocking terminal, determine a cryptographic algorithm supported locally.
[0100] In the embodiment of the present application, the digital key end 102 responds to the matching instruction sent by the unlocking terminal 104 to determine the cryptographic algorithm locally supported by the digital key end 102. Specifically, the digital key end 102 receives the matching instruction sent by the unlocking terminal, and matches the digital key application corresponding to the matching instruction based on the matching instruction. Among them, the matching instruction is used to determine whether there is a digital key application corresponding to the matching instruction in the digital key end 102. The matching instruction that does not contain the matching application identifier is used to determine whether there is a digital key application in the digital key end 102. The digital key applications in the digital key end 102 are all digital key applications corresponding to the matching instruction that does not contain the matching application identifier. The matching instruction that contains the matching application identifier is used to determine whether there is a digital key application corresponding to the matching application identifier in the digital key end 102. In the digital key end 102, only the digital key application whose preset application identifier is consistent with the matching application identifier is the digital key application corresponding to the matching instruction containing the matching application identifier. The digital key end 102 uses the cryptographic algorithm supported by the digital key application corresponding to the matching instruction in the digital key end 102 as the locally supported cryptographic algorithm. Optionally, the digital key application corresponding to the matching instruction may be one or more. If there are multiple digital key applications corresponding to the matching instruction, different digital key applications corresponding to the matching instruction may support different cryptographic algorithms. It can be understood that in the case where there are multiple digital key applications corresponding to the matching instruction, the digital key end 102 uses the cryptographic algorithms supported by each digital key application corresponding to the matching instruction as the locally supported cryptographic algorithms. For example, assuming that the cryptographic algorithms preset in the digital key end 102 are the ECC algorithm and the SM2 algorithm, and there are digital key applications 1, 2, and 3 in the digital key end 102. Among them, digital key application 1 supports the ECC algorithm, digital key application 2 supports the SM2 algorithm, and digital key application 3 supports both the ECC algorithm and the SM2 algorithm. Assuming that the digital key applications corresponding to the matching instruction include digital key applications 1, 2, and 3, then the locally supported cryptographic algorithms include the ECC algorithm and the SM2 algorithm. It can be understood that the cryptographic algorithms supported by the digital key applications in the digital key end 102 must be the cryptographic algorithms preset by the digital key end.
[0101] Step 204: When the locally supported cryptographic algorithm meets the preset conditions, generate matching response data containing cryptographic algorithm information.
[0102] The cryptographic algorithm information includes the priority information corresponding to each cryptographic algorithm.
[0103] In an embodiment of the present application, the digital key end 102 identifies and counts the algorithm categories of the cryptographic algorithms supported locally. When the algorithm categories meet the preset conditions, the digital key end 102 generates matching response data containing the cryptographic algorithm information. Among them, the preset condition is that the cryptographic algorithms supported locally include the first type of cryptographic algorithms and the second type of cryptographic algorithms. The first type of cryptographic algorithms include international algorithms, and the second type of cryptographic algorithms include national secret algorithms. Specifically, when the algorithm categories of the cryptographic algorithms supported locally include the first type of cryptographic algorithms and the second type of cryptographic algorithms, the digital key end 102 generates cryptographic algorithm information containing the priority information corresponding to each cryptographic algorithm based on the priority of each cryptographic algorithm supported locally, and generates matching response data based on the cryptographic algorithm information. In one embodiment, the digital key end 102 writes the cryptographic algorithm information into a TLV (T represents a tag, L represents a length, and V represents a value) field, wherein the value value is used to characterize the priority information corresponding to each cryptographic algorithm. Optionally, the value value is also used to characterize the cryptographic algorithm supported locally by the digital key end 102. Among them, the matching response data includes the matching result. The matching result includes a first matching result and a second matching result, the first matching result indicates that the matching is successful, and the second matching result indicates that the matching fails. Successful matching indicates that a digital key application corresponding to the matching instruction exists in the digital key end 102; failed matching indicates that a digital key application corresponding to the matching instruction does not exist in the digital key end 102. Specifically, the digital key end 102 generates matching response data based on the cryptographic algorithm information and the matching result.
[0104] Step 206: Return matching response data to the unlocking terminal.
[0105] The matching response data is used to instruct the unlocking terminal to determine the password matching response result according to the parsing result of the password algorithm information and the password selection strategy.
[0106] In an embodiment of the present application, the digital key terminal 102 returns matching response data to the unlocking terminal. The matching response data includes matching results and cryptographic algorithm information. The parsing result includes priority information corresponding to each cryptographic algorithm, or the cryptographic algorithm information cannot be parsed. The password selection strategy is used by the unlocking terminal to determine the cryptographic algorithm to be used by the unlocking terminal. The password matching response result is that the unlocking terminal 104 sends cryptographic algorithm indication data to the digital key terminal 102, or the unlocking terminal 104 does not send cryptographic algorithm indication data to the digital key terminal 102. The parsing result of the matching response data, the password selection strategy and the password matching response result have a preset first corresponding relationship. The cryptographic algorithm indication data is used to instruct the digital key terminal 102 to determine the cryptographic algorithm to be used by the digital key terminal 102.
[0107] Step 208: Determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
[0108] In an embodiment of the present application, the digital key end 102 determines the cryptographic algorithm to be used according to the password matching response result corresponding to the matching response data, and performs authentication processing based on the cryptographic algorithm to be used. Among them, the password matching response result and the cryptographic algorithm to be used have a preset second corresponding relationship. The second corresponding relationship includes that if the password matching response result is that the unlocking terminal 104 sends cryptographic algorithm indication data to the digital key end 102, then the cryptographic algorithm to be used corresponding to the password matching response result is the cryptographic algorithm corresponding to the cryptographic algorithm indication data; if the password matching response result is that the unlocking terminal 104 does not send cryptographic algorithm indication data to the digital key end 102, then the cryptographic algorithm to be used corresponding to the password matching response result is the first type of cryptographic algorithm. In one embodiment, the first type of cryptographic algorithm includes an international algorithm.
[0109] In the above-mentioned digital key authentication method, the unlocking terminal receives the matching response data determined by the digital key end based on the locally supported cryptographic algorithm. Therefore, the unlocking terminal can know the cryptographic algorithm locally supported by the digital key end based on the matching response data, and then determine the cryptographic algorithm to be used by the unlocking terminal. Then, the cryptographic algorithm to be used by the digital key end is determined based on the password matching response result of the unlocking terminal. That is to say, the digital key end can determine the cryptographic algorithm to be used by the unlocking terminal based on the password matching response result, and then determine the cryptographic algorithm to be used by itself (i.e., the digital key end). In this way, it is ensured that the cryptographic algorithms to be used by the digital key end and the unlocking terminal are the same cryptographic algorithm, and then the authentication can be successful by using this solution for authentication.
[0110] In one embodiment, Figure 3 As shown, according to the password matching response result corresponding to the matching response data, determining the password algorithm to be used includes:
[0111] Step 302, when the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtain the password algorithm identifier in the password algorithm indication data, and use the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used.
[0112] In the embodiment of the present application, when the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal 104, the digital key end 102 receives the password algorithm indication data sent by the unlocking terminal 104. The password algorithm indication data includes a password algorithm identifier, which is a password algorithm identifier corresponding to the password algorithm to be used by the unlocking terminal 104. The digital key end 102 parses and obtains the password identifier in the password algorithm indication data, identifies the password algorithm corresponding to the password identifier, and uses the password algorithm corresponding to the password identifier as the password algorithm to be used by the digital key end 102.
[0113] Step 304: When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, the first type of password algorithm supported locally is used as the password algorithm to be used.
[0114] In the embodiment of the present application, when the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal 104 is not received, the digital key end 102 uses the first type of password algorithm supported locally as the password algorithm to be used by the digital key end 102. It can be understood that when the password algorithm supported locally by the digital key end 102 meets the preset conditions, if the password algorithm to be used by the unlocking terminal 104 is the first type of password algorithm, the unlocking terminal 104 does not send the password algorithm indication data to the digital key end 102, then the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal 104 is not received. Among them, the first type of password algorithm includes international algorithms. In one embodiment, the situation where the password algorithm indication data sent by the unlocking terminal 104 is not received can be that the digital key end 102 does not receive the password algorithm indication data sent by the unlocking terminal 104 within the preset receiving time. Specifically, within the preset receiving time, if the digital key end 102 does not receive the password algorithm indication data sent by the unlocking terminal 104, the digital key end 102 uses the first type of password algorithm supported locally as the password algorithm to be used.
[0115] In this embodiment, the digital key terminal uses the cryptographic algorithm corresponding to the cryptographic algorithm identifier sent by the unlocking terminal as the cryptographic algorithm to be used, or, if the cryptographic algorithm locally supported by the digital key terminal meets the preset conditions, if the cryptographic algorithm to be used by the unlocking terminal is the first type of cryptographic algorithm, the digital key terminal does not receive the cryptographic algorithm indication data, and uses the first type of cryptographic algorithm group as the cryptographic algorithm to be used. This ensures that the cryptographic algorithms to be used by the digital key terminal and the unlocking terminal are consistent, so that authentication can be successful.
[0116] In one embodiment, when the matching instruction includes a matching application identifier and the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes:
[0117] In the case where the locally supported cryptographic algorithms include the first type of cryptographic algorithms and the second type of cryptographic algorithms, generating matching response data including cryptographic algorithm information;
[0118] The matching instruction includes a matching application identifier, which is used by the digital key end to match the digital key application corresponding to the matching application identifier.
[0119] In the embodiment of the present application, when the matching instruction includes a matching application identifier, and the cryptographic algorithms locally supported by the digital key terminal 102 include the first type of cryptographic algorithms and the second type of cryptographic algorithms, the digital key terminal 102 generates cryptographic algorithm information including the priority information corresponding to each cryptographic algorithm based on the priority of each cryptographic algorithm locally supported, and generates matching response data based on the cryptographic algorithm information. Specifically, when the matching instruction includes a matching application identifier, and the cryptographic algorithms locally supported by the digital key terminal 102 include the first type of cryptographic algorithms and the second type of cryptographic algorithms, the digital key terminal 102 compares the matching application identifier in the matching instruction with the preset application identifier of the digital key application in the digital key terminal 102, and obtains a comparison result indicating that the identifiers are inconsistent. Among them, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier included in the matching instruction is the second type of cryptographic algorithm. The second type of cryptographic algorithm includes the national secret algorithm. The cryptographic algorithm locally supported by the digital key terminal 102 meets the preset condition, which means that the cryptographic algorithm supported by the digital key application in the digital key terminal 102 includes the first type of cryptographic algorithm and the second type of cryptographic algorithm. The first type of cryptographic algorithm includes the international algorithm. It can be understood that when the matching instruction includes a matching application identifier and the cryptographic algorithm locally supported by the digital key end 102 meets the preset conditions, the digital key application corresponding to the matching application identifier only supports the second type of cryptographic algorithm, and the digital key application in the digital key end 102 supports dual algorithms (including the first type of cryptographic algorithm and the second type of cryptographic algorithm), so the matching application identifier is inconsistent with the application identifier preset by the digital key application in the digital key end 102. The digital key end 102 generates a first matching result indicating a matching failure based on the comparison result indicating the identification inconsistency. Among them, the matching result includes a first matching result and a second matching result, the first matching result indicates a matching failure, and the second matching result indicates a matching success. Based on the first matching result and the priority information corresponding to each locally supported cryptographic algorithm, the digital key end 102 generates matching response data including a matching result identifier corresponding to the first matching result and cryptographic algorithm information. Specifically, the digital key end 102 generates a matching result identifier corresponding to the first matching result based on the first matching result. The digital key end 102 generates cryptographic algorithm information based on the preset priority information corresponding to each locally supported cryptographic algorithm. The digital key terminal 102 generates matching response data based on the matching result identifier corresponding to the first matching result and the cryptographic algorithm information.
[0120] In this embodiment, when the matching instruction includes the matching application identifier, and the cryptographic algorithms locally supported by the digital key end are the first type of cryptographic algorithms and the second type of cryptographic algorithms, the digital key end generates matching response data based on the priority information corresponding to each cryptographic algorithm locally supported. In this way, the matching response data includes the priority information of each cryptographic algorithm in the digital key end, and the unlocking terminal can determine the cryptographic algorithm supported by the digital key application in the digital key end based on the information in the matching response data, and then determine the cryptographic algorithm to be used by the unlocking terminal, thereby ensuring that the cryptographic algorithm to be used by the unlocking terminal and the digital key end is the same cryptographic algorithm, and achieving successful authentication.
[0121] In one embodiment, when the matching instruction includes a matching application identifier, the digital key authentication method further includes:
[0122] When the locally supported cryptographic algorithm is a first-category cryptographic algorithm or a second-category cryptographic algorithm, the matching application identifier is compared with the preset application identifier to determine a comparison result; when the comparison result indicates that the identifiers are consistent, a second matching result indicating a successful match is generated, and based on the second matching result, matching response data including a matching result identifier corresponding to the second matching result is generated; when the comparison result indicates that the identifiers are inconsistent, a first matching result indicating a failed match is generated, and based on the first matching result, matching response data including a matching result identifier corresponding to the first matching result is generated.
[0123] In the embodiment of the present application, when the matching instruction includes a matching application identifier, and the cryptographic algorithm locally supported by the digital key terminal is a first type of cryptographic algorithm or a second type of cryptographic algorithm, the digital key terminal 102 compares the matching application identifier in the matching instruction with the preset application identifier of the digital key application in the digital key terminal 102 to obtain a comparison result. Among them, the cryptographic algorithm locally supported by the digital key terminal is a first type of cryptographic algorithm or a second type of cryptographic algorithm, which means that the cryptographic algorithm supported by the digital key application in the digital key terminal 102 is a first type of cryptographic algorithm, or a second type of cryptographic algorithm, that is, the digital key application in the digital key terminal 102 only supports a single algorithm but not a dual algorithm. The cryptographic algorithm supported by the digital key application corresponding to the matching application identifier included in the matching instruction is a second type of cryptographic algorithm. The second type of cryptographic algorithm includes a national secret algorithm. Specifically, when the matching instruction includes a matching application identifier, and the cryptographic algorithm locally supported by the digital key terminal is a second type of cryptographic algorithm, the digital key terminal 102 compares the matching application identifier in the matching instruction with the preset application identifier of the digital key application in the digital key terminal 102, and the digital key terminal 102 obtains a comparison result indicating that the identifiers are consistent. In the case where the comparison result indicates that the identifiers are consistent, the digital key end 102 generates a second matching result indicating that the match is successful, and based on the second matching result, generates matching response data including the matching result identifier corresponding to the second matching result. In the case where the matching instruction includes a matching application identifier, and the cryptographic algorithm locally supported by the digital key end is a first-class cryptographic algorithm, the digital key end 102 compares the matching application identifier in the matching instruction with the preset application identifier of the digital key application in the digital key end 102, and the digital key end 102 obtains a comparison result indicating that the identifiers are inconsistent. In the case where the comparison result indicates that the identifiers are inconsistent, the digital key end 102 generates a first matching result indicating that the match fails, and based on the first matching result, generates matching response data including the matching result identifier corresponding to the first matching result.
[0124] In this embodiment, if the application identifier preset by the digital key application in the digital key terminal is consistent with the matching application identifier, matching response data containing information indicating successful matching is generated; if the application identifier preset by the digital key application in the digital key terminal is inconsistent with the matching application identifier, matching response data containing information indicating failed matching is generated. Therefore, the unlocking terminal can determine the cryptographic algorithm locally supported by the digital key terminal based on the information contained in the matching response data, thereby ensuring that the cryptographic algorithm to be used by the unlocking terminal and the digital key terminal is the same cryptographic algorithm, so that authentication can be successful.
[0125] In one embodiment, when the matching instruction does not include a matching application identifier, and when the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes:
[0126] In response to the matching instruction, a second matching result indicating successful matching is generated; based on the second matching result and priority information corresponding to each cryptographic algorithm supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0127] Among them, the matching instruction that does not include the matching application identifier is used to instruct the digital key end to determine whether the digital key application is stored in the digital key end.
[0128] In the embodiment of the present application, when the matching instruction does not include the matching application identifier and the cryptographic algorithm locally supported by the digital key terminal 102 meets the preset conditions, the digital key terminal 102 generates a second matching result indicating successful matching in response to the matching instruction that does not include the matching application identifier. The cryptographic algorithm locally supported by the digital key terminal 102 meets the preset conditions, indicating that a digital key application supporting dual algorithms (including the first type of cryptographic algorithm and the second type of cryptographic algorithm) is stored in the digital key terminal. It can be understood that as long as there is a digital key application stored in the digital key terminal 102, it will respond to the matching instruction that does not include the matching application identifier and generate a second matching result. Based on the second matching result and the priority information corresponding to each cryptographic algorithm locally supported by the digital key terminal, the digital key terminal 102 generates matching response data including the matching result representation corresponding to the second matching result. Specifically, the digital key terminal 102 generates a matching result identifier corresponding to the second matching result based on the second matching result. The digital key terminal 102 generates cryptographic algorithm information based on the preset priority information corresponding to each cryptographic algorithm locally supported. The digital key terminal 102 generates matching response data based on the matching result identifier corresponding to the second matching result and the cryptographic algorithm information.
[0129] In this embodiment, when the matching instruction does not include the matching application identifier and the cryptographic algorithm locally supported by the digital key terminal 102 meets the preset conditions, the digital key terminal generates matching response data based on the second matching result indicating successful matching and the priority information corresponding to each cryptographic algorithm locally supported. In this way, the matching response data includes the information of successful matching and the priority information of each cryptographic algorithm in the digital key terminal. The unlocking terminal can determine the cryptographic algorithm supported by the digital key application in the digital key terminal based on the information in the matching response data, and then determine the cryptographic algorithm to be used by the unlocking terminal, thereby ensuring that the cryptographic algorithm to be used by the unlocking terminal and the digital key terminal is the same cryptographic algorithm, and achieving successful authentication.
[0130] In one embodiment, Figure 4 As shown, the method is applied to unlock the terminal, and the method includes:
[0131] Step 402, sending a matching instruction to the digital key terminal.
[0132] The matching instruction is used to instruct the digital key to return matching response data based on the matching instruction.
[0133] In an embodiment of the present application, when the unlocking terminal 104 detects the digital key terminal 102, the unlocking terminal 104 sends a matching instruction to the digital key terminal 102. Optionally, the matching instruction may be a matching instruction including a matching application identifier, or may be a matching instruction not including a matching application identifier. In one embodiment, when the unlocking terminal 104 detects the digital key terminal 102, the unlocking terminal 104 generates a matching instruction including a matching application identifier according to a preset matching application identifier. Among them, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is a second-class cryptographic algorithm.
[0134] Step 404, when the matching response data includes cryptographic algorithm information corresponding to the digital key end, determine the cryptographic matching response result corresponding to the matching response data according to the parsing result of the cryptographic algorithm information and the cryptographic selection strategy.
[0135] Among them, the password matching response result is used for the digital key end to determine the cryptographic algorithm to be used, and perform authentication processing based on the cryptographic algorithm to be used.
[0136] In the embodiment of the present application, the unlocking terminal 104 receives and parses the matching response data returned by the digital key terminal 102. In the case where the matching response data includes the cryptographic algorithm information corresponding to the digital key terminal 102, the unlocking terminal 104 parses the cryptographic algorithm information in the matching response data to obtain a parsing result. The parsing result includes priority information corresponding to each cryptographic algorithm, or the cryptographic algorithm information cannot be parsed. The unlocking terminal 104 sets the cryptographic algorithm to be used by the unlocking terminal 104 based on the parsing result and the password selection strategy, and obtains the password matching response result corresponding to the cryptographic algorithm to be used by the unlocking terminal 104 based on the cryptographic algorithm to be used by the unlocking terminal 104. The password selection strategy is used to determine the cryptographic algorithm to be used by the unlocking terminal 104. The password matching response result is that the unlocking terminal 104 sends the cryptographic algorithm indication data to the digital key terminal 102, or the unlocking terminal 104 does not send the cryptographic algorithm indication data to the digital key terminal 102. The parsing result of the matching response data, the password selection strategy and the password matching response result have a preset first corresponding relationship. Specifically, when the parsing result of the matching response data includes the priority information corresponding to each cryptographic algorithm, the password selection strategy is to determine the cryptographic algorithm to be used by the unlocking terminal 104 based on the cryptographic algorithm information; when the parsing result of the matching response data is that the cryptographic algorithm information cannot be parsed, the password selection strategy is to use the preset first-category cryptographic algorithm as the cryptographic algorithm to be used by the unlocking terminal 104. When the cryptographic algorithm to be used by the unlocking terminal 104 is the first-category cryptographic algorithm, the password matching response result is that the unlocking terminal 104 does not send the cryptographic algorithm indication data to the digital key end 102; when the cryptographic algorithm to be used by the unlocking terminal 104 is the second-category cryptographic algorithm, the password matching response result is that the unlocking terminal 104 sends the cryptographic algorithm indication data to the digital key end 102. Among them, the cryptographic algorithm indication data includes the cryptographic algorithm identifier corresponding to the second-category cryptographic algorithm, and the cryptographic algorithm identifier corresponding to the second-category cryptographic algorithm is used by the digital key end 102 to set the cryptographic algorithm to be used by the digital key end 102 to the second-category cryptographic algorithm.
[0137] In this embodiment, the cryptographic algorithm to be used by the unlocking terminal is determined based on the matching response data sent by the digital key end and the preset password selection strategy, and the password matching response result is determined based on the cryptographic algorithm to be used by the unlocking terminal. Among them, the matching response data contains information about the cryptographic algorithm locally supported by the digital key end. Therefore, the cryptographic algorithm to be used by the unlocking terminal is determined based on the cryptographic algorithm locally supported by the digital key end. The password matching response result of the unlocking terminal is used to indicate the cryptographic algorithm to be used by the digital key end, that is, the cryptographic algorithm to be used by the digital key end is determined based on the cryptographic algorithm to be used by the unlocking terminal, thereby ensuring that the cryptographic algorithms to be used by the digital key end and the unlocking terminal are the same cryptographic algorithm. Therefore, authentication can be successful using this solution.
[0138] In one embodiment, according to the parsing result of the cryptographic algorithm information and the cryptographic selection strategy, determining the cryptographic matching response result corresponding to the matching response data includes:
[0139] When the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, the password matching response result is determined based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and the password selection strategy; when the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the password matching response result is determined as not sending the cryptographic algorithm indication data to the digital key end.
[0140] In the embodiment of the present application, when the parsing result of the cryptographic algorithm information includes the priority information corresponding to each cryptographic algorithm, the unlocking terminal 104 parses the cryptographic algorithm information, and sets the cryptographic algorithm to be used by the unlocking terminal 104 based on the priority information corresponding to each cryptographic algorithm of the digital key end 102 in the cryptographic algorithm information and the preset password selection strategy. Specifically, when the priority information corresponding to each cryptographic algorithm of the digital key end 102 includes that the priority of the first type of cryptographic algorithm is higher than the priority of the second type of cryptographic algorithm, the unlocking terminal 104 uses the preset first type of cryptographic algorithm as the cryptographic algorithm of the unlocking terminal 104. When the priority information corresponding to each cryptographic algorithm of the digital key end 102 includes that the priority of the second type of cryptographic algorithm is higher than the priority of the first type of cryptographic algorithm, the unlocking terminal 104 uses the preset second type of cryptographic algorithm as the cryptographic algorithm of the unlocking terminal 104. The unlocking terminal 104 generates a password matching response result based on the cryptographic algorithm to be used by the unlocking terminal 104. Specifically, when the cryptographic algorithm to be used by the unlocking terminal 104 is the first type of cryptographic algorithm, the unlocking terminal does not generate cryptographic algorithm indication data, and further does not send the cryptographic algorithm indication data to the digital key end 102. In the case where the cryptographic algorithm to be used by the unlocking terminal 104 is the second type of cryptographic algorithm, the unlocking terminal generates cryptographic algorithm indication data including the cryptographic algorithm identifier based on the cryptographic algorithm identifier corresponding to the second type of cryptographic algorithm, and sends the cryptographic algorithm indication data including the cryptographic algorithm identifier to the digital key terminal 102. In the case where the result of parsing the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the unlocking terminal 104 does not parse the cryptographic algorithm information, and the unlocking terminal 104 uses the preset first type of cryptographic algorithm as the cryptographic algorithm to be used by the unlocking terminal 104. In the case where the cryptographic algorithm to be used by the unlocking terminal 104 is the first type of cryptographic algorithm, the unlocking terminal does not generate the cryptographic algorithm indication data, and further does not send the cryptographic algorithm indication data to the digital key terminal 102.
[0141] In this embodiment, the unlocking terminal determines the cryptographic algorithm to be used by the unlocking terminal according to the analysis result of the cryptographic algorithm information and the password selection strategy, and determines the password matching response result based on the cryptographic algorithm to be used by the unlocking terminal. The password matching response result is used to indicate the cryptographic algorithm to be used by the digital key end, that is, the cryptographic algorithm to be used by the digital key end is determined based on the cryptographic algorithm to be used by the unlocking terminal, thereby ensuring that the cryptographic algorithms to be used by the digital key end and the unlocking terminal are the same cryptographic algorithm. Therefore, authentication can be successful using this solution.
[0142] In one embodiment, Figure 5 As shown, the digital key authentication method also includes:
[0143] Step 502, when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end, determine the matching result based on the matching result identifier included in the matching response data.
[0144] In the embodiment of the present application, when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end 102, the unlocking terminal 104 obtains the matching result based on the matching result identifier included in the matching response data. Among them, the matching result is a first matching result indicating that the matching fails, or a second matching result indicating that the matching is successful. It can be understood that the matching response data does not include the cryptographic algorithm information corresponding to the digital key end 102, indicating that the cryptographic algorithm locally supported by the digital key end 102 is a single algorithm (a first type of cryptographic algorithm or a second type of cryptographic algorithm), and therefore, the cryptographic algorithm to be used by the digital key end 102 can only be the only cryptographic algorithm supported locally. Then, it is only necessary to determine the cryptographic algorithm to be used by the unlocking terminal based on the matching result of the digital key end 102, and it is not necessary to determine the cryptographic algorithm to be used by the digital key end 102 based on the cryptographic algorithm to be used by the unlocking terminal 104. That is to say, when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end 102, the digital key end 102 uses the locally supported cryptographic algorithm as the cryptographic algorithm to be used by the digital key end 102.
[0145] Step 504, when the matching result is the first matching result indicating a matching failure, the first type of cryptographic algorithm is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key end.
[0146] In the embodiment of the present application, when the matching result is the first matching result indicating a matching failure, the unlocking terminal 104 uses the first type of cryptographic algorithm as the cryptographic algorithm to be used, and generates a cryptographic matching response result without sending cryptographic algorithm indication data to the digital key terminal 102. It can be understood that, when the matching instruction includes a matching application identifier, the matching instruction sent by the unlocking terminal 104 to the digital key terminal 102 includes an application identifier corresponding to a digital key application that supports the second type of cryptographic algorithm. If the matching result generated by the digital key terminal 102 based on the matching instruction indicates a matching failure, it means that the cryptographic algorithm locally supported by the digital key terminal 102 is the first type of cryptographic algorithm. Therefore, when the matching result is the first matching result indicating a matching failure, the unlocking terminal 104 uses the first type of cryptographic algorithm as the cryptographic algorithm to be used, which can ensure that the cryptographic algorithms to be used by both the unlocking terminal 104 and the digital key terminal 102 are the first type of cryptographic algorithms.
[0147] Step 506, when the matching result is the second matching result indicating a successful match, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key end.
[0148] In the embodiment of the present application, when the matching result is the second matching result indicating a successful matching, the unlocking terminal 104 uses the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier as the cryptographic algorithm to be used, and generates a cryptographic matching response result without sending the cryptographic algorithm indication data to the digital key terminal 102. It can be understood that when the matching instruction includes the matching application identifier, the matching instruction sent by the unlocking terminal 104 to the digital key terminal 102 includes the application identifier corresponding to the digital key application supporting the second type of cryptographic algorithm. If the matching result generated by the digital key terminal 102 based on the matching instruction indicates a successful matching, it means that the cryptographic algorithm locally supported by the digital key terminal 102 is the second type of cryptographic algorithm. Therefore, when the matching result is the second matching result indicating a successful matching, the unlocking terminal 104 uses the second type of cryptographic algorithm as the cryptographic algorithm to be used, which can ensure that the cryptographic algorithms to be used by both the unlocking terminal 104 and the digital key terminal 102 are the second type of cryptographic algorithms.
[0149] In this embodiment, when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end, the unlocking terminal determines the cryptographic algorithm to be used by the unlocking terminal based on the matching result in the matching response data. Since the cryptographic algorithm locally supported by the digital key end whose matching response data does not include the cryptographic algorithm information is a single algorithm (the first type of cryptographic algorithm or the second type of cryptographic algorithm), and the unlocking terminal is determined based on the matching response data sent by the digital key end, it is ensured that the cryptographic algorithm to be used by the digital key end and the unlocking terminal is the same cryptographic algorithm. Therefore, authentication can be successful using this solution.
[0150] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiment of the present application also provides a digital key authentication system for implementing the digital key authentication method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more digital key authentication system embodiments provided below can refer to the limitations on the digital key authentication method above, and will not be repeated here.
[0152] In one embodiment, Figure 1 As shown, a digital key authentication system is provided, the system comprising a digital key terminal 102 and an unlocking terminal 104, wherein:
[0153] The unlocking terminal 104 is used to send a matching instruction to the digital key terminal 102;
[0154] The digital key terminal 102 is used to determine the locally supported cryptographic algorithm in response to the matching instruction sent by the unlocking terminal 104; if the locally supported cryptographic algorithm meets the preset conditions, generate matching response data including cryptographic algorithm information; the cryptographic algorithm information includes priority information corresponding to each locally supported cryptographic algorithm; the unlocking terminal 104 is also used to determine the password matching response result corresponding to the matching response data according to the parsing result of the cryptographic algorithm information and the password selection strategy;
[0155] The digital key end 102 is further used to determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
[0156] In one embodiment, the digital key terminal 102 is specifically used for:
[0157] When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal 104, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used;
[0158] When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal 104 is not received, the first type of password algorithm supported locally is used as the password algorithm to be used.
[0159] In one embodiment, when the matching instruction includes a matching application identifier, the digital key terminal 102 is specifically used to:
[0160] In a case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information;
[0161] The digital key terminal 102 is also used for:
[0162] When the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm, comparing the matching application identifier with a preset application identifier to determine a comparison result;
[0163] If the comparison result indicates that the identifiers are consistent, generating a second matching result indicating successful matching, and based on the second matching result, generating matching response data including a matching result identifier corresponding to the second matching result;
[0164] When the comparison result indicates that the identifiers are inconsistent, a first matching result indicating a matching failure is generated, and based on the first matching result, matching response data including a matching result identifier corresponding to the first matching result is generated.
[0165] In one embodiment, when the matching instruction does not include a matching application identifier, the digital key terminal 102 is specifically used to:
[0166] In response to the matching instruction, generating a second matching result indicating a successful match;
[0167] Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0168] In one embodiment, the unlocking terminal 104 is specifically used for:
[0169] In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy;
[0170] When the result of parsing the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the result of the password matching response is determined as not sending the cryptographic algorithm indication data to the digital key terminal 102 .
[0171] In one embodiment, the unlocking terminal 104 is further used to:
[0172] In a case where the matching instruction includes a matching application identifier and the matching response data does not include cryptographic algorithm information corresponding to the digital key terminal 102 , determining the matching result based on the matching result identifier included in the matching response data;
[0173] In the case where the matching result is a first matching result indicating a matching failure, the first type of cryptographic algorithm is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key terminal 102;
[0174] When the matching result is the second matching result indicating a successful match, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key terminal 102 .
[0175] Based on the same inventive concept, the embodiment of the present application also provides a digital key authentication device for implementing the digital key authentication method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more digital key authentication devices provided below can refer to the limitations of the digital key authentication method above, and will not be repeated here.
[0176] In one embodiment, Figure 6 As shown, a digital key authentication device is provided. The device is applied to a digital key end, and the device includes:
[0177] A response module 602, configured to determine a locally supported cryptographic algorithm in response to a matching instruction sent by the unlocking terminal;
[0178] A first determination module 604 is configured to generate matching response data including cryptographic algorithm information when the locally supported cryptographic algorithm meets a preset condition; the cryptographic algorithm information includes priority information corresponding to each of the cryptographic algorithms;
[0179] A sending module 606 is used to return the matching response data to the unlocking terminal, where the matching response data is used to instruct the unlocking terminal to determine a password matching response result according to the parsing result of the password algorithm information and the password selection strategy;
[0180] The second determination module 608 is used to determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
[0181] In one embodiment, the second determining module 608 is specifically configured to:
[0182] When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used;
[0183] When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, a first type of locally supported password algorithm is used as the password algorithm to be used.
[0184] In one embodiment, when the matching instruction includes a matching application identifier, the first determining module 604 is specifically configured to:
[0185] In a case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information;
[0186] The digital key authentication device also includes:
[0187] A third determination module is used to compare the matching application identifier with a preset application identifier to determine a comparison result when the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm;
[0188] A first matching module, configured to generate a second matching result indicating a successful match if the comparison result indicates that the identifiers are consistent, and generate matching response data including a matching result identifier corresponding to the second matching result based on the second matching result;
[0189] The second matching module is configured to generate a first matching result indicating a matching failure when the comparison result indicates that the identifiers are inconsistent, and generate matching response data including a matching result identifier corresponding to the first matching result based on the first matching result.
[0190] In one embodiment, when the matching instruction does not include a matching application identifier, the first determining module 604 is specifically configured to:
[0191] In response to the matching instruction, generating a second matching result indicating a successful match;
[0192] Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
[0193] In one embodiment, Figure 7 As shown, a digital key authentication device is provided. The device is applied to unlock the terminal, and the device includes:
[0194] A sending module 702, configured to send a matching instruction to a digital key terminal, wherein the matching instruction is used to instruct the digital key terminal to return matching response data based on the matching instruction;
[0195] The first determination module 704 is used to determine the cryptographic matching response result corresponding to the matching response data according to the parsing result of the cryptographic algorithm information and the cryptographic selection strategy when the matching response data contains the cryptographic algorithm information corresponding to the digital key end; the cryptographic matching response result is used for the digital key end to determine the cryptographic algorithm to be used, and perform authentication processing based on the cryptographic algorithm to be used.
[0196] In one embodiment, the first determining module 704 is specifically configured to:
[0197] In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy;
[0198] When the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the cryptographic matching response result is determined as not sending the cryptographic algorithm indication data to the digital key terminal.
[0199] In one embodiment, the digital key authentication device further includes:
[0200] A second determination module, configured to determine the matching result based on the matching result identifier included in the matching response data when the matching instruction includes a matching application identifier and the matching response data does not include the cryptographic algorithm information corresponding to the digital key end;
[0201] a first matching module, configured to, when the matching result is a first matching result indicating a matching failure, use a first type of cryptographic algorithm as a cryptographic algorithm to be used, and determine that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key terminal;
[0202] The second matching module is used to use the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier as the cryptographic algorithm to be used when the matching result is the second matching result indicating a successful match, and determine that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key end. Each module in the above-mentioned digital key authentication device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0203] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for authenticating a digital key is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0204] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0205] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0206] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0207] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0208] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0209] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0210] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0211] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A digital key authentication method, characterized in that: The method is applied to a digital key terminal, and the method includes: In response to a matching instruction sent by the unlocking terminal, determining a cryptographic algorithm supported locally; When the locally supported cryptographic algorithm meets the preset conditions, generating matching response data including cryptographic algorithm information; the cryptographic algorithm information includes priority information corresponding to each of the cryptographic algorithms; Returning the matching response data to the unlocking terminal, the matching response data is used to instruct the unlocking terminal to determine the password algorithm to be used by the unlocking terminal based on the matching response data sent by the digital key end and the preset password selection strategy, and determine the password matching response result based on the password algorithm to be used by the unlocking terminal; the password matching response result is whether the unlocking terminal sends the indication data of the password algorithm to the digital key end; When the password matching response result corresponding to the matching response data is receiving the password algorithm indication data sent by the unlocking terminal, obtaining the password algorithm identifier in the password algorithm indication data, and using the password algorithm corresponding to the password algorithm identifier as the password algorithm to be used; When the password matching response result corresponding to the matching response data is that the password algorithm indication data sent by the unlocking terminal is not received, the first type of password algorithm supported locally is used as the password algorithm to be used, and authentication processing is performed based on the password algorithm to be used.
2. The method according to claim 1, characterized in that In the case where the matching instruction includes a matching application identifier, and in the case where the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes: In a case where the locally supported cryptographic algorithms include a first type of cryptographic algorithm and a second type of cryptographic algorithm, generating matching response data including cryptographic algorithm information; The method further comprises: When the locally supported cryptographic algorithm is a first type of cryptographic algorithm or a second type of cryptographic algorithm, comparing the matching application identifier with a preset application identifier to determine a comparison result; If the comparison result indicates that the identifiers are consistent, generating a second matching result indicating successful matching, and based on the second matching result, generating matching response data including a matching result identifier corresponding to the second matching result; When the comparison result indicates that the identifiers are inconsistent, a first matching result indicating a matching failure is generated, and based on the first matching result, matching response data including a matching result identifier corresponding to the first matching result is generated.
3. The method according to claim 1, characterized in that In the case where the matching instruction does not include a matching application identifier, and in the case where the locally supported cryptographic algorithm meets a preset condition, generating matching response data including cryptographic algorithm information includes: In response to the matching instruction, generating a second matching result indicating a successful match; Based on the second matching result and the priority information corresponding to each of the cryptographic algorithms supported locally, matching response data including a matching result identifier corresponding to the second matching result is generated.
4. A digital key authentication method, characterized in that: The method is applied to unlocking a terminal, and the method comprises: Sending a matching instruction to the digital key terminal, wherein the matching instruction is used to instruct the digital key terminal to return matching response data based on the matching instruction; In the case that the matching response data includes the cryptographic algorithm information corresponding to the digital key end, the password matching response result corresponding to the matching response data is determined according to the parsing result of the cryptographic algorithm information and the password selection strategy; the password matching response result is whether the unlocking terminal sends indication data of the cryptographic algorithm to the digital key end, which is used for the digital key end to determine the cryptographic algorithm to be used, and perform authentication processing based on the cryptographic algorithm to be used.
5. The method according to claim 4, characterized in that Determining the password matching response result corresponding to the matching response data according to the parsing result of the password algorithm information and the password selection strategy includes: In a case where the parsing result of the cryptographic algorithm information includes priority information corresponding to each cryptographic algorithm, determining a password matching response result based on the priority information corresponding to each cryptographic algorithm in the cryptographic algorithm information and a password selection strategy; When the parsing result of the cryptographic algorithm information is that the cryptographic algorithm information cannot be parsed, the cryptographic matching response result is determined as not sending the cryptographic algorithm indication data to the digital key terminal.
6. The method according to claim 4, characterized in that The method further comprises: In a case where the matching instruction includes a matching application identifier and the matching response data does not include cryptographic algorithm information corresponding to the digital key terminal, determining the matching result based on a matching result identifier included in the matching response data; In the case where the matching result is a first matching result indicating a matching failure, using a first type of cryptographic algorithm as a cryptographic algorithm to be used, and determining that the cryptographic matching response result is not to send cryptographic algorithm indication data to the digital key terminal; When the matching result is a second matching result indicating a successful match, the cryptographic algorithm supported by the digital key application corresponding to the matching application identifier is used as the cryptographic algorithm to be used, and the cryptographic matching response result is determined to not send cryptographic algorithm indication data to the digital key end.
7. A digital key authentication system, characterized in that: The system includes a digital key terminal and an unlocking terminal, wherein: The unlocking terminal is used to send a matching instruction to the digital key terminal; The digital key terminal is used to determine the locally supported cryptographic algorithm in response to the matching instruction sent by the unlocking terminal; if the locally supported cryptographic algorithm meets the preset conditions, generate matching response data containing cryptographic algorithm information; the cryptographic algorithm information contains priority information corresponding to each locally supported cryptographic algorithm; the unlocking terminal is further used to determine the password matching response result corresponding to the matching response data according to the parsing result of the cryptographic algorithm information and the password selection strategy, and the password matching response result is whether the unlocking terminal sends the indication data of the cryptographic algorithm to the digital key terminal; The digital key end is also used to determine the cryptographic algorithm to be used according to the cryptographic matching response result corresponding to the matching response data, and perform authentication processing based on the cryptographic algorithm to be used.
8. A digital key authentication device, characterized in that: The device is applied to a digital key terminal, and the device includes: A response module, configured to determine a locally supported cryptographic algorithm in response to a matching instruction sent by the unlocking terminal; A first determination module is used to generate matching response data including cryptographic algorithm information when the locally supported cryptographic algorithm meets a preset condition; the cryptographic algorithm information includes priority information corresponding to each of the cryptographic algorithms; a sending module, used to return the matching response data to the unlocking terminal, the matching response data being used to instruct the unlocking terminal to determine the password algorithm to be used by the unlocking terminal based on the matching response data sent by the digital key end and a preset password selection strategy, and to determine a password matching response result based on the password algorithm to be used by the unlocking terminal; the password matching response result is whether the unlocking terminal sends the indication data of the password algorithm to the digital key end; A second determination module is used to obtain the cryptographic algorithm identifier in the cryptographic algorithm indication data, and use the cryptographic algorithm corresponding to the cryptographic algorithm identifier as the cryptographic algorithm to be used when the password matching response result corresponding to the matching response data is that the cryptographic algorithm indication data sent by the unlocking terminal is received; and to use the locally supported first type of cryptographic algorithm as the cryptographic algorithm to be used, and perform authentication processing based on the cryptographic algorithm to be used when the password matching response result corresponding to the matching response data is that the cryptographic algorithm indication data sent by the unlocking terminal is not received.
9. A digital key authentication device, characterized in that: The device is applied to unlock a terminal, and the device comprises: A sending module, used for sending a matching instruction to the digital key end, wherein the matching instruction is used for instructing the digital key end to return matching response data based on the matching instruction; The first determination module is used to determine the password matching response result corresponding to the matching response data according to the parsing result of the password algorithm information and the password selection strategy when the matching response data contains the password algorithm information corresponding to the digital key end; the password matching response result is the indication data of whether the unlocking terminal sends the password algorithm to the digital key end, which is used for the digital key end to determine the password algorithm to be used, and perform authentication processing based on the password algorithm to be used.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Safe vehicle control method and device, vehicle system and storage medium
CN114684070A
Vehicle authentication system
JP2018085625A