Signature method and system, electronic equipment and vehicle

By dynamically selecting the signature key during the transmission process and performing signature verification, the problem that a single secret key in the traditional signature algorithm is easily cracked is solved, and communication security and flexibility are improved.

CN119766459APending Publication Date: 2025-04-04GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411970529.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In traditional signature algorithms, there is a security risk using a single signature key. Once the secret key is cracked, the security of the entire signature mechanism will be affected.

Method used

By modulo operation of the timestamp and the length of the signature key group, the target signature key is dynamically selected, and signature verification is performed between the vehicle and the cloud, ensuring that the service data has not been tampered with during transmission.

Benefits of technology

Increases the security of communication, even if a certain signature key is leaked, the security of the communication process is improved and the impact of the leakage is limited because each operation uses a different target signature key.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766459A_ABST
    Figure CN119766459A_ABST
Patent Text Reader

Abstract

The invention provides a signature method and system, electronic equipment and a vehicle, and is applied to the technical field of data security, and the method comprises the steps: obtaining a timestamp of a current moment in response to a received service data sending request; performing modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation; and determining a vehicle end signature according to the application key, the target signature key and the service data, and sending the application key, the timestamp, the vehicle end signature and the service data to a cloud server. According to the method, the target signature key is dynamically selected by performing modulo operation on the timestamp and the signature key group length, so that the communication security is improved, and even if a certain target signature key is leaked, the security of the communication process is improved due to the fact that different target signature keys are used in each operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a signature method, system, electronic device and vehicle. Background Art

[0002] In traditional signature algorithms, signature keys are used as the key element to generate signatures. Although this can ensure the security of communications to a certain extent, it has some significant defects and risks. In traditional methods, a single signature key is used. Once the signature key is cracked, the security of the entire signature mechanism will be affected. Summary of the invention

[0003] In view of this, the purpose of this application is to propose a signature method, system, electronic device and vehicle to enhance the security of communications.

[0004] Based on the above purpose, this application provides a signing method, including:

[0005] In response to receiving a request to send business data, obtaining a timestamp of the current moment;

[0006] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0007] The vehicle-side signature is determined based on the application key, target signature key and business data, and the application key, timestamp, vehicle-side signature and business data are sent to the cloud server, so that the cloud server determines the cloud signature based on the application key, timestamp and business data, and when the cloud signature is consistent with the vehicle-side signature, determines that the business data has not been tampered with.

[0008] Based on the above purpose, the present application provides a signature system, including: a vehicle controller and a cloud server;

[0009] The vehicle controller is configured to, in response to receiving a request to send service data, obtain a timestamp of a current moment;

[0010] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0011] Determine the vehicle-side signature according to the application key, the target signature key and the business data, and send the application key, timestamp, vehicle-side signature and business data to the cloud server;

[0012] The cloud server is configured to, in response to receiving an application key, a timestamp, a vehicle-side signature, and service data sent by a vehicle controller, determine a corresponding signature key group according to the application key;

[0013] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0014] Determine the cloud signature based on the application key, the target signature key and the business data;

[0015] In response to determining that the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with.

[0016] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.

[0017] Based on the same inventive concept, the present application also provides a vehicle, which includes the above-mentioned electronic device.

[0018] As can be seen from the above, the signature method, system, electronic device and vehicle provided by the present application, wherein the method includes: in response to receiving a request to send business data, obtaining the timestamp of the current moment; performing a modulo operation on the timestamp and the length of the signature key group, and determining the corresponding target signature key in the signature key group based on the first modulo value obtained by the modulo operation, to ensure that the process of selecting a signature key from the signature key group is random; determining the vehicle-side signature according to the application key, the target signature key and the business data, and sending the application key, timestamp, vehicle-side signature and business data to the cloud server, so that the cloud server determines the cloud signature according to the application key, timestamp and business data, and determines that the business data has not been tampered with when the cloud signature is consistent with the vehicle-side signature; after receiving this information, the cloud server uses the same application key and target signature key, combined with the received business data, to calculate the cloud signature. If the cloud signature is consistent with the vehicle-side signature, it means that the business data has not been tampered with during the transmission process and is complete and authentic. The target signature key is dynamically selected by performing a modulo operation between the timestamp and the signature key group length, thereby increasing the security of communication. Even if a target signature key is leaked, a different target signature key is used for each operation, thereby increasing the security of the communication process. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 The process of the signature method of this application embodiment Figure 1 ;

