Key generation method, key management system and storage medium

By obtaining key category information and security levels, calculating the dispersion factor and generating the target key, the problem of high risk of digital key leakage is solved, and the security and flexibility of key management is achieved, and the key shape changes and types are adapted to the increase in keys. Complex scenes.

CN119276478APending Publication Date: 2025-01-07ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411317050.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the prior art, the risk of key leakage of digital keys is high, and when the key form changes or types increase, the complexity of key management increases, making it difficult to effectively ensure security.

Method used

By obtaining the key category information of the vehicle digital key, determining the key security level, calculating the dispersion factor, and generating the target key based on the dispersion factor and the preset first key, the encryption machine is used to synthesize the encryption components to realize the grading of the key Management and derive to ensure that the root key is not lost and the key is retrieved.

Benefits of technology

It effectively reduces the risk of key leakage, improves the security of key management, adapts to complex scenarios of changes in key shape and increasing types, ensures the independence of various key services, and achieves unlimited horizontal and vertical expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276478A_ABST
    Figure CN119276478A_ABST
Patent Text Reader

Abstract

The invention relates to a secret key generation method, a secret key management system and a storage medium, and the secret key generation method comprises the steps: obtaining the key type information of a vehicle digital key; determining a preset key security level; calculating a dispersion factor under the current level based on the key security level and the key category information; and generating a target key corresponding to the vehicle digital key according to the dispersion factor and a preset first root key. According to the method and the device, the problem of high key leakage risk in a relatively high complexity scene caused by continuously changing key forms or continuously increasing key types is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of key processing, and in particular to a key generation method, a key management system and a storage medium. Background Art

[0002] With the continuous development of technology, digital keys are becoming more and more widely used in the automotive field due to their comfort, intelligence and convenience. The use of digital keys usually involves many processes such as short-range data transmission and cloud interaction, which makes it particularly important to ensure the encryption security of digital keys.

[0003] In related technologies, a simple encryption method is usually used to sign and encrypt the data involved in the digital key between the vehicle and the user, such as by using third-party certificate authentication, data encryption, and channel encryption to ensure that the data is valid and not tampered with. However, due to the large number of digital key types, the related keys involved are numerous, resulting in a higher risk of key leakage in scenarios with higher complexity brought about by the continuous changes in key forms or the increasing number of types.

[0004] Currently, no effective solution has been proposed for the high risk of key leakage in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a key generation method, a key management system and a storage medium to at least solve the problem of high risk of key leakage in the related art.

[0006] In a first aspect, an embodiment of the present application provides a key generation method, the method comprising:

[0007] Get the key category information of the vehicle digital key;

[0008] Determining a preset key security level; calculating a dispersion factor at a current level based on the key security level and the key category information;

[0009] A target key is generated according to the dispersion factor and a preset first root key.

[0010] In some embodiments, generating the first root key includes:

[0011] obtaining at least two generated encrypted components;

[0012] The encryption components are synthesized to generate the first root key.

[0013] In some embodiments, generating a target key according to the dispersion factor and a preset first root key includes:

[0014] Encrypting the first root key to obtain a current root key check value;

[0015] When it is detected that the current root key check value matches the acquired historical check value, a verification result indicating that the first root key has passed verification is obtained, and in response to the verification result, the target key is generated according to the dispersion factor and the first root key.

[0016] In some embodiments, the calculating the dispersion factor at the current level based on the key security level and the key category information includes:

[0017] Determining a dispersion factor type based on the key category information;

[0018] Acquire key management information, and calculate the dispersion factor according to the key management information and the dispersion factor type.

[0019] In some embodiments, generating a target key according to the dispersion factor and a preset first root key includes:

[0020] Performing a dispersion calculation on the first-level dispersion factor according to the first root key to generate a second root key, and encrypting the second root key to generate a first-level key;

[0021] A second-level dispersion factor is dispersed and calculated according to the second root key to generate a second-level key; wherein the dispersion factor includes the first-level dispersion factor and the second-level dispersion factor, and the target key includes the first-level key and the second-level key.

