Vehicle network information encryption method, device, computer equipment and storage medium

By generating session keys in connected vehicle devices and encrypting characteristic information of data packets, the security risks of the ECB encryption mode are resolved, achieving higher data encryption security and uniqueness.

CN115766244BActive Publication Date: 2025-09-16国汽智端(成都)科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211454233.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-09-16
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

The ECB encryption mode used in traditional Internet of Vehicles terminal devices has security risks, is vulnerable to statistical analysis attacks, is difficult to resist password cracking, and has low security.

Method used

By obtaining the device feature information and device key of the Internet of Vehicles device, a session key is generated, and the target vehicle data is divided into multiple data groups. The group feature information is encrypted using the session key, and XOR processing and symmetric encryption algorithm are used to generate target encrypted information.

Benefits of technology

The security of vehicle data encryption is improved, which can resist statistical analysis attacks and ensure the uniqueness and security of encryption results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766244B_ABST
    Figure CN115766244B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, computer equipment, storage medium and computer program product for encrypting information of an Internet of Vehicles (IoV). It relates to the field of information security. The method comprises: using a device key to encrypt the device characteristic information of an IoV device to obtain a session key, dividing the target vehicle data of the IoV device into multiple data groups according to a preset data grouping rule, and determining the group characteristic information corresponding to each data group, encrypting the group characteristic information using a session key to obtain a first encrypted ciphertext, and then obtaining the target encrypted information corresponding to the target vehicle data through a preset encryption strategy. Since each group characteristic information is different, the device characteristic information of each IoV device is different, so even if the target vehicle data is the same, the encryption result is different. The use of this method can resist statistical analysis attacks and improve the security of target vehicle data encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for encrypting information in an Internet of Vehicles (IoV) network. Background Art

[0002] With the development of intelligent connected vehicles, Internet of Vehicles terminal devices need to process and store a large amount of data, and Internet of Vehicles information encryption technology has emerged.

[0003] Traditionally, symmetric encryption is commonly used in connected vehicle devices to encrypt and store data. In the Electronic Codebook (ECB) encryption mode of symmetric encryption algorithms, there is a one-to-one correspondence between plaintext blocks and ciphertext blocks. Therefore, if multiple identical plaintext blocks exist in the plaintext, they will all be converted into the same ciphertext block.

[0004] Based on the ECB encryption mode, by observing and analyzing the ciphertext, it is possible to determine what kind of repeated combinations exist in the plaintext, and use this as clues to decipher the password. Therefore, the ECB mode has certain security risks and is difficult to resist statistical analysis attacks. Attackers can manipulate the plaintext without deciphering the password, and its security is relatively low. Summary of the Invention

[0005] Based on this, it is necessary to provide a vehicle network information encryption method, device, computer equipment, storage medium and computer program product that can improve the encryption security of target vehicle data to address the above technical problems.

[0006] In a first aspect, the present application provides a method for encrypting information in an Internet of Vehicles. The method comprises:

[0007] Obtaining device characteristic information and a device key of an Internet of Vehicles device, and encrypting the device characteristic information using the device key to obtain a session key;

[0008] Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule, and determine group feature information corresponding to each of the data groups;

[0009] Encrypting the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0010] Based on the first encrypted ciphertext, the target vehicle data and the session key, target encryption information corresponding to the target vehicle data is obtained through a preset encryption strategy.

[0011] In one embodiment, obtaining device characteristic information and a device key of an Internet of Vehicles device, and encrypting the device characteristic information using the device key to obtain a session key includes:

[0012] Obtain device information, application feature information, and device keys of connected vehicle devices;

[0013] Concatenating the characteristic information of the Internet of Vehicles device and the application characteristic information to obtain the device characteristic information;

[0014] The device characteristic information is symmetrically encrypted using the device key through an encryption algorithm to obtain the session key.

[0015] In one embodiment, dividing the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to a preset data grouping rule, and determining the grouping feature information corresponding to each of the data groups, includes:

[0016] Dividing the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to the preset data grouping rule;

[0017] Obtaining storage location information of the data group in the disk;

[0018] Convert the location information using a preset conversion rule to obtain location information of a target type;

[0019] The location information of the target type is used as the group feature information corresponding to the data group.

[0020] In one embodiment, obtaining target encryption information corresponding to the target vehicle data by a preset encryption strategy based on the first encrypted ciphertext, the target vehicle data, and the session key includes:

[0021] XORing the first encrypted ciphertext and the target vehicle data to obtain a second encrypted ciphertext;

[0022] The second encrypted ciphertext is encrypted using the session key through a symmetric encryption algorithm to obtain the target encrypted information.

[0023] In one embodiment, the method further comprises:

[0024] Obtain target encrypted information to be decrypted;

[0025] Based on the session key and the group characteristic information, the target encrypted information is decrypted using a preset decryption strategy to obtain the target vehicle data.