[0021] Figure 2 The process of the signature method of this application embodiment Figure 2 ;

[0022] Figure 3 A schematic diagram of a signature device according to an embodiment of the present application;

[0023] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0025] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0026] In the related art, in the traditional signature algorithm, the application key and signature key assigned to the application in the cloud are used as key elements to generate the signature. Although this method can ensure the security of the interface to a certain extent, it has some significant defects and risks: In the traditional method, the signature is usually fixed, which means that once the algorithm is cracked or has defects, the security of the entire signature mechanism will be affected. In the traditional signature mechanism, a single signature key is used, which limits the flexibility and adaptability of the system in dealing with different security requirements. For example, when faced with scenarios with higher security requirements, a single key may not provide sufficient security. At the same time, once the signature key is leaked, the security of the entire signature system will be seriously threatened. Because the signature key is the key to generating the signature, after leakage, malicious users can use it to forge signatures, and then may access or operate the protected interface.

[0027] Based on the above problems, the applicant found that: in response to receiving a request to send business data, the timestamp of the current moment is obtained; the timestamp is modulo-operated with the length of the signature key group, and the corresponding target signature key is determined in the signature key group based on the first modulo value obtained by the modulo operation; the vehicle-side signature is determined according to the application key, the target signature key and the business data, and the application key, timestamp, vehicle-side signature and business data are sent to the cloud server, so that the cloud server determines the cloud signature according to the application key, timestamp and business data, and when the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with. By dynamically selecting the target signature key by performing a modulo operation on the timestamp and the length of the signature key group, the security of the communication is increased. Even if a signature key is leaked, the impact of the leak is limited to a minimum range because a different key may be used for each operation.

[0028] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0029] In some embodiments, Figure 1 As shown, a signing method is applied to a vehicle controller, the vehicle controller stores an application key and a signature key group, the signature key group includes at least one signature key, and the method includes:

[0030] S101, in response to receiving a request to send service data, obtaining a timestamp of the current moment;

[0031] In practice, a timestamp is a digital code that records the moment a specific event or data was generated. In the signing process, timestamps are used to ensure the timeliness of data and prevent replay attacks. A replay attack is when an attacker resends a previously captured data packet in an attempt to perform an operation as a legitimate user. By including a timestamp, the timeliness of the request can be checked, and the request can be rejected if it exceeds the allowed time window. In the signing process, using a timestamp with business data can increase the uniqueness of the signature. Even for the same data content, different timestamps will result in different signature results. Even if the data is intercepted, the same signature cannot be reused for attacks at other times. In this step, when the vehicle controller receives a request to send business data, it first obtains the current system time as a timestamp. The timestamp will be used as part of the subsequent signature calculation. To ensure the validity of the timestamp, the system time between the vehicle controller and the cloud server needs to be synchronized. Excessive time deviation may cause legitimate requests to be mistakenly identified as expired requests. Timestamps are not only used for security verification, but can also be used for logging and auditing. By recording the timestamp of each request, system administrators can track the specific time when the event occurred, helping to analyze problems and optimize system performance. Obtaining the timestamp of the current moment is a key step designed to enhance communication security and prevent data tampering and replay attacks. It is the basis for ensuring secure communication between the vehicle controller and the cloud server.

[0032] S102, performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0033] In specific implementation, a suitable signature key is dynamically selected from a signature key group containing multiple signature keys. The security of the system is increased because even if a signature key is leaked, communication security can still be maintained as long as it is replaced in time. Modulo operation is used to find the remainder of the division of two numbers. In this step, the process used to ensure that the key selection from the signature key group is random. The modulo operation result of the timestamp and the length of the signature key group (the first modulo value) will be used as an index to select a specific signature key from the key group. The length of the signature key group refers to the number of signature keys contained in the group. This number determines the divisor of the modulo operation, thereby affecting the range of the modulo result. Based on the modulo result of the timestamp and the length of the signature key group, an exact index position can be determined, and the signature key corresponding to the index position will be selected as the target signature key for the current operation. For example, if the modulo result is 3, then the fourth key in the signature key group (index starts from 0) will be selected for the next signing process. By using the timestamp as part of the modulo operation, each operation may use a different signature key. Even if the signature key in a certain operation is leaked, it will not affect the security of other operations, and it can also prevent attackers from predicting or reusing old signatures. In addition, security policies can be adjusted by simply adding or removing keys from the signature key group, or reordering the signature keys in the signature key group. This not only enhances the security of the system, but also provides operational flexibility and scalability, and can more effectively resist potential security threats.

