A method, device, equipment and storage medium for storing secret keys
By encrypting the initial secret key and allocating the secret key storage segment in the persistent memory, the problem of low security of secret key storage in the existing technology is solved, and the protection and security of the data are improved.
Patent Information
- Application Number
- CN202210842892.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-07-18
AI Technical Summary
Existing secret key storage methods have low security and are easily copied and cracked, leading to an increased risk of data leakage.
By obtaining the initial secret key and media access control address, performing encryption processing, generating an updated secret key, and allocating a secret key storage segment in the persistent memory for storage, this increases the difficulty of cracking the secret key.
It improves the protection strength of the secret key, enhances the security of the data, and reduces the risk of secret key leakage and data leakage.
Smart Images

Figure CN115174073B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to a key storage method, device, equipment and storage medium. Background Art
[0002] With the networking of automobile functions, the security of communication data has become increasingly important. In order to avoid unnecessary losses caused by data leakage, it is necessary to strongly protect its core data. In this context, vehicle information security technology has emerged. Currently, communication connections can be established between cars and remote servers, as well as internal controllers of cars. In addition, between ends, data needs to be encrypted before sending, to prevent people from intercepting the data on the link and obtaining important information; before receiving data, because the data is encrypted, it must be decrypted before it can be used. Therefore, in the implementation of vehicle information security, secret keys have become an indispensable and important factor. If the secret keys are leaked, the core data can be intercepted and obtained after decryption, and then protecting the secret keys has become a crucial link in the entire information security protection process.
[0003] The general way to store secret keys is to store them in a file directory. That is, after encrypting the file directly, the secret key information is saved outside the file, forming information similar to a file directory. Although this method can meet the needs of secret key storage, if the secret key directory is known, the secret key can be easily copied to crack the encrypted information. Therefore, the security of this key storage method is low, resulting in a greater risk of leakage of the corresponding data information. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a key storage method, system, device and medium to solve the above technical problems.
[0005] The present invention provides a key storage method, comprising: obtaining an initial key and a media access control address; allocating a space in a persistent memory as a key storage segment; encrypting the initial key based on the media access control address and the initial key to obtain an updated key; and storing the updated key in the key storage segment.
[0006] According to one aspect of an embodiment of the present application, obtaining the initial key includes at least one of the following: downloading the initial key from a remote server through a vehicle-side circuit board; and flashing the initial key on the vehicle-side circuit board through a host computer.
[0007] According to one aspect of an embodiment of the present application, obtaining the media access control address includes at least one of the following: selecting an address string of a circuit board network card to obtain the media access control address; obtaining the media access control address based on the flashing result of the host computer on the vehicle-side circuit board.
[0008] According to one aspect of an embodiment of the present application, an initial key is encrypted to obtain an updated key, including: processing the prefabricated media access control address through a secure encrypted hash algorithm to obtain a first set of data; processing the prefabricated initial key string through a secure encrypted hash algorithm to obtain a second set of data; obtaining a third set of data based on the first set of data and the second set of data; encrypting the third set of data to obtain an updated key.
[0009] According to one aspect of an embodiment of the present application, before encrypting the initial key, it also includes: presetting a file directory for storing the key in the memory of the vehicle-side circuit board; and temporarily storing the downloaded initial key in the file directory through the key update service.
[0010] According to one aspect of an embodiment of the present application, allocating a key storage segment in a memory includes: obtaining storage space information of a persistent memory, wherein the storage space includes occupied space and free space; adding a partition in the free space of the persistent memory, and naming the newly added partition as a key storage segment for storing updated keys.
[0011] According to one aspect of an embodiment of the present application, after allocating a key storage segment in the memory, it also includes: obtaining updated key information and location information of the key storage segment, wherein the key storage segment is located in the persistent memory; and writing the updated key information into the key storage segment.
[0012] According to one aspect of an embodiment of the present application, a key storage system is provided, including: an information acquisition module: used to obtain an initial key; a key processing module: used to calculate and encrypt the initial key to obtain an updated key; and a key storage module: used to store the updated key.
[0013] According to one aspect of an embodiment of the present application, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the above-mentioned key storage method.
[0014] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned key storage method.
[0015] The present invention provides a key storage method, system, device and medium. Compared with the traditional method of storing keys in the form of file directories, the present method places more emphasis on the protection of keys, making it less easy to obtain the keys. Even if the keys are obtained, they are difficult to crack due to their own encryption processing, which increases the difficulty of cracking the keys, thereby enhancing the protection of core data and improving data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] 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:
[0017] FIG. 1( a ) is a schematic diagram of a system architecture in a scenario where a vehicle communicates with a remote server, shown in an exemplary embodiment of the present application;
[0018] FIG1( b ) is a schematic diagram of a system architecture of a vehicle in a production line scenario shown in an exemplary embodiment of the present application;
[0019] Figure 2 is a flowchart of a key storage method shown in an exemplary embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a secret key downloading system shown in an exemplary embodiment of the present application;
[0021] Figure 4 is a schematic diagram of a key flashing system shown in an exemplary embodiment of the present application;
[0022] Figure 5 is a schematic diagram of a secret key encryption process shown in an exemplary embodiment of the present application;
[0023] Figure 6 is a schematic diagram of a key processing method shown in an exemplary embodiment of the present application;
[0024] Figure 7 is a schematic block diagram of a key storage system shown in an exemplary embodiment of the present application;
[0025] Figure 8 It is a schematic diagram of the structure of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0026] 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.
[0027] 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.
[0028] First of all, it should be noted that the secret key is a parameter that is input into the algorithm for converting plaintext into ciphertext or ciphertext into plaintext. Depending on whether the encryption key and decryption key used by the cryptographic algorithm are the same and whether the decryption process can be derived from the encryption process, the cryptographic system can be divided into symmetric cryptographic system and asymmetric cryptographic system.
[0029] MAC address (Media Access Control Address), literally translated as media access control address, also known as LAN Address, MAC address, Ethernet Address or Physical Address, is an address used to identify the location of a network device. In the OSI model, the third layer, the network layer, is responsible for the IP address, and the second layer, the data link layer, is responsible for the MAC address. The MAC address is used to uniquely identify a network card in the network. If a device has one or more network cards, each network card needs and will have a unique MAC address.
[0030] EMMC (Embedded Multi Media Card) is a standard specification for embedded memory established by the MMC Association, mainly for products such as mobile phones and tablets. EMMC integrates a controller in the package, provides a standard interface and manages flash memory.
[0031] ASE encryption, AES encryption standard is also known as the Advanced Encryption Standard Rijndael encryption method. It is the 21st century encryption standard designed by the National Institute of Standards and Technology (NIST) of the United States to replace DES. The basic requirements of AES are that it uses a symmetric block cipher system, the key length can be 128, 192 or 256 bits, the block length is 128 bits, and the algorithm should be easy to implement on various hardware and software.
[0032] MD5 Message-Digest Algorithm is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission.
[0033] FIG1(a) is a schematic diagram of the system architecture in a scenario where a vehicle communicates with a remote server, and FIG1(b) is a schematic diagram of the system architecture in a scenario where a vehicle is on a production line.
[0034] As shown in FIG. 1(a) and FIG. 1(b), the system architecture may include a key generation device, a key storage device, and a key processing device. The key generation device may be a remote server 101 or a host computer 104. The key storage device is a vehicle-side circuit board 102 of the vehicle. The key processing device is a computer 103. The host computer 104 and the computer device 103 may be at least one of a desktop graphics processing unit (GPU) computer, a GPU computing cluster, a neural network computer, and the like.
[0035] As shown in Figure 1(a), in the communication environment between the vehicle and the remote server, the vehicle-side circuit board establishes a communication link with the remote server through a network connection. The vehicle-side circuit board downloads the secret key from the remote server 101 through the communication link, and combines the media access control (Media Access Control Address, MAC for short) address of the network card of the vehicle-side circuit board 102. In the computer device 103, after a series of calculations, the updated secret key information is obtained and stored in the persistent memory contained in the vehicle-side circuit board 102.
[0036] As shown in Figure 1(b), in a production line environment, the host computer can be equipped with any operating system, including Microsoft operating system (Windows). An EMMC flashing service is running in the system. The host computer 104 is connected to the EMMC flashing interface of the vehicle-side circuit board 102, and the EMMC storage information can be operated when the vehicle-side circuit board 102 is not powered on. The host computer 104 directly writes the preset MAC string and the initial key string to the vehicle-side circuit board 102. The computer device 103 obtains the updated key information through complex calculations based on the MAC string and the initial key string written to the vehicle-side circuit board 102 by the host computer 104.
[0037] By performing calculations on the initial key, an updated key is obtained, and the updated key is stored in the key storage segment in the persistent memory of the vehicle-side circuit board. This key storage method effectively enhances the confidentiality of the key, thereby enhancing the security of the data.
[0038] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0039] Figure 2 It is a flowchart of a key preservation method shown in an exemplary embodiment of the present application. The encryption processing of the initial key can be performed by a computer device, and the computer device can be the computer device 103 shown in Figures 1(a) and 1(b).
[0040] In one embodiment of the present invention, Figure 2 As shown, the key storage method at least includes steps S210 to S240, which are described in detail as follows:
[0041] In step S210 , an initial key and a media access control address are obtained.
[0042] In one embodiment of the present invention, in a communication environment between a vehicle and a remote server, a vehicle-side circuit board establishes a communication link with the remote server via a network connection, and the vehicle-side circuit board downloads an initial key from the remote server via the communication link.
[0043] In another embodiment of the present invention, in a vehicle production environment, the host computer is connected to the EMMC flash interface of the vehicle-side circuit board, and the host computer flashes a preset key string to the vehicle-side circuit board through the EMMC flash interface to obtain an initial key.
[0044] In one embodiment of the present invention, an address string of the vehicle-side circuit board is read, and a portion of the address string is selected as the media access control address of the vehicle-side circuit board.
[0045] In another embodiment of the present invention, the host computer is connected to the vehicle-side circuit board via an EMMC interface, so the host computer can directly write a preset address string into the vehicle-side circuit board as a media access control address.
[0046] In step S220, the initial key is encrypted based on the MAC address and the initial key to obtain an updated key.
[0047] In one embodiment of the present invention, the MAC address string of the network card of the circuit board and the secret key string are selected to perform MD5 digest calculation respectively, and two groups of 16-byte data are obtained. The two groups of 16-byte data are ORed to obtain a group of 16-byte data. Then, the secret key string is encrypted by ASE based on the 16-byte data to obtain updated secret key information.
[0048] In another embodiment of the present invention, the host computer pre-fabricates the MAC address characters and secret key string of the circuit board, and calculates two groups of 16-byte MD5 summary data according to the MAC address string and the secret key string before flashing, and then performs an OR operation on the two groups of 16-byte data to obtain a group of 16-byte data. Finally, the group of 16-byte data and the secret key string are encrypted by ASE to obtain the updated secret key information.
[0049] In step S230, a key storage segment space is allocated, that is, a space is allocated in the persistent memory as a key storage segment.
[0050] In one embodiment of the present invention, storage information of a persistent memory contained in a vehicle-side circuit board is read, and an area is allocated in its free space as an independent key storage segment.
[0051] In step S240, the updated key information is stored in the key storage segment.
[0052] In one embodiment of the present invention, the location information of the key storage segment in the persistent memory is firstly obtained, and then the updated key information is written into the key storage segment.
[0053] It should be understood that step S210 and step S230 may be performed simultaneously or not, and the above steps are only exemplary and explanatory and cannot limit the present application and are not intended to be limiting conditions of the present invention.
[0054] Figure 3 It is a schematic diagram of a key downloading system shown in an exemplary embodiment of the present application.
[0055] like Figure 3 As shown in the figure, the key download system mainly includes two parts: the remote server and the vehicle-side circuit board, wherein the vehicle-side circuit board contains a persistent memory. The remote server is equipped with any operating system, including the Linux OS system, and is connected to the vehicle-side circuit board through a communication link. The vehicle-side circuit board can be equipped with any operating system, including Linux, QNX and Android OS systems, and contains a common memory with a key update service and a file directory. In addition, it also contains a persistent memory. The internal storage space of the persistent memory is partitioned, and it can be divided into a partition storage segment, a key storage segment, and the storage space of partitions 1, 2 to N.
[0056] The vehicle-side circuit board downloads the initial secret key from the remote server.
[0057] In one embodiment of the present invention, in a communication environment between a vehicle and a remote server, the vehicle-mounted circuit board establishes a communication link with the remote server through a network connection, and the vehicle-side circuit board downloads information from the remote server through the communication link to obtain an initial secret key.
[0058] A file directory for storing secret keys is preset in the memory of the vehicle-side circuit board; and the downloaded initial secret key is stored in the file directory through a preset secret key update service.
[0059] In one embodiment of the present invention, after the vehicle-side circuit board downloads the initial key from the remote server through the communication link, the obtained initial key is stored in a file directory according to the existing key update service method.
[0060] The address information of the vehicle-side circuit board is selected as the MAC address.
[0061] In one embodiment of the present invention, the address information of the vehicle-side circuit board is read to obtain the corresponding character string, and a section of the character string is selected as the MAC address of the vehicle-side circuit board.
[0062] Figure 4 It is a schematic diagram of a key flashing system shown as an exemplary embodiment of the present application.
[0063] like Figure 4 As shown, the secret key flashing system mainly includes two parts: the host computer and the vehicle-side circuit board, in which the vehicle-side circuit board contains a persistent memory. The host computer can be equipped with any operating system, including Linux and Windows systems, and the vehicle-side circuit board also includes an embedded multimedia card (EMMC) memory, an EMMC flashing port and a persistent memory, so the EMMC flashing action can be completed between the host computer and the withdrawal circuit board. The internal storage space of the persistent memory is partitioned, and it can be divided into a partition storage segment, a secret key storage segment, and the storage space of partitions 1, 2 to N.
[0064] The initial secret key is obtained by flashing it on the vehicle circuit board through the host computer.
[0065] In one embodiment of the present invention, the host computer and the vehicle-side circuit board are connected through an EMMC flash port, and the host computer can directly flash information into the vehicle-side circuit board, so that the preset initial key is written into the vehicle-side circuit board through the EMMC flash port, thereby obtaining the required initial key information.
[0066] The media access control address stored in the vehicle-side circuit board is read, and the media access control address is pre-written into the vehicle-side circuit board by a host computer.
[0067] In one embodiment of the present invention, the host computer and the vehicle-side circuit board are connected via an EMMC flash port, and the host computer can directly flash information into the vehicle-side circuit board, thereby writing a preset MAC address into the vehicle-side circuit board through the EMMC flash port to obtain the required MAC address information.
[0068] Obtain storage space information of a persistent memory, wherein the storage space includes occupied space and free space; add a partition in the free space of the persistent memory, namely, a key storage segment, for storing updated keys; obtain updated key information and location information of the key storage segment; store the updated key information in the key storage segment.
[0069] like Figure 3 and Figure 4 As shown in the figure, the persistent memory is divided into multiple storage units according to its internal storage space, including partition storage segments, partitions 1 to N, etc. First, a key storage segment is added. After the initial key obtained above is encrypted, an updated key can be obtained, and then the updated key information is stored in the added key storage segment.
[0070] Figure 5 It is a schematic diagram of a secret key encryption process shown in an exemplary embodiment of the present application.
[0071] like Figure 5 As shown, in the entire process of key processing, it is first necessary to obtain the initial key and MAC address information, and then obtain the updated key information based on the initial key information and MAC address information through a series of algorithms.
[0072] In one embodiment of the present invention, the initial key and MAC address are first obtained, and then the initial key and the MAC address are respectively subjected to MD5 digest calculation to obtain a group of 16-byte data, and then the two groups of 16-byte data are subjected to OR operation to obtain a new group of 16-byte data, and finally the new 16-byte data is combined with the initial key to perform ASE encryption processing to obtain updated key information.
[0073] Figure 6 It is a schematic diagram of a key processing method shown in an exemplary embodiment of the present application.
[0074] The media access control address is processed by a secure encrypted hash algorithm to obtain a first set of data; the initial key string is processed by a secure encrypted hash algorithm to obtain a second set of data; based on the first set of data and the second set of data, a third set of data is obtained; the third set of data is encrypted to obtain an updated key.
[0075] like Figure 6As shown, the initial key is calculated through MD5 digest to obtain a group of 16-byte data from X1 to X16; the MAC address string is calculated through MD5 digest to obtain a group of 16-byte data from Y1 to Y16; the data from X1 to X16 is ORed with the data from Y1 to Y16, that is, any value of X1 and Y1 is taken as Z1, any value of X2 and Y2 is taken as Z2, and so on to obtain 16-byte data from Z1 to Z16; based on the combination of the byte data from Z1 to Z16 and the initial key, an AES encryption calculation is performed to obtain an updated key.
[0076] Figure 7 It is a schematic block diagram of a key storage system shown in an exemplary embodiment of the present application.
[0077] In one embodiment of the present application, Figure 7 As shown, the system can be applied to Figure 2 The implementation environment shown in the figure is specifically configured in the computer device 103. The system can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the applicable implementation environment.
[0078] like Figure 7 As shown, the exemplary key storage system includes: an information acquisition module 701, a key processing module 702, and a key storage module 703.
[0079] The information acquisition module 701 is used to obtain the initial key and the media access control address, including the initial key downloaded from the remote server and the initial key flashed from the host computer.
[0080] In one embodiment of the present invention, when the vehicle has been put into use and is in an application scenario where the vehicle communicates with a remote server, the vehicle-side circuit board downloads the initial secret key from the remote server through a communication link between the vehicle and the remote server;
[0081] In another embodiment of the present invention, when the vehicle has not yet been put into use and is in a production scenario, the host computer flashes the preset initial key and MAC address to the vehicle-side circuit board through the EMMC interface.
[0082] The key processing module 702 encrypts the initial key based on the media access control address and the initial key to obtain an updated key.
[0083] In one embodiment of the present invention, the obtained initial key and MAC address data are respectively processed by MD5 calculation to obtain the corresponding 16-byte data, and the two groups of 16-byte data obtained above are ORed to obtain a new group of data. Finally, the obtained new data and the initial key are AES encrypted to obtain updated key information.
[0084] The key storage module 703 stores the obtained updated key in the key storage segment.
[0085] In one embodiment of the present invention, according to the memory status of the persistent memory in the vehicle-side circuit board, a part of its free space is allocated and named as a key storage segment, and the updated key information is stored in the key storage segment.
[0086] It should be understood that the above steps are merely exemplary and explanatory and cannot limit the present application and should not be construed as limiting conditions of the present invention.
[0087] It should be noted that the test device provided in the above embodiment is different from the test device provided in the above embodiment. Figure 2 The test method provided belongs to the same concept, and the specific way in which each module and unit performs the operation has been described in detail in the method embodiment, which will not be repeated here. In practical applications, the test device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0088] Figure 8 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application.
[0089] In one embodiment of the present invention, Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803, such as executing the method described in the above embodiment. In the RAM 803, various programs and data required for system operation are also stored. The CPU 801, ROM 802 and RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0090] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom is installed into the storage section 808 as needed.
[0091] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, various functions defined in the system of the present application are executed.
[0092] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the key storage method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0093] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by an instruction execution system, device or device or for use in combination with it. The computer program contained on the computer-readable medium may be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above. The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above module, program segment, or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0094] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the key storage method provided in each of the above embodiments.
[0095] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0096] 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.
[0097] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0098] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0099] In the above embodiments, unless otherwise specified, the use of serial numbers such as "first" and "second" to describe common objects only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must adopt a given order, whether in time, space, sorting or any other way.
[0100] It should be understood that the contents described in the above application are only preferred exemplary embodiments of the present application and are not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A key storage method, characterized in that: include: Get the initial key and media access control address; Based on the media access control address and the initial key, encrypting the initial key to obtain an updated key, including processing the media access control address through a secure encrypted hash algorithm to obtain a first set of data; processing the initial key string through a secure encrypted hash algorithm to obtain a second set of data; based on the first set of data and the second set of data, obtaining a third set of data; Encrypting the third set of data to obtain an updated secret key; Allocate a storage space in the persistent storage as the key storage segment; The updated secret key is stored in the secret key storage segment.
2. The key storage method according to claim 1, characterized in that: Obtaining the initial key includes at least one of the following: The initial secret key is downloaded from the remote server through the vehicle-side circuit board; The initial secret key is obtained by flashing it on the vehicle circuit board through the host computer.
3. The key storage method according to claim 1, characterized in that: Obtaining the media access control address includes at least one of the following: Reading an address string of a vehicle-side circuit board, and determining that at least a portion of characters in the address string are media access control addresses; The media access control address stored in the vehicle-side circuit board is read, and the media access control address is pre-written into the vehicle-side circuit board by a host computer.
4. The key storage method according to claim 1, characterized in that: Before encrypting the initial key, it also includes: A file directory for storing secret keys is preset in the memory of the vehicle-side circuit board; The downloaded initial key is stored in the file directory through the preset key update service.
5. The key storage method according to any one of claims 1 to 4, characterized in that: Allocating a key storage segment in memory involves: Obtaining storage space information of a persistent memory, wherein the storage space includes occupied space and free space; A storage space is divided in the free space of the persistent memory, and a key storage segment is determined in the storage space to store the updated key.
6. The key storage method according to claim 5, characterized in that: After allocating a key storage segment in persistent storage, it also includes: Get the updated key information and the location information of the key storage segment; The updated key information is stored in the key storage segment.
7. A key storage system, characterized in that: include: An information acquisition module, which acquires an initial secret key and a media access control address; The key encryption module encrypts the initial key based on the media access control address and the initial key to obtain an updated key, including processing the media access control address through a secure encrypted hash algorithm to obtain a first set of data; processing the initial key string through a secure encrypted hash algorithm to obtain a second set of data; and obtaining a third set of data based on the first set of data and the second set of data; Encrypting the third set of data to obtain an updated secret key; The key storage module is used to store the updated key, and the key storage module is a storage space allocated in the persistent memory.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the key storage method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the key storage method according to any one of claims 1 to 6.