[0026] In one embodiment, decrypting the target encrypted information based on the session key and the group characteristic information using a preset decryption strategy to obtain the target vehicle data includes:

[0027] Decrypting the group characteristic information using the session key to obtain a first decrypted ciphertext;

[0028] XORing the first decrypted ciphertext and the ciphertext to obtain a second decrypted ciphertext;

[0029] The second decrypted ciphertext is decrypted using the session key through a symmetric decryption algorithm to obtain the target vehicle data.

[0030] In a second aspect, the present application also provides a vehicle network information encryption device. The device includes:

[0031] A first encryption module is used to obtain device characteristic information and a device key of an Internet of Vehicles device, and encrypt the device characteristic information using the device key to obtain a session key;

[0032] A determination module, configured to divide the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to a preset data grouping rule, and determine group feature information corresponding to each of the data groups;

[0033] a second encryption module, configured to encrypt the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0034] The third encryption module is used to obtain target encryption information corresponding to the target vehicle data through a preset encryption strategy based on the first encrypted ciphertext, the target vehicle data and the session key.

[0035] In one embodiment, the first encryption module is specifically configured to:

[0036] Obtain device information, application feature information, and device keys of connected vehicle devices;

[0037] Concatenating the device information of the Internet of Vehicles device and the application characteristic information to obtain the device characteristic information;

[0038] The device characteristic information is symmetrically encrypted using the device key through an encryption algorithm to obtain the session key.

[0039] In one embodiment, the determining module is specifically configured to:

[0040] Dividing the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to the preset data grouping rule;

[0041] Obtaining storage location information of the data group in the disk;

[0042] The position information is converted according to a preset conversion rule to obtain position information of a target type, and the position information of the target type is used as group feature information corresponding to the data group.

[0043] In one embodiment, the third encryption module is specifically used to:

[0044] XORing the first encrypted ciphertext and the target vehicle data to obtain a second encrypted ciphertext;

[0045] The second encrypted ciphertext is encrypted using the session key through a symmetric encryption algorithm to obtain the target encrypted information.

[0046] In one embodiment, the apparatus further comprises:

[0047] An acquisition module, used to obtain target encrypted information to be decrypted;

[0048] The decryption module is used to decrypt the target encrypted information based on the session key and the group characteristic information through a preset decryption strategy to obtain the target vehicle data.

[0049] In one embodiment, the decryption module is specifically used to:

[0050] Decrypting the group characteristic information using the session key to obtain a first decrypted ciphertext;

[0051] Performing an XOR operation on the first decrypted ciphertext and the target encrypted information to obtain a second decrypted ciphertext;

[0052] The second decrypted ciphertext is decrypted using the session key through a symmetric decryption algorithm to obtain the target vehicle data.

[0053] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0054] Obtaining device characteristic information and a device key of an Internet of Vehicles device, and encrypting the device characteristic information using the device key to obtain a session key;

[0055] Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule, and determine the grouping feature information corresponding to each of the data groups;

[0056] Encrypting the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0057] Based on the first encrypted ciphertext, the target vehicle data and the session key, target encryption information corresponding to the target vehicle data is obtained through a preset encryption strategy.

[0058] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0059] Obtaining device characteristic information and a device key of an Internet of Vehicles device, and encrypting the device characteristic information using the device key to obtain a session key;

[0060] Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule, and determine the grouping feature information corresponding to each of the data groups;

[0061] Encrypting the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0062] Based on the first encrypted ciphertext, the target vehicle data and the session key, target encryption information corresponding to the target vehicle data is obtained through a preset encryption strategy.

[0063] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0064] Obtaining device characteristic information and a device key of an Internet of Vehicles device, and encrypting the device characteristic information using the device key to obtain a session key;

[0065] Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule, and determine the grouping feature information corresponding to each of the data groups;

[0066] Encrypting the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0067] Based on the first encrypted ciphertext, the target vehicle data and the session key, target encryption information corresponding to the target vehicle data is obtained through a preset encryption strategy.

[0068] The above-mentioned vehicle network information encryption method, apparatus, computer device, storage medium, and computer program product encrypt the device characteristic information of the vehicle network device using a device key to obtain a session key. According to a preset data grouping rule, the target vehicle data of the vehicle network device is divided into multiple data groups, and the group characteristic information corresponding to each data group is determined. The group characteristic information is encrypted using the session key to obtain a first encrypted ciphertext, and the target encrypted information corresponding to the target vehicle data is obtained using a preset encryption strategy. Because each group characteristic information is different, the device characteristic information of each vehicle network device is different. Therefore, even if the target vehicle data is the same, the encryption result will be different. The use of this method can resist statistical analysis attacks and improve the security of target vehicle data encryption. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 Schematic diagram of a flow chart of a method for encrypting Internet of Vehicles information in one embodiment;

[0070] Figure 2 A schematic diagram of a process for obtaining a session key in one embodiment;