[0034] S103. Determine the vehicle-side signature according to the application key, target signature key and business data, and send the application key, timestamp, vehicle-side signature and business data to the cloud server, so that the cloud server determines the cloud signature according to the application key, timestamp and business data, and determines that the business data has not been tampered with when the cloud signature is consistent with the vehicle-side signature.

[0035] In specific implementation, the application key is usually a public unique identifier used to identify the initiator of the request. The target signature key is a confidential key used to generate the signature. These two keys ensure that only the two parties who know the key can verify the authenticity of the signature during the signature generation process. The vehicle-side signature is generated by a predefined algorithm (such as HMAC, SHA256, etc.), which combines the application key, target signature key and business data. The vehicle-side signature is essentially a secure encapsulation of the sent data to ensure that the data has not been tampered with during transmission. After generating the vehicle-side signature, the vehicle controller sends the application key, timestamp, vehicle-side signature and business data to the cloud server. The timestamp is used to verify the timeliness of the request and prevent replay attacks. After receiving this information, the cloud server uses the same application key and target signature key, combined with the received business data, to recalculate the signature. If the recalculated signature is consistent with the vehicle-side signature, it means that the data has not been tampered with during transmission and is complete and authentic. Even if the data is intercepted during transmission, without the corresponding target signature key, the attacker cannot tamper with the data without being discovered.

[0036] In this embodiment, the target signature key is dynamically selected by performing a modulo operation between the timestamp and the length of the signature key group, thereby increasing the security of the system. Even if a signature key is leaked, the impact of the leak is limited to a minimum because a different key may be used for each operation. The security policy can be changed by simply adjusting the signature key group, such as adding new keys or removing old keys, or reordering existing keys. This provides the system with a high degree of flexibility and scalability, enabling it to adapt to changing security requirements and threat environments. The application key is used as a public unique identifier to identify the initiator of the request, while the target signature key is used as a confidential key to generate the signature. The combination of the two effectively verifies the identity and authorization status of both parties.

[0037] In some embodiments, Figure 2 As shown, before performing a modulo operation on the timestamp and the length of the signature key group, the method includes:

[0038] S201, in response to determining that there is a risk of leakage of the target signature key, determining a target sorting strategy and a sorting identification code corresponding to the target sorting strategy in at least one sorting strategy;

[0039] In specific implementation, when it is detected that the target signature key may be leaked, measures need to be taken to prevent potential security threats. If there is only one sorting strategy, the sorting strategy is determined as the target sorting strategy and the sorting identification code corresponding to the target sorting strategy is determined; if there are multiple sorting strategies, a target sorting strategy and a sorting identification code corresponding to the target sorting strategy are determined from the multiple sorting strategies; the sorting strategy refers to a method for reordering an existing signature key group. The vehicle controller can set a variety of different sorting strategies, each of which rearranges the order of signature keys according to different rules or algorithms. Among the multiple available sorting strategies, a suitable strategy will be selected as the target sorting strategy according to the current security requirements and environment. Each sorting strategy has a corresponding sorting identification code. The sorting identification code is an identifier used to indicate which sorting strategy is currently being used in communication and operation, so that the cloud server uses the same target sorting strategy to rearrange the order of signature keys, thereby determining the corresponding target signature key. Once the target sorting strategy is determined, the signature key group will be reordered according to the rules of this strategy, disrupting the original order of the signature keys. This way, even if the security of some signature keys has been threatened, the reordered signature key group increases the difficulty for attackers to attack and still maintains a high level of security.

[0040] S202, reordering at least one signature key in the signature key group according to the target sorting strategy to obtain a reordered signature key group;

[0041] In specific implementation, when there are multiple signature keys in the signature key group, the multiple signature keys in the signature key group are reordered according to the target sorting strategy, which may include randomly shuffling the keys or sorting them according to a specific pattern. Through reordering, even if the security of some signature keys has been threatened, the overall security of the system is still guaranteed. The reordering disrupts the original signature key usage pattern, increasing the difficulty for potential attackers to parse and exploit leaked keys. It is important that both the vehicle controller and the cloud server must operate using the same sorting strategy to ensure consistency between the two parties when verifying signatures. This is usually achieved by attaching a sorting identification code when sending business data, which tells the cloud which sorting strategy should be adopted. Dynamic and flexible signature key management can more effectively protect business data from unauthorized access and tampering, while improving the ability to respond to internal or external threats.