[0022] In some embodiments, after generating the target key, the method further includes:

[0023] Get certificate chain data and security chip data;

[0024] Encrypting the target key to obtain target encrypted data, and packaging the target encrypted data, the certificate chain data, and the security chip data into a production line canned data package;

[0025] Sending the production line canned data package to a file server for storage;

[0026] The file server is used to send the production line canned data package to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform.

[0027] In some embodiments, encrypting the target key to obtain target encrypted data includes:

[0028] Encrypting the target key using a preset symmetric key to obtain first encrypted data;

[0029] Calculating data summary information of the first encrypted data, encrypting the data summary information according to public key data of the security chip supplier platform, and obtaining a digital signature;

[0030] The symmetric key is encrypted using the public key data to obtain second encrypted data; wherein the target encrypted data includes the first encrypted data, the digital signature and the second encrypted data.

[0031] In a second aspect, an embodiment of the present application provides a key management system, the system comprising: a production line canning device;

[0032] The production line canning device is used to obtain key category information of the vehicle digital key;

[0033] The production line canning device is also used to determine a preset key security level; based on the key security level and the key category information, calculate a dispersion factor at the current level;

[0034] The production line canning device is also used to generate a target key according to the dispersion factor and a preset first root key.

[0035] In some of these embodiments, the system further comprises an encryption machine;

[0036] The encryption machine is used to synthesize at least two encryption components generated by different participants to generate the first root key; and / or,

[0037] The system also includes a file server and a security chip vendor platform;

[0038] The production line canning device is also used to obtain certificate chain data and security chip data;

[0039] The production line canning device is also used to encrypt the target key to obtain target encrypted data, and package the target encrypted data, the certificate chain data and the security chip data into a production line canned data packet;

[0040] The production line canning device is also used to send the production line canning data packet to a file server for storage;

[0041] The file server is used to send the production line canned data package to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform.

[0042] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the key generation method as described in the first aspect above is implemented.

[0043] Compared with the related art, the key generation method, key management system and storage medium provided in the embodiment of the present application obtain the key category information of the vehicle digital key; determine the preset key security level; calculate the dispersion factor at the current level based on the key security level and key category information; generate the target key corresponding to the vehicle digital key according to the dispersion factor and the preset first root key. Based on this, by classifying and managing various keys, designing corresponding exclusive keys for different types of key services, each key is independent of each other and does not affect each other, so it can be ensured that the security of other keys will not be affected in the event of Bluetooth key key leakage, and it also has unlimited horizontal and vertical scalability and can flexibly respond to changes. In addition, by implementing strict security classification of keys, it is conducive to implementing different security management requirements for keys of different security levels, and a flexible derivation method is used to generate keys at each level. As long as the root key is not lost, the key can be retrieved, thereby solving the problem of high risk of key leakage in the high complexity scenario brought about by the continuous change of key form or the continuous increase of types, and effectively improving the security of key management.

[0044] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0046] Figure 1 is a hardware structure block diagram of a terminal of a key generation method according to an embodiment of the present application;

[0047] Figure 2 is a flowchart of a terminal of a key generation method according to an embodiment of the present application;

[0048] Figure 3 is a flowchart of a method for generating a first root key according to an embodiment of the present application;

[0049] Figure 4 is a schematic diagram of a key security system according to an embodiment of the present application;

[0050] Figure 5 is a schematic diagram of a production line canned data package according to an embodiment of the present application;

[0051] Figure 6 It is a structural diagram of a key management system according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated 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 intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.

[0053] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0054] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0055] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 1 is a hardware structure block diagram of a terminal of a key generation method according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0056] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the key generation method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0057] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0058] This embodiment provides a key generation method. Figure 2 is a flow chart of a key generation method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0059] Step S210, obtaining key category information of the vehicle digital key.