[0071] Figure 3 A schematic diagram of a process for obtaining group feature information in one embodiment;

[0072] Figure 4 A schematic diagram of a process for encrypting target vehicle data to obtain target encrypted information in one embodiment;

[0073] Figure 5 Schematic diagram of a flow chart of a method for decrypting Internet of Vehicles information in one embodiment;

[0074] Figure 6 A schematic diagram of a process for decrypting target encrypted information to obtain target vehicle data in one embodiment;

[0075] Figure 7 This is a structural block diagram of a vehicle network information encryption device in one embodiment;

[0076] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0078] In one embodiment, Figure 1As shown, a method for encrypting information in an Internet of Vehicles (IoV) is provided. This embodiment uses the method applied to a terminal as an example. It is understood that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0079] Step 102: Obtain device feature information and a device key of the Internet of Vehicles device, and encrypt the device feature information using the device key to obtain a session key.

[0080] In an embodiment of the present application, the terminal obtains the device feature information of the Internet of Vehicles device, obtains the device key of the Internet of Vehicles device by calling a key derivation algorithm, and then calls a symmetric encryption algorithm and uses the device key to encrypt the device feature information to obtain a session key.

[0081] Specifically, the terminal obtains the device characteristic information of the connected vehicle device and obtains the device key of the connected vehicle device by invoking a key derivation algorithm. For example, the terminal may pre-store a root key and use the device characteristic information of the connected vehicle device as a key diversification factor. The terminal invokes the key derivation algorithm to calculate the device key of the connected vehicle device based on the root key and the key diversification factor. The terminal then invokes a symmetric encryption algorithm, applies the device key to the device characteristic information, and encrypts the session key.

[0082] Among them, the Internet of Vehicles equipment may include on-board terminal equipment and Internet of Vehicles road test equipment in the vehicle; for symmetric encryption algorithms, any algorithm with symmetric encryption function can be applied to this application, and the embodiments of this application do not limit this; the data type of the session key is byte type, and the key length of the session key is determined according to the symmetric encryption algorithm adopted. The session key can also be called an encryption key or a working key.

[0083] Step 104 : Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule, and determine group feature information corresponding to each data group.

[0084] In an embodiment of the present application, the terminal may pre-store a preset data grouping rule. Specifically, the terminal determines the length of the data packet based on the data packet length of the symmetric encryption algorithm used. In this embodiment, the data packet length is the same as the data packet length of the symmetric encryption algorithm used. For example, if the symmetric encryption algorithm uses the AES algorithm (Advanced Encryption Standard), since the data packet length of the AES algorithm is 16 bytes, the preset data grouping rule may be to divide every 16 bytes of target vehicle data into a data packet.

[0085] The terminal divides the target vehicle data from the IoV device into multiple data groups and then determines the group characteristic information corresponding to each data group. The group characteristic information can uniquely identify the data group. For example, the terminal can assign a data identifier to each data group as the group characteristic information corresponding to the data group.

[0086] The target vehicle data may include plaintext data of the Internet of Vehicles device to be encrypted. For example, the target vehicle data may be target information that needs to be encrypted, such as user information, configuration files, and vehicle logs in the Internet of Vehicles device.

[0087] Step 106: Use the session key to encrypt the group characteristic information to obtain a first encrypted ciphertext.

[0088] In the embodiment of the present application, the terminal invokes a symmetric encryption algorithm and uses a session key to encrypt the group characteristic information to obtain a first encrypted ciphertext. Specifically, the terminal invokes a symmetric encryption algorithm and uses the session key to encrypt the corresponding group characteristic information of each data group to obtain multiple encryption results, which are used as multiple first encrypted ciphertexts.

[0089] Step 108 : Based on the first encrypted ciphertext, the target vehicle data and the session key, target encrypted information corresponding to the target vehicle data is obtained through a preset encryption strategy.

[0090] In an embodiment of the present application, the terminal encrypts the target vehicle data according to the first encrypted ciphertext and the session key through a preset encryption strategy to obtain target encryption information corresponding to the target vehicle data.

[0091] In the above-mentioned Internet of Vehicles information encryption method, the terminal encrypts the device characteristic information of the Internet of Vehicles device by using the device key to obtain a session key, and then the terminal uses the session key to symmetrically encrypt the target vehicle data through a symmetric encryption algorithm. Through the preset encryption strategy, the target encryption information related to the data group characteristics of the target vehicle data and the device characteristic information can be obtained. Since the characteristic information of each data group is different and the device characteristic information of each user is different, even if the target vehicle data is the same, but the data groups are different and the device characteristic information is different, the encryption result is also different, which can resist statistical analysis attacks, thereby improving the security of the target vehicle data encryption.

[0092] In one embodiment, Figure 2 As shown, step 102 includes:

[0093] Step 202: Obtain device information, application feature information, and device key of the Internet of Vehicles device.

[0094] In an embodiment of the present application, the terminal obtains device information, application feature information and device key of the Internet of Vehicles device.