[0042] Correspondingly, after determining the vehicle-side signature according to the application key, the target signature key and the business data, it also includes:

[0043] The application key, timestamp, vehicle-side signature, business data and the sorting identification code corresponding to the target sorting strategy are sent to the cloud server.

[0044] In specific implementation, after the vehicle controller completes the processing of the signature and other related data, it sends the application key, timestamp, vehicle-side signature, business data, and the sorting identification code of the currently used sorting strategy to the cloud server. After receiving this information, the cloud server can use the same sorting identification code to identify and execute the corresponding sorting strategy to ensure that the signature process obtained by both parties is consistent.

[0045] In this embodiment, the reordering disrupts the original signature key selection pattern, increasing the difficulty for potential attackers to parse and exploit leaked keys. Even if the security of some signature keys has been threatened, the reordered signature key group increases the difficulty for attackers to attack while still maintaining a high level of security.

[0046] In some embodiments, if there are multiple signature keys in the signature key group, reordering the multiple signature keys in the signature key group according to the target sorting strategy includes:

[0047] Determine the corresponding target character in each signature key according to the target parameter; the target parameter is the second modulus value of the timestamp and the length of the single signature key, or a random number;

[0048] In specific implementation, the corresponding target character in each signature key is determined according to a target parameter. The target parameter can be the modulus value of the timestamp and the length of a single signature key (the second modulus value), or a random number. The selection of the target character depends on the target parameter. Different target parameters will result in the selection of different target characters, thereby affecting the order of the keys.

[0049] Arrange the multiple signature keys in order according to the size of the target character;

[0050] In specific implementation, when the target characters in each signature key are determined, all signature keys will be arranged in order according to the size of the target characters, which can be arranged in order from small to large or from large to small; this ensures that the order of signature key usage is dynamic and unpredictable, increasing security, especially in the face of potential key leakage risks. When the second modulus value of the timestamp and the length of a single signature key is used as the target parameter, the dynamic nature of the sorting mainly depends on the moment when the request to send the business data is received. When a random number is used as the target parameter, the randomness of the sorting is more significant because the unpredictability of the random number directly affects the selection and sorting of the key.

[0051] When the target parameter is a random number, after determining the vehicle-side signature according to the application key, the target signature key and the business data, the method further includes:

[0052] The application key, timestamp, vehicle-side signature, business data, sorting identification code and the random number are sent to the cloud server.

[0053] In specific implementation, after the vehicle controller determines the vehicle-side signature, in addition to sending the application key, timestamp, vehicle-side signature and business data, it also needs to send the sorting identification code and the random number used (if the random number is used as the target parameter), allowing the cloud server to use the same sorting identification code to identify and execute the corresponding sorting strategy, ensuring that the signature process obtained by both parties is consistent; greatly enhancing the security of the signing process. Even if an attacker obtains the data and target signature key at a certain point in time, they cannot predict the signature key order at other points in time due to the difference in random numbers or timestamps.

[0054] In this embodiment, by dynamically reordering the signature keys, the unpredictability of the signature keys is increased, so that even if an attacker obtains certain internal information, it is difficult to use this information to carry out an effective attack. In a traditional static key system, once a key is leaked, the security of the entire system is threatened. In this dynamically ordered system, even if a signature key is leaked, the leaked key may soon no longer be used because the order in which the signature keys are used is constantly changing, thereby limiting the impact of the leak.

[0055] In some embodiments, the first modulus value includes a first sub-modulus value, a second sub-modulus value, and a third sub-modulus value; performing a modulus operation on the timestamp and the length of the signature key group, and determining the corresponding target signature key in the signature key group based on the first modulus value obtained by the modulus operation, includes:

[0056] Convert the timestamp to a date and time, and determine the hours, minutes, and seconds in the date and time;

[0057] During specific implementation, the timestamp is converted into a specific date and time format, so that specific hours, minutes and seconds can be extracted from the date and time for subsequent modulo operations.

[0058] Perform a modulo operation on the number of hours and the length of the signature key group to obtain a first sub-modulo value, perform a modulo operation on the number of minutes and the length of the signature key group to obtain a second sub-modulo value, and perform a modulo operation on the number of seconds and the length of the signature key group to obtain a third sub-modulo value;