[0060] Among them, vehicle digital keys can be divided into multiple types according to the key type and implementation method, such as remote control (FOB) keys, Bluetooth keys, Near Field Communication (NFC) card keys, etc. Correspondingly, the keys related to digital keys can be divided into the following types: vehicle-side business: Bluetooth keys, NFC keys related to the vehicle-side; FOB business: FOB keys, that is, keys related to remote control keys; GlobalPlatform (GP) platform business: keys related to GP secure channel protocol; GP is a cross-industry international standards organization, whose main responsibility is to develop, formulate and publish technical standards for security chips.

[0061] Exclusive keys are designed for different key businesses. Each key is independent and does not affect each other. This can ensure that the security of other keys will not be affected when the Bluetooth key is leaked. It also has unlimited horizontal and vertical scalability.

[0062] Step S220, determining a preset key security level; and calculating a dispersion factor at each key security level based on the key security level and key category information.

[0063] The above key security level can be determined according to preset security requirement information. In other words, keys can be graded according to different security requirements, and different security management requirements can be applied to keys of different security levels. Exemplarily, the key security level can include at least the following levels:

[0064] Level 1: This level of key has a lower security level. Its value can be generated by a pseudo-random number or has a certain transformation pattern. It is mainly used for temporary security needs and can be replaced and updated in the actual production process, such as the transmission key (which can be updated during the personalization process). This type of key can be kept by a dedicated person.

[0065] Level 2: This level of key has a higher security level. Its value is required to be truly random. It is mainly used for scenario-based business types. Once leaked, it will only affect the current business system and will not cause a devastating blow to the entire system. It is recommended that this level of key be managed by a dedicated person with multiple copies and multiple people.

[0066] Level 3: This level of key has an extremely high security level. Its value must be a true random number generated by hardware. In addition to requiring multiple components to be managed by a dedicated person, it is recommended to set a validity period for the components and regenerate the components when they expire. At the same time, it is recommended that the key value be kept by the person in charge. The key custodian and other dedicated personnel are only responsible for keeping the key components. At the same time, the management authority of the encryption device must also be authorized by multiple people.

[0067] In this embodiment, in order to further ensure the security of key generation, the dispersion factors of each level are generated by key dispersion; wherein the business code related to the characteristics of this level is called the dispersion factor. Specifically, according to the key level and the corresponding key category information, the corresponding dispersion factor type is determined, and then the dispersion factor can be generated.

[0068] Step S230: Generate a target key corresponding to the vehicle digital key based on the dispersion factor and the preset first root key.

[0069] Specifically, according to the first root key and the dispersion factors at different levels, encryption calculation is performed to obtain keys at each level, thereby generating the above-mentioned target key.

[0070] In the above key generation method, various keys are classified and managed, and corresponding exclusive keys are designed for different types of key services. Each key is independent of each other and does not affect each other. Therefore, it can be ensured that the security of other keys will not be affected in the event of a Bluetooth key key leak. At the same time, it also has unlimited horizontal and vertical scalability and can flexibly respond to changes. In addition, by implementing strict security classification of keys, it is conducive to implementing different security management requirements for keys of different security levels, and a flexible derivation method is used to generate keys at each level. As long as the root key is not lost, the key can be retrieved, thereby solving the problem of high risk of key leakage in the high complexity scenario brought about by the continuous change of key form or the continuous increase of types, and effectively improving the security of key management.

[0071] In some of the embodiments, generating the first root key may include the following process: obtaining at least two encryption components generated by different participants; synthesizing the encryption components using an encryption machine to generate the first root key. The encryption machine is a dedicated hardware device that performs encryption operations by using a physical chip, module, or dedicated processor, rather than relying entirely on software implementation. This enables them to provide higher operating speeds and stronger security. The encryption machine can support a variety of encryption algorithms and protocols, including symmetric encryption (such as AES), asymmetric encryption (such as RSA), hash functions (such as SHA), etc., and can be applied to various fields that require high security.