[0095] The device information of the IoV device may include vehicle device information. For example, the device information may include the unique ID of the IoV device, the MAC (Media Access Control Address, hardware physical address) address of the network card, and the VIN (Vehicle Identification Number, vehicle identification number) code of the vehicle. Optionally, the device information may include one, part, or all of the aforementioned vehicle device information. For example, in one implementation, the unique ID of the IoV device may be used as the device information; in another implementation, the unique ID of the IoV device and the MAC address of the network card may be concatenated as the device information; in another implementation, all vehicle device information, including the unique ID of the IoV device, the MAC address of the network card, and the VIN code of the vehicle, may be concatenated as the final device information.

[0096] Step 204 : Combine the device information and application feature information of the Internet of Vehicles device to obtain device feature information.

[0097] In the embodiment of the present application, the terminal combines the application feature information and the device information in the connected vehicle device to obtain the device feature information. The application feature information may be unique identification information assigned to the connected vehicle system where the target vehicle data resides within the connected vehicle system. For example, the application feature information may be unique identification information of the connected vehicle system, such as a serial number (also known as a system serial number), a UUID (Universally Unique Identifier), or a unique string (e.g., app1.hello.world).

[0098] Step 206: Encrypt the device feature information using the device key through an encryption algorithm to obtain a session key.

[0099] In the embodiment of the present application, the terminal invokes an encryption algorithm to encrypt the device feature information using the device key to obtain an encrypted result. The terminal then determines the data length of the encrypted result. If the data length of the encrypted result is less than or equal to the preset session key length, the encrypted result is used as the session key. If the data length of the encrypted result is greater than the preset session key length, the preset length of the leading portion of the encrypted result data is intercepted and used as the session key.

[0100] Among them, the encryption algorithm can be a one-way hash algorithm (also called a hash algorithm or a hash algorithm), a one-way hash algorithm with a key, a symmetric encryption and decryption algorithm, or a CMAC (Cipher-based Message Authentication Code) algorithm and other algorithms with symmetric encryption functions, or it can be a block encryption algorithm. Any algorithm with encryption function or block encryption function can be applied to this application, and the embodiments of this application do not limit this.

[0101] In this embodiment, the terminal obtains and concatenates device information and application signature information to obtain the device signature information. The terminal then symmetrically encrypts the device signature information to obtain the session key. Because the device and application signature information uniquely identify connected vehicle devices and applications, the device signature information is difficult to decipher by outsiders, thereby improving the security of the session key.

[0102] In one embodiment, Figure 3 As shown, step 104 includes:

[0103] Step 302: Divide the target vehicle data of the Internet of Vehicles device into multiple data groups according to a preset data grouping rule.

[0104] In an embodiment of the present application, the terminal may pre-store preset data grouping rules, and according to the preset data grouping rules, the terminal divides the target vehicle data in the Internet of Vehicles device into multiple data groups.

[0105] The preset data grouping rule is to group a preset number of bytes of target vehicle data into a data group. For example, when the terminal symmetrically encrypts the data using the AES algorithm, since the block length of the AES algorithm is 16 bytes, the preset data grouping rule may be to group each 16 bytes of target vehicle data into a data group.

[0106] Step 304: Obtain storage location information of the data group in the disk.

[0107] In an embodiment of the present application, the terminal obtains the storage location information of each data group in the disk. The location information can be in the form of "file name" + "offset", for example, the string " / home / a.bin" + "100" can be used as the storage location information. Optionally, the terminal can mark each data group and assign a serial number identifier to each data group. For example, the terminal marks the first data group as 1, the second data group as 2, and so on, marking all data groups and using the serial number of each data group as the location information; optionally, the terminal can also call a one-way hash algorithm (i.e., a one-way hash function), calculate the serial number identifier of each data group, and use the calculation result as the location information.

[0108] Step 306: Convert the location information using a preset conversion rule to obtain location information of a target type, and use the location information of the target type as grouping feature information corresponding to the data group.

[0109] In an embodiment of the present application, the terminal may pre-store preset conversion rules, and the terminal converts each character of the location information data into byte type data, and then splices all the byte type data to obtain byte type location information as the target type location information.

[0110] In this embodiment, the terminal divides the target vehicle data according to the preset data grouping rules to obtain multiple data groups. Then, the terminal determines the group feature information corresponding to each data group through the location information of each data group. Since the location information of the data groups is different, different group feature information can be obtained, which can improve the security of the subsequent encryption process.

[0111] In one embodiment, Figure 4 As shown, step 108 includes:

[0112] Step 402 : XOR the first encrypted ciphertext and the target vehicle data to obtain a second encrypted ciphertext.

[0113] In an embodiment of the present application, the terminal matches multiple first encrypted ciphertexts with data groups of target vehicle data one by one, performs XOR processing on each first encrypted ciphertext and the corresponding data group of target vehicle data to obtain multiple second encrypted ciphertexts.