[0059] In specific implementation, modulo operations are performed for hours, minutes, and seconds respectively. The base of the modulo operation is the length of the signature key group, which ensures that the modulo value is always within the valid index range of the key group. The modulo result of each time number is called a sub-modulo value (first sub-modulo value, second sub-modulo value, third sub-modulo value), and each sub-modulo value corresponds to a specific signature key in the signature key group.

[0060] According to the first sub-modulus value, the second sub-modulus value and the third sub-modulus value, the corresponding first sub-signature key, second sub-signature key and third sub-signature key are respectively determined in the signature key group, and the first sub-signature key, the second sub-signature key and the third sub-signature key are concatenated to obtain a target signature key.

[0061] In specific implementation, according to each sub-modulus value, the corresponding signature key (first sub-signature key, second sub-signature key, third sub-signature key) is selected from the signature key group. The selected signature keys will be spliced ​​together to form the target signature key used for signing, which increases the complexity and randomness of the signature key, thereby improving the security of the entire signing process and greatly increasing the difficulty of predicting and copying signatures. Even if an attacker obtains the signature key at a certain moment, due to the change of time, this information will not be available in future signing processes. In addition, the splicing of the keys ensures that even if part of the key is leaked, the security of the entire target signature key is still guaranteed.

[0062] In this embodiment, a corresponding signature key is selected from the signature key group according to each sub-modulus value, and the selected signature keys are spliced ​​together to form a target signature key ultimately used for signing, thereby increasing the complexity and randomness of the signature key, thereby improving the security of the entire signing process, greatly increasing the difficulty of predicting and copying signatures, and ensuring the security of communications.

[0063] In some embodiments, the signing method is applied to a cloud server; the cloud server stores at least one signing key group, each signing key group includes at least one signing key; the method includes:

[0064] In response to receiving the application key, timestamp, vehicle-side signature and service data sent by the vehicle controller, determining a corresponding signature key group according to the application key;

[0065] In specific implementation, the cloud server first responds to the information sent by the vehicle controller and receives a data packet containing the application key, timestamp, vehicle-side signature, and business data. These data are sent by the vehicle controller after performing a local signing operation and are used for corresponding verification in the cloud. The cloud server uses the received application key to determine the corresponding signature key group. Each application key is associated with a specific signature key group on the server side. The signature key group contains at least one signature key, which is pre-set and stored in the cloud server and is used to perform the signature verification process. Selecting the correct signature key group is the key to ensuring the correctness of the subsequent verification process. By associating different application keys with different signature key groups, the cloud server can provide customized security services for different vehicle controllers or applications. Managing signature key groups requires precise configuration and maintenance to ensure that each signature key group is updated and secure. When any key leaks or security issues are discovered, they can be replaced or updated quickly without affecting other groups.

[0066] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0067] In specific implementation, the cloud server uses the received timestamp and the length of the signature key group to perform a modulo operation, and the result of the modulo operation (the first modulo value) is used as an index to select a specific signature key from the signature key group, that is, the target signature key. For example, if the modulo result is 3, then the fourth key in the signature key group (assuming the index starts from 0) is selected as the target signature key.

[0068] Determine the cloud signature based on the application key, the target signature key and the business data;

[0069] In specific implementation, the cloud signature is also used in subsequent verification steps to confirm whether the vehicle-side signature sent by the vehicle controller is consistent with the signature generated by the cloud, to determine whether the business data sent from the vehicle controller has not been tampered with during transmission, and to ensure that the source of the data is trustworthy.

[0070] In response to determining that the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with.

[0071] In specific implementation, if the cloud signature is consistent with the vehicle-side signature, it indicates that the business data has not been tampered with during transmission and is indeed sent by a legitimate vehicle controller with the corresponding target signature key. The consistency of the signature is the key to verifying the integrity and source of the data. The signature mechanism ensures that only entities that know the correct signature key can generate a valid signature, so the matching of the signature directly proves the legitimacy and security of the data. Once the signature is verified to be consistent, the cloud server can safely process the business data and perform operations such as updating the database and executing control commands. If the signatures are inconsistent, the cloud server needs to reject the data and may trigger a security alarm, because this may be an attack or a sign that the data has been tampered with during transmission. Regularly updating the signature key and application key can further enhance the security of the system. Doing so can prevent security risks caused by the signature key being cracked or used for a long time. The cloud server can also implement additional security measures, such as IP filtering, frequency limiting, etc. to prevent malicious attacks. The process of determining that the cloud signature is consistent with the vehicle-side signature is a key step in verifying the authenticity and integrity of the data, allowing the cloud server to trust the received data and securely perform related business operations based on it.