[0072] In this step, each encryption component can be generated by different participants after identity authentication. The following is a brief description of one component generation process: the encryption machine distributes necessary parameters to each participant, such as polynomial coefficients, public keys, etc.; each participant generates its own encryption component based on the assigned parameters and the selected encryption algorithm. Next, the encryption machine collects the various encryption components, uses the selected synthesis algorithm, takes all the collected encryption components as input and performs operations to generate the first root key.

[0073] Through the above embodiments, by synthesizing multiple components into a root key, each component can be stored separately, thereby ensuring that when the root key is lost or leaked, stakeholders can check and balance each other, so that the root key can be regenerated when consensus is reached, which is conducive to improving the security of key generation.

[0074] In some embodiments, the above-mentioned generating the target key according to the dispersion factor and the preset first root key may also include the following steps:

[0075] The first root key is encrypted to obtain a current root key check value; when it is detected that the current root key check value matches the acquired historical check value, a verification result indicating that the first root key has been verified is obtained, and in response to the verification result, a target key is generated according to the dispersion factor and the first root key.

[0076] Specifically, for the first root key generated last time, after a string of data with a certain rule is encrypted according to the first root key to obtain a check value, the check value and each encrypted component are saved in a safe, and the first root key generated this time is destroyed immediately after safe storage. In this way, when the key is generated next time, the first root key generated currently can be used to encrypt the same string of data to obtain the current root key check value; according to the matching result between the current root key check value and the previous root key check value, it is determined whether the current first root key has passed the check, and if the check has passed, the key data of other levels is generated according to the first current first root key and the dispersion factor.

[0077] Through the above embodiment, a method for regenerating hierarchical keys is provided. Each time a key is generated, the verification value of the current root key is matched with the previous verification value to verify whether the current root key passes. Therefore, there is no need to specially save the root key each time, thereby ensuring the maximum protection of the root key and the security of the top-level key, which is equivalent to ensuring the security of the entire key system.

[0078] Combine the following Figure 3 The first root key generation process in the embodiment of the present application is described, and the process includes the following steps:

[0079] Step S301, start the first root key generation process.

[0080] Step S302, different personnel generate and keep each encryption component, for example, a 16-byte random number can be generated as a single component by using an encryption machine. The root key is composed of multiple components (such as two or three components), and the components are stored separately.

[0081] Step S303, the encryption machine imports the components to synthesize the first root key. The encryption machine is preset with a private encryption rule, and the encryption machine stores the plain text and outputs the root key ciphertext.

[0082] Step S304: Use the root key to encrypt a string of data that follows a certain rule to obtain a root key verification value.

[0083] Step S305, the root key verification code and components are stored in a safe and kept by a designated person. After being safely stored, the root key is destroyed immediately. The above method can ensure maximum protection of the root key.

[0084] In some embodiments, the calculation of the dispersion factor at the current level based on the key security level and the key category information may further include the following steps:

[0085] Based on the key category information, determine the type of dispersion factor; obtain key management information, and calculate the dispersion factor according to the key management information and the dispersion factor type.

[0086] The key management information includes the version number of the current key and / or the management information of the area where the vehicle is located. For the dispersion factors at different levels, the data composition is different.

[0087] Specifically, the first-level dispersion factor can be composed of the following parts: type number, which occupies 2 bytes; version number, which occupies 2 bytes, with a default value of 0000; region, which occupies 4 bytes, such as FFFFFFFF for domestic region, 00000000 for overseas region, 00000001 for North America region, and others are cumulative. The definition of the first-level dispersion factor can be shown in the following table:

[0088] Table 1 First level dispersion factors

[0089]

[0090] In the above table, the first-level key type corresponds to the key category information of the vehicle digital key.

[0091] For the second level dispersion factor, its composition is similar to that of the first level dispersion factor. The definition of the second level dispersion factor can be shown in the following table:

[0092] Table 2 Second level dispersion factors

[0093]

[0094] In addition, the third-level dispersion factor can be defined according to the sub-business of each key business, and the single length can be limited to 16 bytes. Taking the following FOB as an example, the SEID of the FOB can be used as a dispersion factor; where SEID is the ID of the secure element (SE) application, which can be used as the unique identifier of each secure element. The definition of the third-level dispersion factor can be shown in the following table:

[0095] Table 3 Third level dispersion factors

[0096]

[0097] Through the above embodiments, the dispersion factor is determined according to the dispersion factor type and other information, so that keys at various levels can be adapted to different types of vehicle digital keys, thereby further improving the composition of the key system.

[0098] In one embodiment, the target key is generated according to the dispersion factor and the preset first root key, including:

[0099] A first-level dispersion factor is dispersed and calculated according to the first root key to generate a second root key, and the second root key is encrypted to generate a first-level key; a second-level dispersion factor is dispersed and calculated according to the second root key to generate a second-level key; wherein the dispersion factor includes the first-level dispersion factor and the second-level dispersion factor, and the target key includes the first-level key and the second-level key.

[0100] Specifically, the generation process of the first-level key may include the following steps: inputting the first root key composed of multiple components into the encryption machine, and the encryption machine uses the root key plaintext to perform a dispersion calculation on the first-level dispersion factor to obtain the second root key plaintext. The encryption machine encrypts the second root key plaintext and outputs the secondary root key ciphertext, which is the first-level key mentioned above; then the ciphertext of the first-level key is saved in the database for the generation of subsequent-level keys.

[0101] Since the plaintext of the second root key is obtained by dispersing the plaintext of the first root key with the first-level dispersion factor, and the synthetic components of the root key are strictly and securely stored in a safe, when the secondary root key is lost or leaked, the synthetic components of the root key can be used to regenerate the secondary root key.

[0102] For the second-level key, the second root key can be used to encrypt the dispersion factor. The second root key ciphertext is sent to the encryption machine, and the encryption machine parses the ciphertext to obtain the plaintext of the second root key; then the plaintext of the second root key is used to perform dispersion calculation on the second-level dispersion factor to obtain the ciphertext of the third-level key.

[0103] For example, please refer to the three-level structure Figure 4In the key security system related to the digital key shown in the figure, a hierarchical multi-level management method is adopted, including: Root Key (first root key), first-level key and second-level key. Among them, the first root key should have the highest security level and is generated by multi-component synthesis. The second root key is obtained by dispersing the RootKey according to different dispersion factors and can be exported as plain text through encryption machines and other devices. The business key is obtained by dispersing the second root key according to different dispersion factors, and its plain text is stored in security devices such as encryption machines. The first-level key is dispersed into different types of keys, including second root keys such as FOB root key, DK (digital key) root key and GP platform root key. Under different types of first-level keys, they are dispersed into different keys again, including a class of second-level keys composed of the third root key PRE SK, a class of second-level keys composed of the third root key CMAC Key, HMAC KEY, DK BNCM CEM KEY, NFC EncryptionKey, OEMSK, PRESK, RPAK TCAM ADCU KEY, and a class of second-level keys composed of the third root key ISD SCP03KEY_ENC, ISD SCP03KEY_MAC, and ISD SCP03 KEY_DEK.

[0104] In addition, in this step, the key level can also be extended to the third level or higher, and the higher the key level, the higher the security. Taking the third level as an example, the key generation process at this level may include the following steps: the second level key ciphertext is sent to the encryption machine, the encryption machine parses the ciphertext to obtain the plaintext of the second level key, and the plaintext of the second level key performs a dispersion calculation on the third level dispersion factor to obtain the ciphertext of the fourth level key.

[0105] It should be noted that the above-mentioned encryption and dispersion calculation of the dispersion factor can be a symmetric encryption algorithm. For example, for the second-level key, the second-level dispersion factor can be encrypted and dispersed using the second root key using AES128_CBC_NoPadding. Among them, the Advanced Encryption Standard (AES) is a widely used symmetric encryption algorithm that supports multiple key lengths (such as 128 bits, 192 bits, and 256 bits). Here, the AES-128-bit key length is used, and the Cipher-block chaining (CBC) mode is selected for encryption. NoPadding means that no padding is used during the encryption process.