[0114] Among them, the XOR processing can be byte-by-byte XOR. Specifically, for the XOR processing, any algorithm or hardware circuit with a byte-by-byte XOR function can be applied to this application, and the embodiments of this application do not limit this.

[0115] Step 404: Encrypt the second encrypted ciphertext using the session key through a symmetric encryption algorithm to obtain target encrypted information.

[0116] In the embodiment of the present application, the terminal uses a session key to invoke a symmetric encryption algorithm to encrypt multiple second encrypted ciphertexts, obtaining multiple encryption results. The multiple encryption results are then concatenated in a grouping order based on the grouping characteristic information to obtain the target encrypted information. The grouping order refers to the order in which each data group is arranged within all other data groups.

[0117] Among them, the symmetric encryption algorithm can be a one-way hash algorithm (also called a hash algorithm or a hash algorithm), a one-way hash algorithm with a key, a symmetric encryption and decryption algorithm, or a CMAC (Cipher-based Message Authentication Code) algorithm and other algorithms with symmetric encryption functions. Any algorithm with a symmetric encryption function can be applied to this application, and the embodiments of this application are not limited to this.

[0118] In this embodiment, the terminal performs XOR processing on the first encrypted ciphertext and the target vehicle data to obtain a second encrypted ciphertext. The terminal then uses the session key to encrypt the second encrypted ciphertext by calling the symmetric encryption algorithm to complete the encryption process. The two encryption processes of XOR processing and symmetric encryption processing using the session key further improve the security of the encryption process.

[0119] In one embodiment, step 108 further includes:

[0120] In this embodiment of the present application, the terminal uses a session key to encrypt each target vehicle data group by invoking a symmetric encryption algorithm to obtain multiple second encrypted ciphertexts. Then, based on the target vehicle data group, the terminal associates each second encrypted ciphertext with each first encrypted ciphertext and performs an exclusive-OR operation on each second encrypted ciphertext with its corresponding first encrypted ciphertext to obtain multiple processing results. The terminal then concatenates the multiple encryption results in the order of the groups based on the grouping characteristics, resulting in the target encrypted data.

[0121] In this embodiment, two encryption processes are performed on the data packet through XOR processing and symmetric encryption processing using a session key, thereby further improving the security of the encryption process.

[0122] In one embodiment, step 108 further includes:

[0123] In this embodiment of the present application, the terminal performs an exclusive-OR operation on the data group of the target vehicle data and the first encrypted ciphertext to obtain multiple second encrypted ciphertexts. The terminal then invokes a symmetric encryption algorithm and encrypts each second encrypted ciphertext using a session key to obtain multiple third encrypted ciphertexts. The terminal then associates each third encrypted ciphertext with each first encrypted ciphertext, performs an exclusive-OR operation on each third encrypted ciphertext with its corresponding first encrypted ciphertext, and obtains multiple encrypted data. The multiple encrypted data are then concatenated to obtain the target encrypted data.

[0124] In this embodiment, due to the double encryption processing of XOR processing and symmetric encryption processing using the session key, the security of the encryption process is further improved.

[0125] In one embodiment, Figure 5 As shown, the embodiment of the present application also provides a decryption method corresponding to the above-mentioned vehicle network information encryption method, specifically including:

[0126] Step 502: Obtain target encrypted information to be decrypted.

[0127] In an embodiment of the present application, the terminal obtains target encrypted information to be decrypted in the Internet of Vehicles device.

[0128] Step 504 : Based on the session key and the group characteristic information, the target encrypted information is decrypted using a preset decryption strategy to obtain the target vehicle data.

[0129] In an embodiment of the present application, the terminal obtains a pre-stored session key and group characteristic information, and then uses the pre-stored session key to decrypt the group characteristic information, and then the terminal decrypts the target encrypted information based on the decryption result.

[0130] In this embodiment, by processing the target encrypted information, the target encrypted information can be decrypted to obtain the target vehicle data.

[0131] In one embodiment, Figure 6 As shown, step 504 includes:

[0132] Step 602: Use the session key to decrypt the group characteristic information to obtain a first decrypted ciphertext.

[0133] In an embodiment of the present application, the terminal calls a symmetric encryption algorithm and uses a session key to encrypt characteristic information of each group to obtain multiple encryption results. The terminal uses the multiple encryption results as multiple first decrypted ciphertexts.

[0134] Step 604: XOR the first decrypted ciphertext and the target encrypted information to obtain a second decrypted ciphertext.

[0135] In the embodiment of the present application, the terminal divides the target encrypted information into multiple data groups according to a preset data grouping rule. The terminal then associates the multiple first decrypted ciphertexts with the data groups of the target encrypted information, performs an exclusive OR operation on each first decrypted ciphertext and its corresponding data group of the target encrypted information, and uses the multiple processing results as multiple second decrypted ciphertexts.