[0072] In this embodiment, the cloud server selects the correct signature key group by determining the corresponding signature key group in the application key, and performs a modulo operation on the timestamp and the length of the signature key group in the same manner as the vehicle controller, and determines the corresponding target signature key in the signature key group based on the first modulo value obtained by the modulo operation, thereby ensuring the consistency of the target signature key determination process between the cloud server and the vehicle controller, and ensuring the correctness of the subsequent signature verification process.

[0073] In some embodiments, if there are multiple signature keys in the signature key group, after determining the corresponding signature key group according to the application key, the method further includes:

[0074] In response to receiving the sorting identification code sent by the vehicle controller, multiple signature keys in the signature key group are reordered according to the target sorting strategy corresponding to the sorting identification code to obtain a reordered signature key group.

[0075] In specific implementation, the vehicle controller will also send a sorting identification code when sending the application key, timestamp, vehicle-side signature and business data. The sorting identification code is selected by the vehicle controller based on the current security policy or other factors to indicate which signature key sorting strategy to use. The cloud server uses the received sorting identification code to determine which target sorting strategy to apply. Each sorting identification code corresponds to a preset signature key sorting method. According to the determined target sorting strategy, the cloud server reorders the stored signature key group. The reordered signature key group will be used in the subsequent signature verification process. By dynamically adjusting the order of signature keys in response to the sorting identification code, the cloud server can adapt to the ever-changing security environment and potential threats. The vehicle controller and the cloud server use the same key sorting strategy during the signature verification process. The sorting identification code sent by the vehicle controller is used to ensure the consistency of the target signature key selection when verifying the signature.

[0076] In this embodiment, dynamically adjusting the order of signature keys increases the unpredictability of the target signature key, making it difficult for attackers to predict which signature key will be used in the next communication, thereby greatly increasing the difficulty of the attack. The vehicle controller and the cloud server use the same signature key ordering strategy, which ensures the consistency of operations between the two parties during the signature verification process.

[0077] In some embodiments, reordering the multiple signature keys in the signature key group according to the target ordering strategy includes:

[0078] In response to receiving a random number sent by the vehicle controller, determining a corresponding target character in each signature key according to the random number;

[0079] Arrange the multiple signature keys in order according to the size of the target characters.

[0080] In specific implementation, the vehicle controller generates a random number and sends it to the cloud server. The random number is used to influence the selection and order of the signature key to ensure the uniqueness and randomness of each operation. The cloud server determines the corresponding target character in each signature key based on the random number. When the target character of each signature key is determined, the cloud server will reorder all signature keys according to the size of these characters, which greatly increases security because even if an attacker obtains partial information of a certain operation, it is impossible to predict the order of signature keys in other operations. This increases the unpredictability of the entire verification process.

[0081] In this embodiment, since the order of signature keys is based on the random number generated at each operation, the order of signature key usage is different each time, which greatly increases the unpredictability of the target signature key. Even if an attacker can obtain the internal data of a certain operation, they cannot use this data to predict or affect future operations. Dynamic reordering of signature keys can effectively prevent attack strategies against fixed key configurations, such as targeted brute force cracking or abuse after key leakage. Each reordering is based on a new random number, so even if a key is leaked, its impact is limited to one operation and will not affect the security of other operations.

[0082] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0083] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0084] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a signature system, including: a vehicle controller and a cloud server;

[0085] The vehicle controller is configured to, in response to receiving a request to send service data, obtain a timestamp of a current moment;

[0086] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0087] Determine the vehicle-side signature according to the application key, the target signature key and the business data, and send the application key, the timestamp, the vehicle-side signature and the business data to the cloud server, so that the cloud server determines the cloud signature according to the application key, the timestamp and the business data, and determines that the business data has not been tampered with if the cloud signature is consistent with the vehicle-side signature;

[0088] The cloud server is configured to, in response to receiving an application key, a timestamp, a vehicle-side signature, and service data sent by a vehicle controller, determine a corresponding signature key group according to the application key;

[0089] Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0090] Determine the cloud signature based on the application key, the target signature key and the business data;

[0091] In response to determining that the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with.

[0092] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a signature device.

[0093] refer to Figure 3 , the signature device is arranged in the vehicle controller, and the signature device comprises:

[0094] A first acquisition module 301, which is configured to obtain a timestamp of a current moment in response to receiving a request to send service data;