[0106] Through the above embodiments, a derived method is flexibly adopted to generate keys of various levels, thereby realizing the generation method corresponding to keys of different levels, and providing a set of safe and reliable key system design solutions for complex businesses.

[0107] In some embodiments, after the target key is generated, the method further includes the following steps:

[0108] Obtain certificate chain data and security chip data; encrypt the target key to obtain target encrypted data, and package the target encrypted data, certificate chain data and security chip data into a production line canned data package; send the production line canned data package to the file server for storage.

[0109] It should be understood that the certificate chain data is used to authenticate the identity when the certificate chain provides a digital key to a terminal such as a mobile phone or a smart watch. The security chip data includes the security chip operating system file data and the security chip application data extracted from the database.

[0110] In this step, see Figure 5 , package the above-mentioned SE production line data such as certificate files, key data files, security chip application files and security chip operating system files into a ZIP format production line canned data package; the key data file includes symmetric encryption keys and key data. The packaged compressed file can be uploaded to the Secure File Transfer Protocol (SFTP) file server to obtain the return data, and update the key status in the database according to the status of the security chip supplier's write-back. For example, the key has been successfully burned into the security chip and is immediately enabled, and cannot be easily deleted or modified in the system.

[0111] The above-mentioned file server is used to send the production line canned data package to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform; the security chip burning result is used to indicate that the security chip supplier platform decrypts the encrypted data and burns it into the burning status of the security chip corresponding to the vehicle digital key. More specifically, for the security chip supplier, its management process includes the following process: the security chip supplier connects to the SFTP file server to obtain the full chip compressed file; uses its own private key to decrypt the data, burns the key data intact into the security chip, and finally uploads the burning result status data back to the SFTP file server.

[0112] Through the above embodiment, a key management process is provided, and relevant personnel can use the management system to quickly generate or obtain relevant keys, and can also intuitively understand various information about the keys, which is conducive to key tracing, thereby achieving scientific and effective management of the keys. In addition, based on the transfer of key data on the file server, flexible transmission of key data is also achieved.

[0113] In some embodiments, the above-mentioned encrypting the target key to obtain the target encrypted data may also include the following steps:

[0114] The target key is encrypted using a preset symmetric key to obtain first encrypted data; data summary information of the first encrypted data is calculated, and the data summary information is encrypted according to the public key data of the security chip supplier platform to obtain a digital signature; the first encrypted data is encrypted using a symmetric key to obtain second encrypted data; wherein the target encrypted data includes the first encrypted data, the second encrypted data and the digital signature.

[0115] It should be noted that, for the above target key, before encryption, the key data can be organized according to the structure of Tag (tag of each data segment), Length (length of each data segment), and Value (key value) and hexadecimal data can be generated. The data structure is shown in the following table:

[0116] Table 4 Key data structure example

[0117]

[0118] Next, the assembled key data can be encrypted using the AES symmetric key and the key data can be transmitted in the form of ciphertext. The symmetric key is one-time and valid only once. In order to verify the integrity and authenticity of the encrypted data, its data summary is first calculated (usually using a hash function such as SHA-256). The data summary is a short and unique representation of the original data. Any slight change to the original data will result in a completely different data summary. Then, the data summary is encrypted using the public key of the security chip vendor platform (the corresponding private key is securely stored by the security chip vendor platform), and the result is a digital signature. The digital signature can ensure the integrity of the data and the authenticity of the source, because only the entity with the corresponding private key can generate a valid signature. After that, the encrypted data is encrypted using the public key of the security chip vendor platform plus the public-key cryptography (RSA) public key to generate the second encrypted data. The purpose of using public key encryption here is to ensure the secure transmission of the symmetric key and increase the security of the data. In this way, after receiving the data, the supplier can use the public key to verify the validity of the digital signature, thereby confirming the integrity and source of the data, and use the platform's private key to decrypt the second encrypted data to obtain the decrypted data.