[0136] The preset data grouping rule is to group a preset number of bytes of target encrypted information into a data group. For example, when the terminal symmetrically decrypts each data using the AES algorithm, since the block length of the AES algorithm is 16 bytes, the preset data grouping rule may be to group each 16 bytes of target encrypted information into a data group.

[0137] Step 606: Decrypt the second decrypted ciphertext using the session key through a symmetric decryption algorithm to obtain the target vehicle data.

[0138] In an embodiment of the present application, the terminal uses a session key to decrypt multiple second decrypted ciphertexts separately by calling a symmetric decryption algorithm to obtain multiple decrypted information. The terminal splices the multiple decrypted information in the grouping order according to the grouping feature information to obtain the target encrypted information, that is, the target vehicle data before encryption.

[0139] In this embodiment, the first decrypted ciphertext and the second decrypted ciphertext are obtained by the terminal, and the target encrypted information is decrypted according to the session key and the group characteristic information, thereby achieving the effect of decrypting the target encrypted information.

[0140] In one embodiment, step 504 further includes:

[0141] In an embodiment of the present application, the terminal divides the target encrypted information into multiple data groups according to a preset data grouping rule. Then, the terminal calls a symmetric encryption algorithm and uses a session key to encrypt the characteristic information of each group to obtain multiple encryption results. The terminal uses the multiple encryption results as multiple first decrypted ciphertexts. Then, the terminal uses the session key to decrypt the data group of the target encrypted information by calling a symmetric decryption algorithm to obtain multiple decryption results. The terminal uses the multiple decryption results as multiple second decrypted ciphertexts. The terminal matches the first decrypted ciphertext to the second decrypted ciphertext one by one, and performs XOR processing on each first decrypted ciphertext and its corresponding second decrypted ciphertext to obtain multiple processing results. The terminal then splices the multiple processing results in the order of the processing results to obtain the target vehicle data before encryption.

[0142] In this embodiment, the first decrypted ciphertext and the second decrypted ciphertext are obtained through the terminal, and the target encrypted information is symmetrically decrypted using the session key according to the group characteristic information, thereby achieving the effect of decrypting the target encrypted information.

[0143] In one embodiment, step 504 further includes:

[0144] In an embodiment of the present application, the terminal divides the target encrypted information into multiple data groups according to a preset data grouping rule. The terminal then invokes a symmetric encryption algorithm and encrypts the characteristic information of each group using a session key, obtaining multiple encryption results. The terminal then uses the multiple encryption results as multiple first decrypted ciphertexts. The terminal then associates the multiple first decrypted ciphertexts with the data groups of the target encrypted information, performs an exclusive OR operation on each first decrypted ciphertext and its corresponding data group of the target encrypted information, obtaining multiple processing results, and uses the multiple processing results as multiple second decrypted ciphertexts.

[0145] Then, the terminal calls the symmetric decryption algorithm and uses the session key to decrypt multiple second decrypted ciphertexts to obtain multiple decryption results. The multiple decryption results are used as multiple third decrypted ciphertexts. The terminal matches each first decrypted ciphertext with each third decrypted ciphertext one by one, and performs XOR processing on each first decrypted ciphertext and the corresponding third decrypted ciphertext to obtain multiple processing results. The terminal then splices the multiple processing results in the processing order to obtain the target vehicle data before encryption.

[0146] In this embodiment, the first decrypted ciphertext and the second decrypted ciphertext are obtained through the terminal, and the target encrypted information is symmetrically decrypted using the session key according to the group characteristic information, thereby achieving the effect of decrypting the target encrypted information.

[0147] In one embodiment, an example of a processing process of a method for encrypting information in an Internet of Vehicles is also provided, and the specific contents include:

[0148] In step A1, the terminal obtains device information, application feature information, and device key of the Internet of Vehicles device.

[0149] In step A2, the terminal combines the application feature information and the device information in the Internet of Vehicles device to obtain the device feature information.

[0150] In step A3, the terminal encrypts the device feature information using the device key by calling the encryption algorithm to obtain an encryption result, and processes the encryption result according to preset rules as the session key.

[0151] In step A4, the terminal may pre-store a preset data grouping rule. According to the preset data grouping rule, the terminal divides the target vehicle data in the Internet of Vehicles device into multiple data groups.

[0152] In step A5, the terminal obtains the storage location information of each data group on the disk. The location information can be in the form of "file name" + "offset", for example, the string " / home / a.bin" + "100" can be used as the storage location information. Optionally, the terminal can mark each data group and assign a serial number identifier to each data group. For example, the terminal marks the first data group as 1, the second data group as 2, and so on, marking all data groups and using the serial number of each data group as the location information; optionally, the terminal can also call a one-way hash algorithm (i.e., a one-way hash function) to calculate the serial number identifier of each data group, and use the calculation result as the location information.