[0095] A first calculation module 302 is configured to perform a modulo operation on the timestamp and a length of the signature key group, and determine a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0096] The sending module 303 is configured to determine the vehicle-side signature based on the application key, the target signature key and the business data, and send the application key, timestamp, vehicle-side signature and business data to the cloud server, so that the cloud server determines the cloud signature based on the application key, timestamp and business data, and when the cloud signature is consistent with the vehicle-side signature, determines that the business data has not been tampered with.

[0097] Further, the calculation module 302 is specifically used for:

[0098] In response to determining that the target signature key has a leakage risk, determining a target sorting strategy and a sorting identification code corresponding to the target sorting strategy in at least one sorting strategy;

[0099] Rearranging at least one signature key in the signature key group according to the target sorting strategy to obtain a re-arranged signature key group;

[0100] Correspondingly, after determining the vehicle-side signature according to the application key, the target signature key and the business data, it also includes:

[0101] The application key, timestamp, vehicle-side signature, business data and the sorting identification code corresponding to the target sorting strategy are sent to the cloud server.

[0102] Furthermore, the calculation module 302 is further configured to:

[0103] Determine the corresponding target character in each signature key according to the target parameter;

[0104] Arrange the at least one signature key in order according to the size of the target characters;

[0105] The target parameter is a second modulus value of the timestamp and the length of a single signature key, or a random number;

[0106] When the target parameter is a random number, after determining the vehicle-side signature according to the application key, the target signature key and the business data, the method further includes:

[0107] The application key, timestamp, vehicle-side signature, business data, sorting identification code and the random number are sent to the cloud server.

[0108] Furthermore, the calculation module 302 is further configured to:

[0109] Convert the timestamp to a date and time, and determine the hours, minutes, and seconds in the date and time;

[0110] Perform a modulo operation on the number of hours and the length of the signature key group to obtain a first sub-modulo value, perform a modulo operation on the number of minutes and the length of the signature key group to obtain a second sub-modulo value, and perform a modulo operation on the number of seconds and the length of the signature key group to obtain a third sub-modulo value;

[0111] According to the first sub-modulus value, the second sub-modulus value and the third sub-modulus value, the corresponding first sub-signature key, second sub-signature key and third sub-signature key are respectively determined in the signature key group, and the first sub-signature key, the second sub-signature key and the third sub-signature key are concatenated to obtain a target signature key.

[0112] refer to Figure 3 , the signature device is set in the cloud server, and the signature device includes:

[0113] A second acquisition module 304 is configured to determine a corresponding signature key group according to the application key in response to receiving the application key, timestamp, vehicle-side signature and service data sent by the vehicle controller;

[0114] A second calculation module 305 is configured to perform a modulo operation on the timestamp and the length of the signature key group, and determine a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation;

[0115] The judgment module 306 is configured to determine the cloud signature according to the application key, the target signature key and the business data; in response to determining that the cloud signature is consistent with the vehicle-side signature, determine that the business data has not been tampered with.

[0116] Further, the second calculation module 305 is specifically used for:

[0117] In response to receiving the sorting identification code sent by the vehicle controller, at least one signature key in the signature key group is reordered according to a target sorting strategy corresponding to the sorting identification code to obtain a reordered signature key group.

[0118] Furthermore, the second calculation module 305 is further configured to:

[0119] In response to receiving a random number sent by the vehicle controller, determining a corresponding target character in each signature key according to the random number;

[0120] Arrange the at least one signature key in order according to the size of the target characters.

[0121] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0122] The device of the above embodiment is used to implement the corresponding signature method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0123] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the signature method described in any of the above embodiments is implemented.

[0124] Figure 4 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0125] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0126] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0127] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0128] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0129] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0130] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0131] The electronic device of the above embodiment is used to implement the corresponding signature method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0132] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the signing method described in any of the above embodiments.

[0133] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0134] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the signature method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0135] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.

[0136] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0137] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently determine whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure based on the prompt message.

[0138] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a confirmation control for the user to confirm "agree" or "disagree" to provide personal information to the electronic device.

[0139] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0140] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0141] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0142] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0143] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.

Claims