[0119] Through the above-mentioned embodiments, the secure transmission of key data is ensured based on technologies such as public key encryption and digital signature, thereby further improving the security of key management.

[0120] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0121] This embodiment also provides a key device, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the terms "module", "unit", "subunit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0122] The above-mentioned key generation device includes: an acquisition module, used to obtain the key category information of the vehicle digital key; a grading module, used to determine the key security level; based on the key security level and the key category information, calculate the dispersion factor at the current level; and a generation module, used to generate a target key based on the dispersion factor and a preset first root key.

[0123] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination. For specific examples in this embodiment, reference can be made to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0124] This embodiment also provides a key management system, which includes: a production line canning device. The production line canning device is used to obtain key category information of a vehicle digital key; the production line canning device is also used to determine a key security level; based on the key security level and the key category information, a dispersion factor at the current level is calculated; the production line canning device is also used to generate a target key according to the dispersion factor and a preset first root key.

[0125] Through the key management system, keys can be graded according to different security needs, and different security management requirements can be implemented for keys of different security levels, thus achieving scientific and effective management of keys.

[0126] In some of the embodiments, the key management system further includes an encryption machine; the encryption machine is used to synthesize at least two encryption components generated by different participants to generate a first root key.

[0127] And / or, the above-mentioned key management system also includes a file server and a security chip supplier platform; the production line canning device is also used to obtain certificate chain data and security chip data; the production line canning device is also used to encrypt the target key to obtain target encrypted data, and package the target encrypted data, certificate chain data and security chip data into a production line canned data packet; the production line canning device is also used to send the production line canned data packet to the file server for storage; the file server is used to send the production line canned data packet to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform; the security chip burning result is used to indicate the burning status of the encrypted data being decrypted by the security chip supplier platform and burned into the security chip.

[0128] The key management system of the present application is described in detail below with reference to specific embodiments. Figure 6 is a schematic diagram of the structure of a key management system according to an embodiment of the present application, such as Figure 6 As shown, the system includes: hardware encryption machine server equipment, production line canning device, file server and security chip supplier platform. Among them, the production line canning device includes key management module, file management module, security chip production line canning data generation module and data transmission module.

[0129] The key management module includes two submodules: key generation and key storage. The key generation module is used to generate various types and levels of keys through socket connection encryption machine according to the key generation strategy provided in the above key security system design. Socket: refers to the socket, which is the abstraction of the endpoint for two-way communication between application processes on different hosts in the network. A socket is one end of the process communication on the network, providing a mechanism for application layer processes to exchange data using network protocols. The key storage module is used to save the generated keys in the database.

[0130] The file management module includes two submodules: security chip operating system file management and security chip application file management. The security chip operating system file management module is used to manage the upload and deletion of binary files of the security chip operating system. The security chip application file management module is used to manage the upload and deletion of binary files of the security chip application. Through this module, the effective management of the files and versions of the operating system files and application files corresponding to the unlimited growth of security chips of automobile companies is achieved.

[0131] The security chip production line canned data generation module is used to generate a production line canned data packet. The generation method is as described in the above method embodiment and will not be repeated here.

[0132] The data transmission module includes a package file generation module, a file upload module, and a file download module. Among them, the package file generation module is used to package the security chip production line canned data into a compressed file in zip format. The file upload module is used to transfer the compressed file in zip format of the full chip production line canned data to the SFTP file server. The file download module is used to obtain the return disk data from the SFTP file server, and update the key status in the database according to the status of the security chip supplier's write-back. For example, the key has been successfully burned into the security chip and is immediately enabled, and cannot be easily deleted or modified in the system.

[0133] The file server is used to store compressed files in the zip format of the production line canned data and to save the return data from the security chip supplier.

[0134] Through the above embodiments, a scientific and effective management of vehicle digital key-related key data, security chip-related files, and an overall solution for safe and reliable key data transmission are provided through the production line canning device.

[0135] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0136] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0137] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0138] S1, obtaining key category information of the vehicle digital key.