[0153] In step A6, the terminal may pre-store preset conversion rules, and the terminal converts each character of the location information data into byte type data, and then splices all the byte type data according to the data order of the location information data to obtain byte type location information as the target type location information.

[0154] In step A7, the terminal uses a session key to encrypt the corresponding group characteristic information of each data group by calling a symmetric encryption algorithm to obtain multiple encryption results, and uses the multiple encryption results as multiple first encrypted ciphertexts.

[0155] In step A8, the terminal makes a one-to-one correspondence between the multiple first encrypted ciphertexts and the data groups of the target vehicle data, and performs an XOR process on each first encrypted ciphertext and the corresponding data group of the target vehicle data to obtain multiple second encrypted ciphertexts.

[0156] In step A9, the terminal encrypts multiple second encrypted ciphertexts using a session key by calling a symmetric encryption algorithm to obtain multiple encryption results, and concatenates the multiple encryption results in the order of the second encrypted ciphertexts corresponding to the encryption results to obtain target encrypted information.

[0157] In one embodiment, an example of a processing process of a method for decrypting information of an Internet of Vehicles is also provided, and the specific contents include:

[0158] In step B1, the terminal obtains target encrypted information to be decrypted in the Internet of Vehicles device.

[0159] In step B2, the terminal divides the target encrypted information into multiple data groups according to a preset data grouping rule. Then, the terminal invokes a symmetric encryption algorithm and encrypts the characteristic information of each group using the session key to obtain multiple encryption results, which the terminal uses as multiple first decrypted ciphertexts.

[0160] In step B3, the terminal matches the multiple first decrypted ciphertexts with the data groups of the target encrypted information one by one, performs XOR processing on each first decrypted ciphertext and the corresponding data group of the target encrypted information, and uses the multiple processing results as multiple second decrypted ciphertexts.

[0161] In step B4, the terminal calls the symmetric decryption algorithm and uses the session key to decrypt multiple second decrypted ciphertexts to obtain multiple decrypted information. The terminal splices the multiple decrypted information in the order of the second decrypted ciphertexts corresponding to the decrypted information to obtain the target encrypted information, that is, the target vehicle data before encryption.

[0162] In this embodiment, based on the group characteristic information corresponding to each data group, the terminal can use the session key to encrypt and decrypt the corresponding position target encryption information for the corresponding group characteristic information of each data group, which can solve the problem that the CBC encryption mode (Cipher Block Chaining, mode ciphertext group chaining mode) encryption cannot perform parallel operations. It can also solve the problem that the CBC encryption mode only needs to encrypt and decrypt part of the data, but the decryption needs to start from the first group of the ciphertext, thereby improving the encryption and decryption efficiency.

[0163] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0164] Based on the same inventive concept, embodiments of the present application also provide a vehicle network information encryption device for implementing the vehicle network information encryption method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more vehicle network information encryption device embodiments provided below can be found in the limitations of the vehicle network information encryption method described above and will not be repeated here.

[0165] In one embodiment, Figure 7 As shown, a vehicle network information encryption device 700 is provided, including: a first encryption module 702, a determination module 704, a second encryption module 706 and a third encryption module 708, wherein:

[0166] The first encryption module 702 is used to obtain device characteristic information and a device key of the Internet of Vehicles device, and encrypt the device characteristic information using the device key to obtain a session key;

[0167] A determination module 704 is configured to divide the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to a preset data grouping rule, and determine group feature information corresponding to each of the data groups;

[0168] A second encryption module 706 is configured to encrypt the group characteristic information using the session key to obtain a first encrypted ciphertext;

[0169] The third encryption module 708 is configured to obtain target encryption information corresponding to the target vehicle data through a preset encryption strategy based on the first encrypted ciphertext, the target vehicle data, and the session key.

[0170] In the above-mentioned Internet of Vehicles information encryption device, a session key is obtained by encrypting the device characteristic information of the Internet of Vehicles device using a device key, and the target vehicle data is encrypted using the group characteristic information using the session key. Through a preset encryption strategy, target encryption information related to the data group characteristics of the target vehicle data and the device characteristic information can be obtained. Since the characteristic information of each data group is different and the device characteristic information of each user is different, even if the target vehicle data is the same, but the data groups are different and the device characteristic information is different, the encryption results are also different, which can resist statistical analysis attacks, thereby improving the security of the target vehicle data encryption.

[0171] In one embodiment, the first encryption module 702 is specifically configured to:

[0172] Obtain device information, application feature information, and device keys of connected vehicle devices;

[0173] Concatenating the characteristic information of the Internet of Vehicles device and the application characteristic information to obtain the device characteristic information;

[0174] The device characteristic information is encrypted using the device key through an encryption algorithm to obtain the session key.

[0175] In one embodiment, the determining module 704 is specifically configured to:

[0176] For each of the data packets, obtaining storage location information of the data packet in the disk;

[0177] The storage location information is converted according to a preset conversion rule to obtain location information of a target type, and the storage location information of the target type is used as group feature information corresponding to the data group.

