A method and system for filling a digital key
Through the method of negotiation between the main keys between the mobile terminal and the cloud and the vehicle terminal, the problem of digital key key filling in the existing technology relying on the marginalized system of the car company is solved, and the decentralized key filling process is realized, reducing costs and improving security.
Patent Information
- Application Number
- CN202211305338.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-10-24
AI Technical Summary
In the prior art, the key filling process of digital keys depends on the marginalized system of the car company itself, resulting in high R&D and maintenance costs and the possibility of weak or no network in the vehicle offline environment, resulting in failure of key filling.
The mobile terminal initiates a request to create a main key filling to the vehicle terminal digital key module. The vehicle terminal generates a private key and a public key, and uses the cloud public key to encrypt information. The cloud and the vehicle terminal conduct master key negotiation. Each calculates the main key for filling without transmitting the main key. Finally, the vehicle terminal receives the main key filling command and performs operations.
The decentralization of the secret key filling process is realized, which saves labor costs and simplifies the production process. At the same time, the security of digital keys is improved, and the initialization of digital keys can still be performed while the car is connected to the Internet.
Smart Images

Figure CN115696321B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive electronic communication technology, and in particular to a method and system for filling a digital key. Background Art
[0002] The number of cars owned by residents continues to increase. In today's highly developed digital world, mobile smart terminals are becoming more and more popular, and the frequency and scenarios of using mobile phones and smart wearable devices are increasing. The requirements for the intelligence of various items in life are getting higher and higher. Among them, the technology of vehicle digital keys provides more functions than traditional keys, can have a higher user experience, and basically eliminates the dependence on physical keys. Therefore, the acceptance and usage rate of digital keys are also increasing.
[0003] However, while digital keys are becoming more and more convenient, their security issues cannot be ignored. The industry has generally customized strict information security rules, which requires that each vehicle key is unique. In traditional technology, the instantiation of the vehicle-side key module is in the vehicle production line. Because each key must be unique, an independent secret key filling system is involved. The R&D and maintenance investment costs of this system, as well as the time cost in the vehicle offline environment are not low. In addition, in the process of secret key generation in the existing technology, it is often required that the car must be connected to the Internet. However, in the process of vehicle offline sales, in the early stage of user use of the vehicle, the Internet of Vehicles system TBOX of some vehicles often has weak network or no network, which leads to the failure of secret key filling. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the object of the present invention is to provide a key filling method and system for a digital key to solve the above-mentioned technical problems.
[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for filling a digital key with a secret key, comprising:
[0006] The mobile terminal initiates a request to create a master key filling to the vehicle-side digital key module;
[0007] The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key;
[0008] The vehicle end encrypts the vehicle end information and the vehicle end public key using the cloud public key to obtain a first message, wherein the vehicle end information at least includes a challenge code and a first random number;
[0009] The cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key;
[0010] Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle end. Without transmitting the master key, the cloud and the vehicle end each calculate a master key for filling;
[0011] The cloud sends a master key filling command to the vehicle end through the mobile terminal;
[0012] The vehicle end receives the master key filling command and executes the master key filling operation.
[0013] In an optional embodiment of the present invention, the mobile terminal initiates a request to create a master key filling request to the vehicle-side digital key module, specifically including:
[0014] The mobile terminal and the vehicle end complete the establishment of a safety channel;
[0015] The mobile terminal generates the challenge code;
[0016] The mobile terminal initiates a key filling application to the vehicle-side digital key module through a Bluetooth security channel, and sends the challenge code to the vehicle-side.
[0017] In an optional embodiment of the present invention, the vehicle-side responds to the master key filling request to generate a vehicle-side private key and a vehicle-side public key, specifically including:
[0018] The vehicle end responds to the master key creation filling request to generate the first random number;
[0019] The vehicle-side private key and the vehicle-side public key are obtained according to the first random number, the challenge code and the identification information of the vehicle-side digital key module.
[0020] In an optional embodiment of the present invention, through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle end. Without transmitting the master key, the cloud and the vehicle end each calculate the master key for filling, specifically including:
[0021] The cloud generates a second random number and a negotiation key, and calculates a first intermediate negotiation amount using the first random number, the second random number and the challenge code;
[0022] The cloud uses the negotiation key to encrypt the first intermediate negotiation amount and the identification information of the digital key module to form a first ciphertext;
[0023] The cloud uses the vehicle-side public key to encrypt the first ciphertext and the negotiated secret key to form a second message;
[0024] The cloud generates key filling authorization information and encrypts it with the public key of the mobile terminal, and sends the generated second message and the key filling authorization information to the mobile terminal;
[0025] The mobile terminal decrypts the key filling authorization information using the mobile terminal private key, and forwards the second message to the vehicle end;
[0026] The vehicle end obtains a master key parameter using the first random number and the challenge code, encrypts the master key parameter using the negotiated key to form a third message, and sends the third message to the mobile terminal;
[0027] The vehicle end decrypts the second message using the vehicle end private key to obtain the first ciphertext;
[0028] The vehicle end decrypts the first ciphertext using the negotiation key to obtain the first intermediate negotiation amount and identification information of the digital key module;
[0029] The vehicle end obtains a first master key using a third random number, the challenge code, the second message and the first intermediate negotiation amount, wherein the third random number is generated by the vehicle end;
[0030] The mobile terminal sends the third message to the cloud, carrying the key filling authorization information, and formally applies to the cloud for master key filling;
[0031] The cloud uses the negotiated key to decrypt the third message to obtain the master key parameter;
[0032] The cloud responds to the master key filling request of the mobile terminal and generates a second master key using the second random number, the challenge code, the second message and the master key parameter.
[0033] In an optional embodiment of the present invention, the cloud generates a second random number and a negotiation key, and calculates a first intermediate negotiation amount using the first random number, the second random number and the challenge code, specifically including:
[0034] The cloud generates a password using the first random number and the obfuscation offset, and performs a hash calculation on the challenge code and the password to obtain a random factor;
[0035] The cloud calculates the first intermediate negotiation amount X using the following formula:
[0036] X=x*G+h*P1,
[0037] Among them, x is the second random number, G is the base point on the elliptic curve of the SM2 national secret algorithm, h is the random factor, and P1 is any point on the ellipse pre-selected as confusion.
[0038] In an optional embodiment of the present invention, the vehicle end uses the third random number, the challenge code, the second message and the first intermediate negotiation amount to obtain the first master key, specifically including:
[0039] The vehicle end uses the third random number and the first intermediate negotiation to calculate and obtain a first intermediate value;
[0040] The vehicle end obtains the first master key using the challenge code, the second message and the first intermediate value.
[0041] In an optional embodiment of the present invention, the vehicle end uses the first random number and the challenge code to obtain the master key parameter, specifically including:
[0042] The vehicle end generates a password using the first random number and the obfuscation offset, and performs a hash calculation on the challenge code and the password to obtain a random factor;
[0043] The vehicle generates a third random number and calculates the second intermediate negotiation amount Y using the following formula:
[0044] Y=y*G+h*P2, where y is the third random number, G is the base point on the elliptic curve of the SM2 national secret algorithm, h is the random factor, and P2 is any point on the ellipse pre-selected for obfuscation;
[0045] The second intermediate negotiation amount is used as the master key parameter.
[0046] In an optional embodiment of the present invention, the cloud responds to the master key filling application of the mobile terminal and generates the second master key using the challenge code, the second message and the master key parameter, specifically including:
[0047] The cloud obtains a second intermediate value using the second intermediate negotiation amount, the second random number and the random factor;
[0048] The cloud generates the second master key using the challenge code, the second message and the second intermediate value.
[0049] In an optional embodiment of the present invention, the digital key key filling method further includes: the cloud records the generated second master key.
[0050] To achieve the above-mentioned purpose and other related purposes, the present invention provides a digital key key filling system, the digital key key filling system comprising:
[0051] Mobile terminals, vehicle terminals and cloud terminals;
[0052] The mobile terminal, the vehicle terminal and the cloud terminal perform key filling of the digital key in the following manner:
[0053] The mobile terminal initiates a request to create a master key filling to the vehicle-side digital key module;
[0054] The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key;
[0055] The vehicle end encrypts the vehicle end information and the vehicle end public key using the cloud public key to obtain a first message, wherein the vehicle end information at least includes a challenge code and a first random number;
[0056] The cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key;
[0057] Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle end. Without transmitting the master key, the cloud and the vehicle end each calculate a master key for filling;
[0058] The cloud sends a master key filling command to the vehicle end through the mobile terminal;
[0059] The vehicle end receives the master key filling command and executes the master key filling operation.
[0060] Beneficial effects of the present invention:
[0061] The digital key-based key filling method provided by the embodiment of the present disclosure initiates a master key filling request to the vehicle-side digital key module through a mobile terminal; the vehicle-side responds to the master key filling request to generate a vehicle-side private key and a vehicle-side public key; the vehicle-side encrypts the vehicle-side information and the vehicle-side public key using the cloud public key to obtain a first message, and the vehicle-side information at least includes a challenge code and a first random number; the cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key; through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate the master key with the vehicle-side, and without transmitting the master key, the cloud and the vehicle-side each calculate the master key for filling; the cloud sends a master key filling command to the vehicle-side through the mobile terminal; the vehicle-side receives the master key filling command and executes the master key filling operation. The key filling process is marginalized from the car companies themselves to the vehicle users, and the car factories are decentralized. This not only saves labor costs and simplifies the production process, but also improves the security of the vehicle digital key during use. In addition, the digital key-based key filling method provided in this embodiment can also realize the initialization key operation of the digital key under the premise that the car is connected to the Internet.
[0062] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0064] Figure 1 A block diagram of a vehicle digital key system is shown as an exemplary embodiment of the present application.
[0065] Figure 2 A schematic flow chart of a digital key secret method shown as an exemplary embodiment of the present application.
[0066] Figure 3 This is the process of step S210 in an exemplary embodiment of the present application in an exemplary embodiment.
[0067] Figure 4 FIG. 1 is a flowchart of step S220 in an exemplary embodiment of the present application.
[0068] Figure 5A block diagram of a key filling system for a digital key shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0069] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0070] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner, and thus the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0071] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0072] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0073] Unless otherwise stated, the term "plurality" means two or more.
[0074] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0075] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0076] Figure 1It is a schematic diagram of a vehicle digital key system shown in an exemplary embodiment of the present application, and the digital key system includes a platform end 101, a vehicle end 102, and a mobile phone end 103. The functions of the platform end 101 mainly include generating and managing digital keys, issuing digital keys, business logic processing, establishing a cloud security transmission channel, remote upgrading of digital key components, digital key logs and monitoring, etc.; the functions of the vehicle end 102 mainly include Bluetooth communication component control, digital key positioning, authentication / encryption and secure storage, cloud communication control, vehicle control execution, etc.; the functions of the mobile phone end 103 mainly include processing business logic, controlling communication components, controlling security components, controlling cloud communications, etc. Using the vehicle digital system 100, it can well meet the needs of modern people for intelligence and intelligence and bring users a higher user experience, basically releasing the control of physical keys.
[0077] While digital keys are increasingly pursuing convenience, their security issues cannot be ignored. In view of this, strict information security rules have been generally formulated in the industry, requiring each vehicle key to be unique. However, in the current automotive industry, the instantiation of vehicle segment key modules is completed in the vehicle production line. In order to make each key unique, an independent secret key filling system is required. The R&D and maintenance investment costs of this system and the time cost in the vehicle offline environment are very high.
[0078] Therefore, if the key filling process can be marginalized from the car companies themselves to the vehicle users, it will not only streamline the pre-factory key filling system process of the digital key module in the automobile production process, but also save manpower input costs, simplify the production process, and speed up the time to put the car online.
[0079] Based on the above situation, the present disclosure discloses a key filling solution for a digital key, wherein: Figure 2 A flow chart of a key filling method based on a digital key according to an exemplary embodiment of the present application is shown.
[0080] See also Figure 2 As shown, the key filling method of the digital key of the embodiment of the present disclosure includes:
[0081] Step S210, the mobile terminal initiates a request to create a master key filling to the vehicle-side digital key module;
[0082] Step S220, the vehicle side responds to the master key creation filling request to generate a vehicle side private key and a vehicle side public key;
[0083] Step S230, the vehicle end encrypts the vehicle end information and the vehicle end public key using the cloud public key to obtain a first message, wherein the vehicle end information at least includes a challenge code and a first random number;
[0084] Step S240, the cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key;
[0085] Step S250: Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle. Without transmitting the master key, the cloud and the vehicle each calculate a master key for filling.
[0086] Step S260, the cloud sends a master key filling command to the vehicle end through the mobile terminal;
[0087] Step S270: the vehicle receives the master key filling command and executes the master key filling operation.
[0088] It should be noted that the digital key-based key filling method provided in this embodiment requires the mobile terminal and the car company management service TSP to access the Internet to complete the basic TLS two-way authentication connection, and the mobile terminal and the digital key module on the vehicle side to establish a Bluetooth security channel.
[0089] The key filling method of the digital key provided in the embodiment of the present disclosure involves the interaction between the cloud, the vehicle and the mobile terminal, wherein the cloud acts as the business control end and key negotiator for the derivation of the digital key, the digital key module of the vehicle acts as the key negotiator, and the mobile terminal acts as the initiator of the process.
[0090] The key filling method for the digital key provided in the embodiment of the disclosure realizes the marginalization of the key filling process from the car company itself to the vehicle user, and achieves the decentralization of the car factory, which not only saves labor costs and simplifies the production process, but also improves the security of the vehicle digital key during use. In addition, the key filling method based on the digital key provided in this embodiment can also realize the initialization key operation of the digital key under the premise that the car is connected to the Internet.
[0091] The following is combined with Figure 2 and Figure 3 and Figure 4 Let's describe the implementation process of each step in detail:
[0092] First, execute step S210, the mobile terminal initiates a master key creation and filling request to the vehicle-side digital key module.
[0093] It should be noted that this step is based on the fact that after the car owner has completed the login to the car manufacturer's APP on the mobile terminal, he finds that the digital key is not installed on the vehicle bound to the APP.
[0094] When the mobile terminal initiates a request to create a master key filling request to the vehicle-side digital key module, it specifically includes:
[0095] First, execute step S310, the mobile terminal connects to the Bluetooth module on the vehicle side and establishes a secure channel. After the mobile terminal and the Bluetooth module establish a secure channel, execute step S320 immediately, the mobile terminal generates a challenge code A, and finally execute step S330, the mobile terminal initiates a master key creation request to the digital key module on the vehicle side through the Bluetooth secure channel, and sends the generated challenge code A to the vehicle side.
[0096] After the mobile terminal initiates a master key creation and filling request to the vehicle-side digital key module, step S220 is then executed, and the vehicle-side responds to the master key creation and filling request to generate a vehicle-side private key and a vehicle-side public key.
[0097] It should be noted that for the sake of data security, when the vehicle-side digital key receives a request from the mobile terminal to create a master key filling request to the vehicle-side digital key module through the Bluetooth security channel, it will determine whether the master key filling is allowed. Only when filling is allowed will subsequent operations be performed, otherwise the master key filling process will end.
[0098] When the vehicle-side digital key module allows the master key to be loaded, the vehicle-side responds to the master key loading request to generate a vehicle-side private key and a vehicle-side public key, specifically including:
[0099] First, execute step S410, and the vehicle-side responds to the mobile terminal's request to create a master key filling to generate a first random number b; then execute step S420, and the vehicle-side obtains the vehicle-side private key SK1 and the vehicle-side public key PK1 based on the first random number b, the challenge code A and the identification information TUID of the vehicle-side digital key module.
[0100] It should be noted that in this embodiment, when the first random number b, the challenge code A and the identification information TUID of the vehicle-side digital key module are used as the parameter vehicle-side private key SK1, a high-security hash algorithm such as scrypt, argon2, and vdf can be used, and the vehicle-side public key PK1 is obtained modulo the vehicle-side private key SK1.
[0101] After the vehicle responds to the request to create the master key filling to generate the vehicle private key and the vehicle public key, step S230 is then executed, and the vehicle uses the cloud public key to encrypt the vehicle information and the vehicle public key to obtain a first message, and the vehicle information at least includes a challenge code and a first random number.
[0102] It should be noted that the vehicle-side information can also include the hash value of the digital key module TUID and a timestamp.
[0103] Next, step S240 is executed, and the cloud receives and parses the first message to obtain the challenge code A, the first random number b and the vehicle-side public key PK1.
[0104] It should be noted that when the first message contains the hash value of the TUID of the digital key module, the cloud will combine the registered person-vehicle relationship to obtain the TUID of the vehicle-side digital key module, and then perform a hash operation on the TUID stored in the vehicle-side digital key module, and compare it with the hash value in the first message sent by the parsed vehicle to determine whether the user's operation is legal.
[0105] Next, step S250 is executed, where the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle through the mobile terminal. Without transmitting the master key, the cloud and the vehicle each calculate a master key for filling.
[0106] When the cloud uses the challenge code and the first random number to negotiate the master key with the vehicle, without transmitting the master key, the cloud and the vehicle calculate and fill the master key respectively, specifically including:
[0107] First, the cloud generates a second random number x and a negotiation key k, and uses the first random number b, the second random number x and the challenge code A to calculate the first intermediate negotiation amount X;
[0108] In this embodiment, the process of solving the first intermediate negotiation amount X is as follows:
[0109] First, the cloud uses the first random number b plus the obfuscation bias M to generate the password c; then the challenge code A and the password c are hashed to obtain the random factor h, and then the cloud generates a second random number x and a negotiated key k, where k is used as the session key with the vehicle; finally, the cloud uses x*G+h*P1 to calculate the first intermediate negotiation quantity X, that is, X=x*G+h*P1, where G is the base point on the elliptic curve of the SM2 national secret algorithm, and P1 is any point on the ellipse pre-selected as obfuscation.
[0110] It should be noted that, in this embodiment, the obfuscated offset can be generated using an OTP-type offline token technology.
[0111] Next, the cloud uses the negotiation key k to encrypt the first intermediate negotiation amount X and the identification information TUID of the digital key module to form a first ciphertext. At the same time, the cloud uses the vehicle-side public key PK0 to encrypt the first ciphertext and the negotiation key k to form a second message. In addition, the cloud will also generate a key filling authorization information Token and encrypt it using the mobile terminal public key Pk2, and send the generated second message and the key filling authorization information Token to the mobile terminal.
[0112] Next, the mobile terminal uses the mobile terminal private key to decrypt the key-filled authorization information Token, and forwards the second message to the vehicle end.
[0113] Next, the vehicle end uses the first random number b and the challenge code A to obtain the master key parameters, uses the negotiated key to encrypt the master key parameters to form a third message, and sends the third message to the mobile terminal.
[0114] It should be noted that when executing this step, the vehicle side also needs to use the cloud public key PK0 to verify the signature of the received third message to confirm whether the transmitted data has been modified. If the data has been modified, the master key filling process ends.
[0115] In this embodiment, the specific process of the vehicle end using the first random number b and the challenge code A to obtain the master key parameters is as follows:
[0116] First, the vehicle side uses the obfuscation offset M and the first random number b to generate a password c, and then the vehicle side performs hash calculation on the password and challenge code A to obtain a random factor h; then the vehicle side generates a third random number y, and uses Y=y*G+h*P2 to calculate the second intermediate negotiation amount Y, where y is the third random number, G is the base point on the elliptic curve of the SM2 national secret algorithm, h is the random factor, and P2 is any point on the ellipse pre-selected as an obfuscation; finally, the obtained intermediate negotiation amount Y is used as a master key parameter.
[0117] Next, the vehicle end uses the vehicle end private key SK1 to decrypt the second message to obtain the first ciphertext, and uses the negotiation key k to decrypt the first ciphertext to obtain the first intermediate negotiation amount X and the identification information TUID of the digital key module.
[0118] Next, the vehicle end obtains a first master key CMDK1 using a third random number, the challenge code, the second message and the first intermediate negotiation amount, wherein the third random number is generated by the vehicle end.
[0119] It should be noted that the specific calculation process of the first master key CMDK1 in this step is as follows:
[0120] First, the first intermediate value S1 is calculated using the formula y*(Xh*P1), where y is the third random number, X is the first intermediate value, h is the random factor, and P1 is any point pre-selected on the ellipse for obfuscation; then the challenge code A, the first intermediate value S1, and the hash value of the second message are hashed, and the derived result is used as the first master key CMDK1.
[0121] Next, the mobile terminal sends the third message to the cloud, carrying the key filling authorization information Token, and formally applies to the cloud for master key filling;
[0122] Next, the cloud uses the negotiated key k to decrypt the third message to obtain the master key parameter;
[0123] Finally, the cloud responds to the master key filling application of the mobile terminal and generates a second master key CMDK2 using the second random number, the challenge code, the second message and the master key parameter.
[0124] It should be noted that in this step, the specific calculation process of the second master key CMDK2 is as follows:
[0125] First, the cloud uses the second intermediate negotiation amount Y, the second random number and the random factor h to obtain the second intermediate value S2, where the calculation formula of the second intermediate value S2 is S2 = x*(Yh*P2); after the second intermediate value S2 is obtained, the cloud performs a hash operation on the challenge code A, the second intermediate value S2, and the hash value of the second message, and uses the derived result as the second master key CMDK2.
[0126] Here, it should be noted that for the intermediate value S1, as described above, S1=y*(Xh*P1), if X=x*G+h*P1 is substituted into S1=y*(Xh*P1), we can get S1=x*(x*G+h*P1-h*P1). Because P1 is a point on the elliptic curve, it satisfies the Abelian group and can be used for associative operations. S1 can be simplified to get the final result, S1=x*y*G. Similarly, a similar operation is performed on S2 to obtain S2=x*y*G. Therefore, the first intermediate value S1 and the second intermediate value S2 are equal, thereby ensuring that the generated first master key CMDK1 and the second master key CMDK2 are also equal.
[0127] It should also be noted that the first master key CMDK1 and the second master key CMDK2 are essentially the same value. This article only distinguishes them in name for the convenience of description.
[0128] It should also be noted that the cloud will record the generated second master key for the convenience of subsequent users.
[0129] When both the cloud and the vehicle have generated the master key, step S260 is executed, wherein the cloud sends a master key filling command to the vehicle via the mobile terminal;
[0130] When the vehicle side receives the master key filling command sent from the cloud, step S270 is executed, and the vehicle side receives the master key filling command and executes the master key filling operation.
[0131] Once again, it should be noted that when the master key filling process is completed, the mobile terminal prompts the user to complete the initialization key filling and guides the user to proceed with the subsequent key download process.
[0132] Finally, it should be noted that when the master key CMDK is filled, there will be records on both the cloud and the vehicle. When downloading the key later, you only need to provide the credentials and the identification information TUID of the vehicle and mobile terminal, and you can derive the key DK from the master key CMDK in the cloud.
[0133] Figure 5 1 is a block diagram of a digital key key filling system shown in an exemplary embodiment of the present application. The digital key key filling system includes a mobile terminal 501, a vehicle terminal 502 and a cloud 503. The mobile terminal 501, the vehicle terminal 502 and the cloud 503 perform digital key key filling in the following manner:
[0134] The mobile terminal 501 initiates a master key creation request to the digital key module of the vehicle-side 502; the vehicle-side 502 responds to the master key creation request to generate the vehicle-side 502 private key and the vehicle-side public key; the vehicle-side 502 uses the cloud public key to encrypt the vehicle-side information and the vehicle-side public key to obtain a first message, and the vehicle-side information at least includes a challenge code and a first random number. The cloud 503 receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key; through the mobile terminal, the cloud 503 uses the challenge code and the first random number to negotiate the master key with the vehicle-side 502, and without transmitting the master key, the cloud and the vehicle-side each calculate the master key for filling. The cloud 503 sends a master key filling command to the vehicle-side 502 through the mobile terminal; the vehicle-side 502 receives the master key filling command and executes the master key filling operation.
[0135] It should be noted that the key filling system for the digital key provided in the above embodiment and the key filling method for the digital key provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the key filling system for the digital key provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0136] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
Claims
1. A secret key filling method based on a digital key, characterized in that: include: The mobile terminal initiates a request to create a master key filling to the vehicle-side digital key module; The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key; The vehicle end encrypts the vehicle end information and the vehicle end public key using the cloud public key to obtain a first message, wherein the vehicle end information at least includes a challenge code and a first random number; The cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key; Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle end. Without transmitting the master key, the cloud and the vehicle end each calculate a master key for filling; The cloud sends a master key filling command to the vehicle end through the mobile terminal; The vehicle end receives the master key filling command and executes the master key filling operation; The mobile terminal initiates a request to create a master key filling request to the vehicle-side digital key module, specifically including: The mobile terminal and the vehicle end complete the establishment of a safety channel; The mobile terminal generates the challenge code; and The mobile terminal initiates a key filling application to the vehicle-side digital key module through a Bluetooth security channel, and sends the challenge code to the vehicle-side; The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key, specifically including: The vehicle end responds to the master key creation filling request to generate the first random number; and The vehicle-side private key and the vehicle-side public key are obtained according to the first random number, the challenge code and the identification information of the vehicle-side digital key module.
2. The method for filling a digital key according to claim 1, characterized in that: Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate the master key with the vehicle. Without transmitting the master key, the cloud and the vehicle each calculate the master key for filling, specifically including: The cloud generates a second random number and a negotiation key, and uses the first random number, the second random number and the challenge code to calculate a first intermediate negotiation amount through an elliptic curve method; The cloud uses the negotiation key to encrypt the first intermediate negotiation amount and the identification information of the digital key module to form a first ciphertext; The cloud uses the vehicle-side public key to encrypt the first ciphertext and the negotiated secret key to form a second message; The cloud generates key filling authorization information and encrypts it with the public key of the mobile terminal, and sends the generated second message and the encrypted key filling authorization information to the mobile terminal; The mobile terminal decrypts the encrypted key filling authorization information using the mobile terminal private key, and forwards the second message to the vehicle end; The vehicle end uses the first random number and the challenge code and obtains a master key parameter including a second intermediate negotiation amount through an elliptic curve method, encrypts the master key parameter using the negotiation key to form a third message, and sends the third message to the mobile terminal; The vehicle end decrypts the second message using the vehicle end private key to obtain the first ciphertext; The vehicle end decrypts the first ciphertext using the negotiation key to obtain the first intermediate negotiation amount and identification information of the digital key module; The vehicle end obtains a first master key using a third random number, the challenge code, the second message and the first intermediate negotiation amount, wherein the third random number is generated by the vehicle end; The mobile terminal sends the third message to the cloud, carrying the key filling authorization information, and formally applies to the cloud for master key filling; The cloud uses the negotiated key to decrypt the third message to obtain the master key parameter; The cloud responds to the master key filling request of the mobile terminal and generates a second master key using the second random number, the challenge code, the second message and the master key parameter, wherein the first master key and the second master key are the same.
3. The method for filling a digital key according to claim 2, characterized in that: The cloud generates a second random number and a negotiation key, and uses the first random number, the second random number and the challenge code to calculate a first intermediate negotiation amount through an elliptic curve method, specifically including: The cloud generates a password using the first random number and the obfuscation offset, and performs a hash calculation on the challenge code and the password to obtain a random factor; The cloud calculates the first intermediate negotiation amount X using the following formula: X=x*G+h*P1, Among them, x is the second random number, G is the base point on the elliptic curve of the SM2 national secret algorithm, h is the random factor, and P1 is any point on the ellipse pre-selected as confusion.
4. The method for filling a digital key according to claim 2, characterized in that: The vehicle end obtains the first master key by using the third random number, the challenge code, the second message and the first intermediate negotiation amount, specifically including: The vehicle end uses the third random number and the first intermediate negotiation to calculate and obtain a first intermediate value; The vehicle end obtains the first master key using the challenge code, the second message and the first intermediate value.
5. The method for filling a digital key with a secret key according to claim 2, characterized in that: The vehicle end uses the first random number and the challenge code and obtains the master key parameters including the second intermediate negotiation amount through the elliptic curve method, specifically including: The vehicle end generates a password using the first random number and the obfuscation offset, and performs a hash calculation on the challenge code and the password to obtain a random factor; The vehicle generates a third random number and calculates the second intermediate negotiation amount Y using the following formula: Y=y*G+h*P2, wherein y is the third random number, G is the base point on the elliptic curve of the SM2 national secret algorithm, h is the random factor, and P2 is any point on the ellipse pre-selected as confusion.
6. The method for filling a digital key according to claim 5, characterized in that: The cloud responds to the master key filling application of the mobile terminal and generates the second master key using the challenge code, the second message and the master key parameter, specifically including: The cloud obtains a second intermediate value using the second intermediate negotiation amount, the second random number and the random factor; The cloud generates the second master key using the challenge code, the second message and the second intermediate value.
7. The method for filling a digital key with a secret key according to claim 2, characterized in that: The digital key-based key filling method further includes: the cloud records the generated second master key.
8. A digital key filling system, characterized in that: The key filling system of the digital key includes: Mobile terminals, vehicle terminals and cloud terminals; The mobile terminal, the vehicle terminal and the cloud terminal perform key filling of the digital key in the following manner: The mobile terminal initiates a request to create a master key filling to the vehicle-side digital key module; The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key; The vehicle end encrypts the vehicle end information and the vehicle end public key using the cloud public key to obtain a first message, wherein the vehicle end information at least includes a challenge code and a first random number; The cloud receives and parses the first message to obtain the challenge code, the first random number and the vehicle-side public key; Through the mobile terminal, the cloud uses the challenge code and the first random number to negotiate a master key with the vehicle end. Without transmitting the master key, the cloud and the vehicle end each calculate a master key for filling; The cloud sends a master key filling command to the vehicle end through the mobile terminal; The vehicle end receives the master key filling command and executes the master key filling operation; The mobile terminal initiates a request to create a master key filling request to the vehicle-side digital key module, specifically including: The mobile terminal and the vehicle end complete the establishment of a safety channel; The mobile terminal generates the challenge code; and The mobile terminal initiates a key filling application to the vehicle-side digital key module through a Bluetooth security channel, and sends the challenge code to the vehicle-side; The vehicle-side responds to the master key creation filling request to generate a vehicle-side private key and a vehicle-side public key, specifically including: The vehicle end responds to the master key creation filling request to generate the first random number; and The vehicle-side private key and the vehicle-side public key are obtained according to the first random number, the challenge code and the identification information of the vehicle-side digital key module.
Citation Information
Patent Citations
Automobile Bluetooth key safety management system and method
CN111186414A
Master key filling method of ATM terminal, server, terminal and system
CN111768193A