[0139] S2, determining a preset key security level; and calculating a dispersion factor at the current level based on the key security level and key category information.

[0140] S3: Generate a target key corresponding to the vehicle digital key based on the dispersion factor and the preset first root key.

[0141] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0142] In addition, in combination with the key generation method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the key generation methods in the above embodiment is implemented.

[0143] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.

[0144] The above-mentioned 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 invention patent. 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 patent of the present application shall be subject to the attached claims.

Claims

1. A key generation method, characterized in that: The method comprises: Get the key category information of the vehicle digital key; Determining a preset key security level; and calculating a dispersion factor at each of the key security levels based on the key security level and the key category information; A target key corresponding to the vehicle digital key is generated according to the dispersion factor and the preset first root key.

2. The key generation method according to claim 1, characterized in that: Generating the first root key includes: obtaining at least two encrypted components; The encryption components are synthesized to generate the first root key.

3. The key generation method according to claim 1, characterized in that: The step of generating a target key corresponding to the vehicle digital key according to the dispersion factor and the preset first root key includes: Encrypting the first root key to obtain a current root key check value; When it is detected that the current root key check value matches the acquired historical check value, a verification result indicating that the first root key has passed verification is obtained, and in response to the verification result, the target key is generated according to the dispersion factor and the first root key.

4. The key generation method according to claim 1, characterized in that: The calculating the dispersion factor at the current level based on the key security level and the key category information includes: Determining a dispersion factor type based on the key category information; Acquire key management information, and calculate the dispersion factor according to the key management information and the dispersion factor type.

5. The key generation method according to claim 1, characterized in that: The step of generating a target key corresponding to the vehicle digital key according to the dispersion factor and the preset first root key includes: Performing a dispersion calculation on the first-level dispersion factor according to the first root key to generate a second root key, and encrypting the second root key to generate a first-level key; A second-level dispersion factor is dispersed and calculated according to the second root key to generate a second-level key; wherein the dispersion factor includes the first-level dispersion factor and the second-level dispersion factor, and the target key includes the first-level key and the second-level key.

6. The key generation method according to any one of claims 1 to 5, characterized in that: After generating the target key corresponding to the vehicle digital key, the method further includes: Get certificate chain data and security chip data; Encrypting the target key to obtain target encrypted data, and packaging the target encrypted data, the certificate chain data, and the security chip data into a production line canned data package; Sending the production line canned data package to a file server for storage; The file server is used to send the production line canned data package to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform.

7. The key generation method according to claim 6, characterized in that: The step of encrypting the target key to obtain target encrypted data includes: Encrypting the target key using a preset symmetric key to obtain first encrypted data; Calculating data summary information of the first encrypted data, encrypting the data summary information according to public key data of the security chip supplier platform, and obtaining a digital signature; The symmetric key is encrypted using the public key data to obtain second encrypted data; wherein the target encrypted data includes the first encrypted data, the digital signature and the second encrypted data.

8. A key management system, characterized in that: The system comprises: a production line canning device; The production line canning device is used to obtain key category information of the vehicle digital key; The production line canning device is also used to determine a preset key security level; based on the key security level and the key category information, calculate a dispersion factor at the current level; The production line canning device is also used to generate a target key according to the dispersion factor and a preset first root key.

9. The key management system according to claim 8, characterized in that: The system also includes an encryption machine; The encryption machine is used to synthesize at least two encryption components generated by different participants to generate the first root key; and / or, The system also includes a file server and a security chip vendor platform; The production line canning device is also used to obtain certificate chain data and security chip data; The production line canning device is also used to encrypt the target key to obtain target encrypted data, and package the target encrypted data, the certificate chain data and the security chip data into a production line canned data packet; The production line canning device is also used to send the production line canning data packet to a file server for storage; The file server is used to send the production line canned data package to the security chip supplier platform, and obtain the security chip burning result transmitted back by the security chip supplier platform.

10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the key generation method according to any one of claims 1 to 7 when running.