[0178] In one embodiment, the third encryption module 708 is specifically configured to:

[0179] XORing the first encrypted ciphertext and the target vehicle data to obtain a second encrypted ciphertext;

[0180] The second encrypted ciphertext is encrypted using the session key through a symmetric encryption algorithm to obtain the target encrypted information.

[0181] In one embodiment, the apparatus further comprises:

[0182] An acquisition module, used to obtain target encrypted information to be decrypted;

[0183] The decryption module is used to decrypt the target encrypted information based on the session key and the group characteristic information through a preset decryption strategy to obtain the target vehicle data.

[0184] In one embodiment, the first decryption module is specifically configured to:

[0185] Decrypting the group characteristic information using the session key to obtain a first decrypted ciphertext;

[0186] Performing an XOR operation on the first decrypted ciphertext and the target encrypted information to obtain a second decrypted ciphertext;

[0187] The second decrypted ciphertext is decrypted using the session key through a symmetric decryption algorithm to obtain the target vehicle data.

[0188] Each module in the aforementioned IoV information encryption device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device's memory in software form, allowing the processor to call and execute the corresponding operations of each module.

[0189] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for encrypting information in the Internet of Vehicles is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0190] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0191] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned vehicle network information encryption method when executing the computer program.

[0192] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned vehicle network information encryption method are implemented.

[0193] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above-mentioned vehicle network information encryption method when executed by a processor.

[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0195] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0196] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0197] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for encrypting information in an Internet of Vehicles, characterized in that: The method comprises: Obtain device information, application feature information, and device keys of connected vehicle devices; Joining the device information and the application characteristic information of the Internet of Vehicles device to obtain device characteristic information; Encrypting the device characteristic information using the device key through an encryption algorithm to obtain a session key; According to a preset data grouping rule, the target vehicle data of the Internet of Vehicles device is divided into a plurality of data groups, and for each of the data groups, storage location information of the data group in the disk is obtained; the storage location information is converted according to a preset conversion rule to obtain location information of a target type, and the location information of the target type is used as group feature information corresponding to the data group; Encrypting the group characteristic information using the session key to obtain a first encrypted ciphertext; Performing an XOR operation on each of the first encrypted ciphertexts and the corresponding data group to obtain a plurality of second encrypted ciphertexts; A symmetric encryption algorithm is called to encrypt the plurality of second encrypted ciphertexts to obtain a plurality of encryption results, and the plurality of encryption results are concatenated in a grouping order according to the grouping characteristic information to obtain target encrypted information.

2. The method according to claim 1, characterized in that The method further comprises: Obtain target encrypted information to be decrypted; Based on the session key and the group characteristic information, the target encrypted information is decrypted using a preset decryption strategy to obtain the target vehicle data.

3. The method according to claim 2, characterized in that The method of decrypting the target encrypted information based on the session key and the group characteristic information using a preset decryption strategy to obtain the target vehicle data includes: Decrypting the group characteristic information using the session key to obtain a first decrypted ciphertext; Performing an XOR operation on the first decrypted ciphertext and the target encrypted information to obtain a second decrypted ciphertext; The second decrypted ciphertext is decrypted using the session key through a symmetric decryption algorithm to obtain the target vehicle data.

4. A vehicle network information encryption device, characterized in that: The device comprises: A first encryption module is configured to obtain device information, application feature information, and a device key of an Internet of Vehicles device; concatenate the device information and the application feature information of the Internet of Vehicles device to obtain device feature information; and encrypt the device feature information using the device key using an encryption algorithm to obtain a session key; a determination module, configured to divide the target vehicle data of the Internet of Vehicles device into a plurality of data groups according to a preset data grouping rule, and determine group characteristic information corresponding to each of the data groups; obtain, for each of the data groups, storage location information of the data group in the disk; convert the storage location information according to a preset conversion rule to obtain location information of a target type, and use the location information of the target type as the group characteristic information corresponding to the data group; a second encryption module, configured to encrypt the group characteristic information using the session key to obtain a first encrypted ciphertext; a third encryption module, configured to perform an XOR operation on each of the first encrypted ciphertexts and the corresponding data group to obtain a plurality of second encrypted ciphertexts; A symmetric encryption algorithm is called to encrypt the plurality of second encrypted ciphertexts to obtain a plurality of encryption results, and the plurality of encryption results are concatenated in a grouping order according to the grouping characteristic information to obtain target encrypted information.

5. The device according to claim 4, characterized in that The device further comprises: An acquisition module, used to obtain target encrypted information to be decrypted; The decryption module is used to decrypt the target encrypted information based on the session key and the group characteristic information through a preset decryption strategy to obtain the target vehicle data.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Storage data protection method and device

    CN110457924A

  • Encryption continuous transmission method with key negotiation function

    CN111447276A

  • Vehicle information verification method and device and computer readable storage medium

    CN111935317A