1. A signature method, characterized in that: Applied to a vehicle controller, the vehicle controller stores an application key and a signature key group, the signature key group includes at least one signature key; the method includes: In response to receiving a request to send business data, obtaining a timestamp of the current moment; Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation; The vehicle-side signature is determined based on the application key, target signature key and business data, and the application key, timestamp, vehicle-side signature and business data are sent to the cloud server, so that the cloud server determines the cloud signature based on the application key, timestamp and business data, and when the cloud signature is consistent with the vehicle-side signature, determines that the business data has not been tampered with.

2. The signature method according to claim 1, characterized in that: Before performing a modulo operation on the timestamp and the length of the signature key group, the method further comprises: In response to determining that the target signature key has a leakage risk, determining a target sorting strategy and a sorting identification code corresponding to the target sorting strategy in at least one sorting strategy; Rearranging at least one signature key in the signature key group according to the target sorting strategy to obtain a re-arranged signature key group; Correspondingly, after determining the vehicle-side signature according to the application key, the target signature key and the business data, it also includes: The application key, timestamp, vehicle-side signature, business data and the sorting identification code corresponding to the target sorting strategy are sent to the cloud server.

3. The signature method according to claim 2, characterized in that: The reordering of at least one signature key in the signature key group according to the target ordering strategy includes: Determine the corresponding target character in each signature key according to the target parameter; Arrange the at least one signature key in order according to the size of the target characters; The target parameter is a second modulus value of the timestamp and the length of a single signature key, or a random number; When the target parameter is a random number, after determining the vehicle-side signature according to the application key, the target signature key and the business data, the method further includes: The application key, timestamp, vehicle-side signature, business data, sorting identification code and the random number are sent to the cloud server.

4. The signature method according to claim 1, characterized in that: The first modulus value includes a first sub-modulus value, a second sub-modulus value, and a third sub-modulus value; performing a modulus operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on the first modulus value obtained by the modulus operation, includes: Convert the timestamp to a date and time, and determine the hours, minutes, and seconds in the date and time; Perform a modulo operation on the number of hours and the length of the signature key group to obtain a first sub-modulo value, perform a modulo operation on the number of minutes and the length of the signature key group to obtain a second sub-modulo value, and perform a modulo operation on the number of seconds and the length of the signature key group to obtain a third sub-modulo value; According to the first sub-modulus value, the second sub-modulus value and the third sub-modulus value, the corresponding first sub-signature key, second sub-signature key and third sub-signature key are respectively determined in the signature key group, and the first sub-signature key, the second sub-signature key and the third sub-signature key are concatenated to obtain a target signature key.

5. A signature method, characterized in that: Applied to a cloud server, the cloud server stores at least one signature key group, each signature key group includes at least one signature key; the method includes: In response to receiving the application key, timestamp, vehicle-side signature and service data sent by the vehicle controller, determining a corresponding signature key group according to the application key; Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation; Determine the cloud signature based on the application key, the target signature key and the business data; In response to determining that the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with.

6. The signature method according to claim 5, characterized in that: After determining the corresponding signature key group according to the application key, the method further includes: In response to receiving the sorting identification code sent by the vehicle controller, at least one signature key in the signature key group is reordered according to a target sorting strategy corresponding to the sorting identification code to obtain a reordered signature key group.

7. The signature method according to claim 6, characterized in that: The reordering of at least one signature key in the signature key group according to the target ordering strategy includes: In response to receiving a random number sent by the vehicle controller, determining a corresponding target character in each signature key according to the random number; Arrange the at least one signature key in order according to the size of the target characters.

8. A signature system, characterized in that: include: Vehicle controller and cloud server; The vehicle controller is configured to, in response to receiving a request to send service data, obtain a timestamp of a current moment; Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation; Determine the vehicle-side signature according to the application key, the target signature key and the business data, and send the application key, the timestamp, the vehicle-side signature and the business data to the cloud server, so that the cloud server determines the cloud signature according to the application key, the timestamp and the business data, and determines that the business data has not been tampered with if the cloud signature is consistent with the vehicle-side signature; The cloud server is configured to, in response to receiving an application key, a timestamp, a vehicle-side signature, and service data sent by a vehicle controller, determine a corresponding signature key group according to the application key; Performing a modulo operation on the timestamp and the length of the signature key group, and determining a corresponding target signature key in the signature key group based on a first modulo value obtained by the modulo operation; Determine the cloud signature based on the application key, the target signature key and the business data; In response to determining that the cloud signature is consistent with the vehicle-side signature, it is determined that the business data has not been tampered with.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

10. A vehicle, characterized in that: The vehicle comprises the electronic device as claimed in claim 9.