Vehicle machine password random generation verification method and device, equipment and storage medium
By using public key encryption and hash algorithms to generate dynamic vehicle infotainment system passwords in vehicle diagnostic access authentication, and setting up anti-brute-force mechanisms, the problem of VIN codes being easily cracked is solved, thereby improving the security and reliability of the vehicle infotainment system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-27
AI Technical Summary
In existing vehicle infotainment encryption methods, the password generated using the VIN code as the unique variable is easily cracked, lacking a password error protection mechanism, resulting in a high risk of password leakage.
The vehicle is diagnosed and authenticated using an after-sales diagnostic tool. A dynamic vehicle system password is generated using public key encryption and hash algorithms. An anti-bombing mechanism is set up to prevent unauthorized access when the comparison results do not match.
It enables dynamic password generation for car infotainment systems, preventing password brute-force attacks, improving the security and reliability of the system, and simplifying the password acquisition process for after-sales service.
Smart Images

Figure CN118944878B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent networked vehicles, and particularly relates to a car machine password random generation verification method and device, equipment and a storage medium. BACKGROUND
[0002] With the development of intelligent networked vehicles, vehicles are facing more and more information security attack risks. Criminals can easily obtain personal information and user data stored on the vehicle by illegally invading the car machine system, and even control and hold the vehicle.
[0003] The existing car machine encryption method is to generate a secret key corresponding to the vehicle identification code VIN code according to the vehicle identification code VIN code and a preset password algorithm, and to encrypt the car machine. When the car machine is installed on the vehicle, the VIN code is used to generate the secret key, the SN code of the car machine at the time of factory delivery is automatically deleted, the secret key generated by the VIN code is used as the final password, and the car machine encryption is realized.
[0004] However, the existing car machine encryption method has the following disadvantages: it only uses the VIN code as the only variable for generating the car machine password, the password generated according to the VIN is a fixed password, which is easy to be illegally cracked to obtain the password; the strength of the password generation algorithm is not clear, which is easy to be illegally cracked, and after being cracked, the attacker can use the password algorithm to obtain the password of all car machines; no password error protection mechanism is set, the password is not protected against cracking, the attacker can try the password unlimitedly to obtain the correct password; and no password protection is provided for the password verifier, which is easy to cause password leakage. SUMMARY
[0005] The main purpose of the present application is to provide a car machine password random generation verification method, device, equipment and storage medium, which aims to solve the technical problems in the prior art that the car machine password is easy to be illegally cracked, after being cracked, the attacker can use the password algorithm to obtain the password of all car machines, lacks a password error protection mechanism, and is easy to cause password leakage.
[0006] In a first aspect, the present application provides a car machine password random generation verification method, which comprises the following steps:
[0007] When entering the vehicle type interface of the after-sales diagnostic instrument, the current vehicle is diagnosed and accessed for authentication by the after-sales diagnostic instrument;
[0008] After the access authentication is passed, the diagnostic instrument password and the car machine password are obtained;
[0009] The diagnostic instrument password is decrypted by the car machine system through the public key to obtain a decryption result, the decryption result is compared with the car machine password, and whether to start the car machine engineering mode is determined according to the comparison result.
[0010] Optionally, the diagnosis access authentication of the current vehicle by the after-sales diagnostic instrument when entering the vehicle type interface of the after-sales diagnostic instrument comprises:
[0011] connecting the after-sales diagnostic instrument to the on-board diagnostic (OBD) port of the current vehicle;
[0012] when detecting that the after-sales diagnostic instrument operates to enter the vehicle type interface, obtaining the certificate and the private key of the after-sales diagnostic instrument, and obtaining the root certificate and the public key corresponding to the private key of the diagnostic instrument built in the current vehicle;
[0013] performing diagnosis access authentication on the current vehicle by the certificate, the private key of the diagnostic instrument, the root certificate and the public key.
[0014] Optionally, the diagnosis access authentication of the current vehicle by the after-sales diagnostic instrument comprises:
[0015] sending the certificate to the current vehicle by the after-sales diagnostic instrument, and performing legality verification on the identity of the certificate by the current vehicle according to the root certificate;
[0016] after the legality verification passes, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument;
[0017] encrypting the random number according to the private key of the diagnostic instrument by the after-sales diagnostic instrument to obtain encrypted data;
[0018] sending the encrypted data to the current vehicle by the after-sales diagnostic instrument, and decrypting the encrypted data using the public key by the current vehicle;
[0019] when the encrypted data is the same as the random number, it is determined that the access authentication passes, and a session key is generated at the same time.
[0020] Optionally, after the access authentication passes, the diagnostic instrument password and the vehicle machine password are obtained, comprising:
[0021] after the access authentication passes, in response to the vehicle machine password request of the after-sales diagnostic instrument, sending a password request instruction of the vehicle machine password request to the current vehicle;
[0022] after the vehicle machine password generation system of the current vehicle receives the password request instruction, performing password generation to obtain a vehicle machine password;
[0023] encrypting the generated true random number, VIN and PDSN three parameters using the public key by the vehicle machine system of the current vehicle, and sending the encrypted parameters to the after-sales diagnostic instrument;
[0024] generating, by the after-sales diagnostic instrument, a diagnostic instrument password according to the encryption parameter.
[0025] Optionally, after the current vehicle's head unit password generation system receives the password request instruction, the password generation is performed to obtain a head unit password, including:
[0026] After the current vehicle's head unit password generation system receives the password request instruction, a true random number is generated by a random number generator;
[0027] Obtain the vehicle identification code (VIN) of the current vehicle, and pass the VIN through a hash algorithm to obtain a first hash value through the head unit password generation system;
[0028] Obtain the packet data service node (PDSN) of the current vehicle, and pass the PDSN through a hash algorithm to obtain a second hash value through the head unit password generation system;
[0029] Encrypt the true random number, the first hash value and the second hash value using a preset encryption algorithm to dynamically generate a head unit password.
[0030] Optionally, the diagnostic instrument password is generated by the after-sales diagnostic instrument according to the encryption parameter, including:
[0031] The encryption parameter is decrypted by the after-sales diagnostic instrument through a diagnostic instrument private key to obtain a decrypted parameter;
[0032] The decrypted VIN code in the decrypted parameter is passed through the hash algorithm to obtain a third hash value;
[0033] The decrypted PDSN code in the decrypted parameter is passed through the hash algorithm to obtain a fourth hash value;
[0034] According to the decrypted true random number, the third hash value and the fourth hash value in the decrypted parameter, the preset encryption algorithm is used for encryption to generate a diagnostic instrument password.
[0035] Optionally, the diagnostic instrument password is decrypted by the head unit system through a public key to obtain a decryption result, and the decryption result is compared with the head unit password to determine whether to start the head unit engineering mode according to the comparison result, including:
[0036] The diagnostic instrument password is encrypted by the after-sales diagnostic instrument through a diagnostic instrument private key to obtain an encrypted diagnostic instrument password, and the encrypted diagnostic instrument password is sent to the current vehicle;
[0037] The encrypted diagnostic instrument password is decrypted by the head unit system of the current vehicle through a public key to obtain a decryption result;
[0038] The decryption result is compared with the car machine password by a password comparison module to obtain a comparison result;
[0039] When the comparison result is that the decryption result is the same as the car machine password, the car machine engineering mode is started;
[0040] When the comparison result is that the decryption result is not the same as the car machine password, and the number of password comparison errors reaches a preset number threshold within a preset anti-blast time, the car machine engineering mode is not started within a preset stop password comparison time.
[0041] In a second aspect, to achieve the above object, the present application further provides a car machine password random generation verification device, which comprises:
[0042] An access authentication module is configured to perform diagnosis access authentication on a current vehicle by using the after-sales diagnostic instrument when entering the vehicle interface of the after-sales diagnostic instrument;
[0043] A password acquisition module is configured to acquire the diagnostic instrument password and the car machine password after the access authentication is passed;
[0044] A verification comparison module is configured to decrypt the diagnostic instrument password by using the car machine system through a public key to obtain a decryption result, compare the decryption result with the car machine password, and determine whether to start the car machine engineering mode according to the comparison result.
[0045] In a third aspect, to achieve the above object, the present application further provides a car machine password random generation verification device, which comprises a memory, a processor, and a car machine password random generation verification program stored in the memory and executable on the processor, and the car machine password random generation verification program is configured to implement the steps of the car machine password random generation verification method as described above.
[0046] In a fourth aspect, to achieve the above object, the present application further provides a storage medium, which stores a car machine password random generation verification program, and the car machine password random generation verification program implements the steps of the car machine password random generation verification method as described above when executed by a processor.
[0047] The proposed method for randomly generating and verifying vehicle infotainment system passwords involves the following steps: upon entering the vehicle interface of an after-sales diagnostic tool, the diagnostic tool performs diagnostic access authentication on the current vehicle. After successful authentication, the diagnostic tool password and the vehicle infotainment system password are obtained. The vehicle infotainment system then uses a public key to decrypt the diagnostic tool password, obtaining the decryption result. This decryption result is compared with the vehicle infotainment system password, and the comparison result determines whether to enable the vehicle infotainment system's engineering mode. This method enables dynamic password generation for the vehicle infotainment system, simplifies password retrieval for after-sales service, effectively prevents brute-force attacks on the vehicle infotainment system, ensures unauthorized access to the system, improves the security and reliability of the system, and increases the speed and efficiency of random password generation and verification. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention;
[0049] Figure 2 This is a flowchart illustrating the first embodiment of the vehicle infotainment system password random generation and verification method of the present invention;
[0050] Figure 3 This is a flowchart illustrating the second embodiment of the vehicle infotainment system password random generation and verification method of the present invention;
[0051] Figure 4 This is a flowchart illustrating the third embodiment of the vehicle infotainment system password random generation and verification method of the present invention;
[0052] Figure 5 This is a flowchart illustrating the fourth embodiment of the vehicle infotainment system password random generation and verification method of the present invention;
[0053] Figure 6 This is a schematic diagram illustrating the interaction between the diagnostic instrument and the vehicle system in the random generation and verification method for vehicle system passwords of the present invention.
[0054] Figure 7 This is a flowchart illustrating the fifth embodiment of the vehicle infotainment system password random generation and verification method of the present invention;
[0055] Figure 8 This is a functional block diagram of the first embodiment of the vehicle-mounted password random generation and verification device of the present invention.
[0056] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0057] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0058] The solution of the embodiment of the present application is mainly: when entering the vehicle type interface of the post-sale diagnostic instrument, the current vehicle is diagnosed and accessed by the post-sale diagnostic instrument; after the access authentication is passed, the diagnostic instrument password and the vehicle machine password are obtained; the vehicle machine system decrypts the diagnostic instrument password by using the public key, obtains the decryption result, compares the decryption result with the vehicle machine password, and determines whether to start the vehicle machine engineering mode according to the comparison result; the dynamic password generation of the vehicle machine can be realized, the purpose of the post-sale service can be easily obtained, the vehicle machine password can be effectively prevented from being cracked, the vehicle machine system can be prevented from being illegally accessed, the security and reliability of the vehicle machine system are improved, the speed and efficiency of the vehicle machine password random generation verification are improved, and the technical problems that the vehicle machine password is easily cracked in the prior art, after being cracked, the password algorithm can be used by the attacker to obtain the password of all vehicle machines, the password error protection mechanism is lacked, and the password is easily leaked are solved.
[0059] Reference Figure 1 , Figure 1 The device structure diagram of the hardware running environment involved in the embodiment of the present application.
[0060] As Figure 1 shown, the device can include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen (Display) and an input unit such as a keyboard (Keyboard). The optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface). The memory 1005 can be a high-speed RAM memory or a stable memory (Non-Volatile Memory), such as a magnetic disk memory. The memory 1005 can also be an independent storage device from the aforementioned processor 1001.
[0061] Those skilled in the art can understand that Figure 1 the device structure shown in the embodiment of the present application does not constitute a limitation on the device, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements.
[0062] As Figure 1 shown, the memory 1005 as a storage medium can include an operating device, a network communication module, a user interface module, and a vehicle machine password random generation verification program.
[0063] The device of the present application calls the vehicle machine password random generation verification program stored in the memory 1005 by the processor 1001, and performs the following operations:
[0064] When entering the vehicle model interface of the post-sale diagnostic instrument, the current vehicle is diagnosed and accessed for authentication by the post-sale diagnostic instrument;
[0065] After the access authentication is passed, the diagnostic instrument password and the vehicle password are obtained;
[0066] The diagnostic instrument password is decrypted by the vehicle system through the public key to obtain a decryption result, and the decryption result is compared with the vehicle password, and whether the vehicle engineering mode is started is determined according to the comparison result.
[0067] The device of the application randomly generates a verification program by calling the vehicle password stored in the memory 1005 through the processor 1001, and also performs the following operations:
[0068] The post-sale diagnostic instrument is connected to the on-board automatic diagnostic system OBD port of the current vehicle;
[0069] When it is detected that the post-sale diagnostic instrument operates to enter the vehicle model interface, the certificate and the diagnostic instrument private key built-in the post-sale diagnostic instrument are obtained, and the root certificate built-in the current vehicle and the public key corresponding to the diagnostic instrument private key are obtained;
[0070] The current vehicle is diagnosed and accessed for authentication by the certificate, the diagnostic instrument private key, the root certificate and the public key.
[0071] The device of the application randomly generates a verification program by calling the vehicle password stored in the memory 1005 through the processor 1001, and also performs the following operations:
[0072] The post-sale diagnostic instrument sends the certificate to the current vehicle, and the current vehicle performs legality verification on the identity of the certificate according to the root certificate;
[0073] After the legality verification is passed, the current vehicle sends a 32-byte random number to the post-sale diagnostic instrument;
[0074] The post-sale diagnostic instrument encrypts the random number according to the diagnostic instrument private key to obtain encrypted data;
[0075] The post-sale diagnostic instrument sends the encrypted data to the current vehicle, and the current vehicle decrypts the encrypted data using the public key;
[0076] When the encrypted data is the same as the random number, it is determined that the access authentication is passed, and a session key is generated at the same time.
[0077] The device of the application randomly generates a verification program by calling the vehicle password stored in the memory 1005 through the processor 1001, and also performs the following operations:
[0078] After the access authentication is passed, in response to a vehicle machine password request of the after-sales diagnostic instrument, a password request instruction of the vehicle machine password request is sent to the current vehicle;
[0079] After the vehicle machine password generation system of the current vehicle receives the password request instruction, password generation is performed to obtain a vehicle machine password;
[0080] The generated true random number, VIN and PDSN three parameters are encrypted by using a public key through the vehicle machine system of the current vehicle, and the encrypted encrypted parameters are sent to the after-sales diagnostic instrument;
[0081] The after-sales diagnostic instrument generates a diagnostic instrument password according to the encrypted parameters.
[0082] The device of the application calls a vehicle machine password random generation verification program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0083] After the vehicle machine password generation system of the current vehicle receives the password request instruction, a true random number is generated by a random number generator;
[0084] The vehicle identification code VIN of the current vehicle is obtained, and the VIN is subjected to a hash algorithm through the vehicle machine password generation system to obtain a first hash value;
[0085] The group data service node PDSN of the current vehicle is obtained, and the PDSN is subjected to a hash algorithm through the vehicle machine password generation system to obtain a second hash value;
[0086] The true random number, the first hash value and the second hash value are encrypted by using a preset encryption algorithm, and a vehicle machine password is dynamically generated.
[0087] The device of the application calls a vehicle machine password random generation verification program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0088] The encrypted parameters are decrypted through a diagnostic instrument private key by the after-sales diagnostic instrument to obtain decrypted parameters;
[0089] The decrypted VIN code in the decrypted parameters is subjected to a hash algorithm to obtain a third hash value;
[0090] The decrypted PDSN code in the decrypted parameters is subjected to a hash algorithm to obtain a fourth hash value;
[0091] The decrypted true random number in the decrypted parameters, the third hash value and the fourth hash value are encrypted by using the preset encryption algorithm to generate a diagnostic instrument password.
[0092] The device of the application calls a vehicle machine password random generation verification program stored in the memory 1005 through the processor 1001, and also performs the following operations:
[0093] The after-sales diagnostic instrument encrypts the diagnostic instrument password through a diagnostic instrument private key to obtain an encrypted diagnostic instrument password, and sends the encrypted diagnostic instrument password to the current vehicle.
[0094] The vehicle machine system of the current vehicle decrypts the encrypted diagnostic instrument password through a public key to obtain a decryption result.
[0095] The password comparison module compares the decryption result with the vehicle machine password to obtain a comparison result.
[0096] When the comparison result is that the decryption result is the same as the vehicle machine password, the vehicle machine engineering mode is started.
[0097] When the comparison result is that the decryption result is not the same as the vehicle machine password, and the number of password comparison errors reaches a preset number threshold within a preset anti-explosion time, the vehicle machine engineering mode is not started within a preset stop password comparison time.
[0098] The above-mentioned scheme is used to perform diagnostic access authentication on the current vehicle through the after-sales diagnostic instrument when entering the vehicle model interface of the after-sales diagnostic instrument. After the access authentication is passed, the diagnostic instrument password and the vehicle machine password are obtained. The diagnostic instrument password is decrypted through the public key of the vehicle machine system to obtain a decryption result. The decryption result is compared with the vehicle machine password, and whether to start the vehicle machine engineering mode is determined according to the comparison result. The dynamic password generation of the vehicle machine can be realized, the purpose of simply obtaining the password by the after-sales service can be achieved, the vehicle machine password can be effectively prevented from being cracked, the vehicle machine system can be prevented from being illegally accessed, the safety and reliability of the vehicle machine system are improved, and the speed and efficiency of the vehicle machine password random generation verification are improved.
[0099] Based on the above-mentioned hardware structure, the vehicle machine password random generation verification method embodiment of the application is proposed.
[0100] Reference Figure 2 , Figure 2 The flowchart of the first embodiment of the vehicle machine password random generation verification method of the application is shown.
[0101] In the first embodiment, the vehicle machine password random generation verification method includes the following steps:
[0102] Step S10, when entering the vehicle model interface of the after-sales diagnostic instrument, the current vehicle is diagnosed and access authenticated through the after-sales diagnostic instrument.
[0103] It should be noted that when entering the vehicle model interface of the after-sales diagnostic instrument, the diagnosis access authentication of the after-sales diagnostic instrument and the current vehicle can be started.
[0104] Step S20, after the access authentication is passed, the diagnostic instrument password of the after-sales diagnostic instrument and the vehicle machine password of the vehicle machine system of the current vehicle are obtained.
[0105] It should be understood that after the access authentication is passed, the diagnostic instrument password of the after-sales diagnostic instrument and the vehicle machine password of the vehicle machine system of the current vehicle can be obtained.
[0106] Step S30, the vehicle machine system is used to decrypt the diagnostic instrument password by the public key, obtain the decryption result, compare the decryption result with the vehicle machine password, and determine whether to start the vehicle machine engineering mode according to the comparison result.
[0107] It can be understood that the diagnostic instrument password can be decrypted by the public key by using the vehicle machine system of the current vehicle, so as to obtain the decryption result, and then the decryption result is compared with the vehicle machine password, and the corresponding comparison result can be obtained, and then whether to start the vehicle machine engineering mode is determined according to the comparison result.
[0108] The above-mentioned scheme is used in the embodiment. When entering the vehicle model interface of the after-sales diagnostic instrument, the diagnosis access authentication of the current vehicle is performed by the after-sales diagnostic instrument. After the access authentication is passed, the diagnostic instrument password and the vehicle machine password are obtained. The vehicle machine system is used to decrypt the diagnostic instrument password by the public key, obtain the decryption result, compare the decryption result with the vehicle machine password, and determine whether to start the vehicle machine engineering mode according to the comparison result. The dynamic password generation of the vehicle machine of the automobile can be realized, the purpose of the after-sales service can be simplified to obtain the password, the vehicle machine password can be effectively prevented from being cracked, the vehicle machine system can be prevented from being illegally accessed, the safety and reliability of the vehicle machine system are improved, and the speed and efficiency of the vehicle machine password random generation verification are improved.
[0109] Further, Figure 3 The flowchart of the second embodiment of the vehicle machine password random generation verification method of the application is shown in Figure 3 The second embodiment of the vehicle machine password random generation verification method of the application is proposed based on the first embodiment. In the embodiment, the step S10 specifically includes the following steps.
[0110] Step S11, connecting the after-sales diagnostic instrument to the on-board automatic diagnostic system (OBD) port of the current vehicle.
[0111] It should be noted that the access authentication needs to connect the after-sales diagnostic instrument to the on-board automatic diagnostic system (OBD) port of the current vehicle.
[0112] Step S12, when detecting that the after-sales diagnostic instrument operates into the vehicle model interface, obtaining the certificate and the diagnostic instrument private key built-in in the after-sales diagnostic instrument, and obtaining the root certificate built-in in the current vehicle and the public key corresponding to the diagnostic instrument private key.
[0113] It can be understood that the after-sales diagnostic instrument and the vehicle start the diagnostic access authentication when operating into the vehicle model interface on the diagnostic instrument interface, and the diagnostic instrument built-in certificate and private key, the vehicle built-in root certificate and the public key corresponding to the diagnostic instrument private key; when detecting that the after-sales diagnostic instrument operates into the vehicle model interface, the certificate and the diagnostic instrument private key built-in in the after-sales diagnostic instrument can be obtained, and the root certificate built-in in the current vehicle and the public key corresponding to the diagnostic instrument private key can be obtained.
[0114] Step S13, performing diagnostic access authentication on the current vehicle through the certificate, the diagnostic instrument private key, the root certificate and the public key.
[0115] It should be understood that the current vehicle is authenticated through the certificate, the diagnostic instrument private key, the root certificate and the public key.
[0116] The above-mentioned scheme is used in the embodiment, the after-sales diagnostic instrument is connected to the on-board automatic diagnostic system OBD port of the current vehicle; when detecting that the after-sales diagnostic instrument operates into the vehicle model interface, the certificate and the diagnostic instrument private key built-in in the after-sales diagnostic instrument are obtained, and the root certificate built-in in the current vehicle and the public key corresponding to the diagnostic instrument private key are obtained; the current vehicle is authenticated through the certificate, the diagnostic instrument private key, the root certificate and the public key, which can effectively prevent the vehicle machine password from being cracked, ensure that the vehicle machine system will not be illegally accessed, improve the security and reliability of the vehicle machine system, and improve the speed and efficiency of the vehicle machine password random generation verification.
[0117] Further, Figure 4 The flowchart of the third embodiment of the vehicle machine password random generation verification method of the application is shown in Figure 4 The third embodiment of the vehicle machine password random generation verification method of the application is proposed based on the second embodiment, and in the embodiment, the step S13 specifically includes the following steps:
[0118] Step S131, sending the certificate to the current vehicle through the after-sales diagnostic instrument, and performing legality verification on the identity of the certificate according to the root certificate.
[0119] It should be noted that the certificate can be sent to the current vehicle through the after-sales diagnostic instrument, and the identity of the certificate can be verified according to the root certificate.
[0120] In a specific implementation, the communication between the diagnostic instrument and the vehicle adopts a CANFD format, and a SecOC is integrated, the SecOC uses an AES-128-CMAC algorithm to ensure authenticity and integrity of the communication; the diagnostic instrument sends a certificate to the vehicle, and the vehicle performs legality verification on the identity of the certificate.
[0121] In step S132, after the legality verification passes, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument.
[0122] It can be understood that after the verification passes, the vehicle sends a 32-byte random number to the diagnostic instrument, that is, after the legality verification passes, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument.
[0123] In step S133, the after-sales diagnostic instrument encrypts the random number according to the private key of the diagnostic instrument to obtain encrypted data.
[0124] It should be understood that the after-sales diagnostic instrument can encrypt the random number according to the private key of the diagnostic instrument to obtain encrypted data.
[0125] In step S134, the after-sales diagnostic instrument sends the encrypted data to the current vehicle, and the current vehicle decrypts the encrypted data using the public key.
[0126] It can be understood that the after-sales diagnostic instrument can send the encrypted data to the current vehicle, and the current vehicle decrypts the encrypted data using the public key.
[0127] In a specific implementation, after the diagnostic instrument receives the 32-byte random number b, the random number is encrypted by the private key to obtain data, and the private key algorithm is RSA2048 and SHA256.
[0128] In step S135, when the encrypted data is the same as the random number, it is determined that the access authentication passes, and a session key is generated at the same time.
[0129] It should be understood that when the encrypted data is the same as the random number, it can be determined that the access authentication passes, and a session key is generated at the same time.
[0130] The embodiment sends the certificate to the current vehicle through the after-sales diagnostic instrument, and the current vehicle performs legality verification on the identity of the certificate according to the root certificate; after the legality verification is passed, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument; the after-sales diagnostic instrument encrypts the random number according to the diagnostic instrument private key to obtain encrypted data; the after-sales diagnostic instrument sends the encrypted data to the current vehicle, and the current vehicle decrypts the encrypted data using the public key; when the encrypted data is the same as the random number, it is determined that the access authentication is passed, and a session key is generated at the same time, which can effectively prevent the vehicle machine password from being cracked, ensure that the vehicle machine system cannot be illegally accessed, improve the security and reliability of the vehicle machine system, and improve the speed and efficiency of the vehicle machine password random generation verification.
[0131] Further, Figure 5 The flowchart of the fourth embodiment of the vehicle machine password random generation verification method of the application is shown in Figure 5 The fourth embodiment of the vehicle machine password random generation verification method of the application is proposed based on the first embodiment, and in this embodiment, the step S20 specifically includes the following steps:
[0132] Step S21, after the access authentication is passed, in response to the vehicle machine password request of the after-sales diagnostic instrument, the password request instruction of the vehicle machine password request is sent to the current vehicle.
[0133] It should be noted that after the access authentication is passed, the password request instruction of the vehicle machine password request can be sent to the current vehicle in response to the vehicle machine password request of the after-sales diagnostic instrument.
[0134] In a specific implementation, the after-sales diagnostic instrument is connected to the OBD port of the automobile, and the vehicle machine password request is operated on the diagnostic instrument interface. The diagnostic instrument sends the password request instruction to the whole vehicle through the OBD port of the whole vehicle.
[0135] Step S22, after the vehicle machine password generation system of the current vehicle receives the password request instruction, the password generation is performed to obtain the vehicle machine password.
[0136] It can be understood that after the vehicle machine password generation system of the current vehicle receives the password request instruction, the password generation operation is performed to obtain the vehicle machine password.
[0137] Further, the step S22 specifically includes the following steps:
[0138] After the vehicle machine password generation system of the current vehicle receives the password request instruction, a true random number is generated by a random number generator;
[0139] Obtaining the vehicle identification code (VIN) of the current vehicle, and obtaining a first hash value of the VIN through the vehicle password generation system by using a hash algorithm;
[0140] Obtaining the packet data serving node (PDSN) of the current vehicle, and obtaining a second hash value of the PDSN through the vehicle password generation system by using a hash algorithm;
[0141] Encrypting the true random number, the first hash value and the second hash value by using a preset encryption algorithm to dynamically generate a vehicle password.
[0142] It should be understood that the password generation system of the vehicle system generates a password after receiving a password request instruction:
[0143] Generating a true random number A by a random number generator (the random number A generated each time is different);
[0144] The password generation system takes the vehicle identification code (VIN) as a parameter and obtains a hash value B through a hash algorithm (SHA256), where B = HASH(VIN);
[0145] The password generation system takes the vehicle identification code (PDSN) as a parameter and obtains a hash value C through a hash algorithm (SHA256), where C = HASH(PDSN);
[0146] Using the AES-128-CFB algorithm to calculate a password Key by taking the true random number A, the hash value B and the hash value C as parameters, where Key = AES128[A, B, C], A is the encryption object, B is the key, and C is the initialization vector.
[0147] Each time the vehicle system receives a password request, a random number A is generated, so that the Key value generated each time is different.
[0148] Step S23, encrypting the generated true random number, VIN and PDSN by using a public key through the vehicle system of the current vehicle, and sending the encrypted parameters to the after-sales diagnostic instrument.
[0149] It should be understood that the vehicle system of the current vehicle can encrypt the generated true random number, the vehicle identification code (VIN) and the packet data serving node (PDSN) by using a public key, and then send the encrypted parameters to the after-sales diagnostic instrument.
[0150] Step S24, generating a diagnostic instrument password by the after-sales diagnostic instrument according to the encrypted parameters.
[0151] It can be understood that the after-sales diagnostic instrument can generate a diagnostic instrument password according to the encryption parameter.
[0152] Further, the step S24 specifically comprises the following steps:
[0153] The encryption parameter is decrypted by the after-sales diagnostic instrument through a diagnostic instrument private key to obtain a decrypted parameter;
[0154] The decrypted VIN code in the decrypted parameter is subjected to the hash algorithm to obtain a third hash value;
[0155] The decrypted PDSN code in the decrypted parameter is subjected to the hash algorithm to obtain a fourth hash value;
[0156] The decrypted true random number in the decrypted parameter, the third hash value and the fourth hash value are encrypted by the preset encryption algorithm to generate a diagnostic instrument password.
[0157] In a specific implementation, referring to Figure 6 , Figure 6 It is a diagnostic instrument and vehicle system interaction schematic diagram in the vehicle machine password random generation verification method of the application, as Figure 6 shown, the hash algorithm is a secure hash algorithm, which is a family of cryptographic hash functions and a secure hash algorithm certified by FIPS. The VIN and PDSN of each vehicle are different, and the true random number generated each time is also different. Therefore, the password Key value calculated by three different variables through the secure hash algorithm is different each time, and the vehicle machine password belongs to a dynamic password, which increases the difficulty of being cracked.
[0158] Access authentication: the after-sales diagnostic instrument connects the OBD port of the vehicle, and enters the vehicle model interface on the diagnostic instrument interface. The after-sales diagnostic instrument and the vehicle start diagnosis access authentication. The diagnostic instrument is built-in certificate and private key, and the vehicle is built-in root certificate and public key corresponding to the diagnostic instrument private key.
[0159] a. The communication between the diagnostic instrument and the vehicle adopts CANFD format and integrates SecOC. The SecOC uses AES-128-CMAC algorithm to ensure the authenticity and integrity of the communication;
[0160] b. The diagnostic instrument sends the certificate to the vehicle, and the vehicle performs legality verification on the identity of the certificate;
[0161] c. After the verification is passed, the vehicle sends a 32-byte random number a to the diagnostic instrument;
[0162] d. After the diagnostic instrument receives the 32-byte random number b, the random number is encrypted by the private key to obtain data a', and the private key algorithm is RSA2048 and SHA256;
[0163] e. The diagnostic instrument sends the encrypted data b' to the vehicle, which decrypts the data using the public key. If a' = a, the authentication is successful, and a session key is generated and sent to the diagnostic instrument;
[0164] f. The session key is used as the key for SecOC in the subsequent communication process.
[0165] ② Password request: The after-sales diagnostic instrument connects the automobile OBD port and operates the vehicle password request on the diagnostic instrument interface. The diagnostic instrument sends the password request command to the vehicle through the vehicle's OBD port.
[0166] After receiving the password request, the vehicle system will encrypt the generated true random number A, VIN, and PDSN using the public key and send the encrypted true random number A1, VIN1, and PDSN1 to the diagnostic instrument.
[0167] a. The diagnostic instrument decrypts the received three parameters using the private key to obtain the true random number A2, VIN2, and PDSN2.
[0168] b. Take the vehicle identification code VIN2 as a parameter and pass it through the hash algorithm (SHA256) to obtain the hash value B2, where B2 = HASH(VIN2).
[0169] c. Take the vehicle identification code PDSN2 as a parameter and pass it through the hash algorithm (SHA256) to obtain the hash value C2, where C = HASH(PDSN2).
[0170] d. Use the AES-128-CFB algorithm to calculate the password Key2 using the true random number A2, hash value B2, and hash value C2 as parameters, Key2 = AES128[A2, B2, C2], where A2 is the encryption object, B2 is the key, and C2 is the initialization vector.
[0171] e. The diagnostic instrument encrypts the generated Key2 using the private key to obtain Key3 and sends Key3 to the vehicle.
[0172] The embodiment can effectively prevent the car machine password from being cracked, ensure that the car machine system cannot be illegally accessed, improve the security and reliability of the car machine system, and improve the speed and efficiency of the car machine password random generation verification.
[0173] Further, Figure 7 A flowchart of a fifth embodiment of the car machine password random generation verification method of the present application is shown in FIG. 5. Figure 7 The fifth embodiment of the car machine password random generation verification method of the present application is based on the first embodiment. In the embodiment, the step S30 specifically includes the following steps.
[0174] Step S31, the after-sales diagnostic instrument encrypts the diagnostic instrument password by a diagnostic instrument private key to obtain an encrypted diagnostic instrument password, and sends the encrypted diagnostic instrument password to the current vehicle.
[0175] It should be noted that the after-sales diagnostic instrument can encrypt the diagnostic instrument password by a diagnostic instrument private key to obtain an encrypted diagnostic instrument password, and send the encrypted diagnostic instrument password to the current vehicle.
[0176] Step S32, the car machine system of the current vehicle decrypts the encrypted diagnostic instrument password by a public key to obtain a decryption result.
[0177] It should be understood that the car machine system of the current vehicle can decrypt the encrypted diagnostic instrument password by a public key to obtain a decryption result.
[0178] Step S33, the password comparison module compares the decryption result with the car machine password to obtain a comparison result.
[0179] It should be understood that the password comparison module can compare the decryption result with the car machine password to obtain a comparison result.
[0180] Step S34, when the comparison result is that the decryption result is the same as the car machine password, the car machine engineering mode is started.
[0181] It can be understood that when the comparison result is that the decryption result is the same as the car machine password, the car machine engineering mode is started.
[0182] Step S35, when the comparison result is that the decryption result is not the same as the car machine password, and the number of password comparison errors reaches the preset number threshold within the preset anti-blast time, the car machine engineering mode is not started within the preset stop password comparison time.
[0183] It should be understood that when the comparison result is that the decryption result is not the same as the car machine password, and the number of password comparison errors reaches the preset number threshold within the preset anti-blast time, the car machine engineering mode is not started within the preset stop password comparison time.
[0184] In a specific implementation, the password comparison process is:
[0185] a. The car machine system will be decrypted by the public key to obtain Key4.
[0186] b. The password comparison module compares the Key4 value and the password Key generated by the password generation system of the car machine system.
[0187] c. If Key4 = Key, the engineering mode password input is correct, the engineering mode is opened, and administrator permissions such as log extraction and software upgrade can be performed.
[0188] After the password comparison module receives a new Key value, it will automatically replace the previous Key value. The password comparison module stores the latest Key value sent by the password generation module, and only stores one Key value. The stored Key value will be invalid within 5 minutes. If a correct Key4 value is received after 5 minutes of Key generation, the engineering mode will not be opened.
[0189] To strengthen the management of illegal multiple password inputs and avoid password blasting, a password blasting prevention mechanism is set. If Key4 ≠ Key is input five times within 5 minutes, the car machine password comparison module will stop password comparison for 10 minutes. Within the 10 minutes, no matter whether the password input is correct or incorrect, the car machine engineering mode will not be opened.
[0190] There are many cases of password comparison errors:
[0191] a. The diagnostic instrument triggers a password generation, and the Key4 value and the Key value input multiple times are not the same (the Key values are consistent).
[0192] b. The diagnostic instrument triggers multiple password generations, and the Key4 value and the current Key value input each time are not the same (the Key values are inconsistent).
[0193] c. Combination of the two cases of a and b.
[0194] This embodiment, through the above-described scheme, uses the after-sales diagnostic instrument to encrypt the diagnostic instrument password with its private key to obtain an encrypted diagnostic instrument password, which is then sent to the current vehicle. The vehicle's infotainment system uses its public key to decrypt the encrypted diagnostic instrument password, obtaining a decryption result. A password comparison module compares the decryption result with the infotainment system password to obtain a comparison result. When the comparison result shows that the decryption result matches the infotainment system password, the infotainment system engineering mode is activated. When the comparison result shows that the decryption result does not match the infotainment system password, and the number of incorrect password comparisons reaches a preset threshold within a preset anti-brute-force time, the infotainment system engineering mode is not activated within a preset stop password comparison time. This enables dynamic password generation for the vehicle's infotainment system, facilitating easy password retrieval for after-sales service, effectively preventing brute-force attacks on the infotainment system, ensuring unauthorized access to the system, improving the security and reliability of the system, and increasing the speed and efficiency of random password generation and verification.
[0195] Accordingly, the present invention further provides a vehicle-mounted system password random generation and verification device.
[0196] Reference Figure 8 , Figure 8 This is a functional block diagram of the first embodiment of the vehicle-mounted password random generation and verification device of the present invention.
[0197] In a first embodiment of the vehicle infotainment system password random generation and verification device of the present invention, the vehicle infotainment system password random generation and verification device includes:
[0198] The access authentication module 10 is used to perform diagnostic access authentication for the current vehicle through the after-sales diagnostic instrument when entering the vehicle interface of the after-sales diagnostic instrument.
[0199] The password acquisition module 20 is used to acquire the diagnostic tool password and the vehicle system password after successful access authentication.
[0200] The verification and comparison module 30 is used to decrypt the diagnostic tool password using the vehicle system via a public key, obtain the decryption result, compare the decryption result with the vehicle system password, and determine whether to enable the vehicle system engineering mode based on the comparison result.
[0201] The access authentication module 10 is also used to connect the after-sales diagnostic tool to the on-board automatic diagnostic system (OBD) port of the current vehicle; when the after-sales diagnostic tool is detected to have entered the vehicle interface, it obtains the certificate and private key built into the after-sales diagnostic tool, and obtains the root certificate and public key corresponding to the private key of the diagnostic tool built into the current vehicle; and performs diagnostic access authentication on the current vehicle through the certificate, the private key of the diagnostic tool, the root certificate and the public key.
[0202] The access authentication module 10 is further configured to send the certificate to the current vehicle through the after-sales diagnostic instrument, and the current vehicle verifies the identity of the certificate according to the root certificate; after the verification is passed, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument; the after-sales diagnostic instrument encrypts the random number according to the diagnostic instrument private key to obtain encrypted data; the after-sales diagnostic instrument sends the encrypted data to the current vehicle, and the current vehicle decrypts the encrypted data using the public key; when the encrypted data is the same as the random number, it is determined that the access authentication is passed, and a session key is generated at the same time.
[0203] The password acquisition module 20 is further configured to, after the access authentication is passed, in response to a request for a vehicle machine password of the after-sales diagnostic instrument, send a password request instruction of the request for the vehicle machine password to the current vehicle; after a vehicle machine password generation system of the current vehicle receives the password request instruction, perform password generation to obtain a vehicle machine password; the current vehicle machine system encrypts the generated true random number, VIN and PDSN three parameters using a public key, and sends the encrypted parameters to the after-sales diagnostic instrument; the after-sales diagnostic instrument generates a diagnostic instrument password according to the encrypted parameters.
[0204] The password acquisition module 20 is further configured to, after the vehicle machine password generation system of the current vehicle receives the password request instruction, generate a true random number by a random number generator; obtain a vehicle identification code VIN of the current vehicle, and obtain a first hash value of the VIN by the vehicle machine password generation system through a hash algorithm; obtain a packet data service node PDSN of the current vehicle, and obtain a second hash value of the PDSN by the vehicle machine password generation system through a hash algorithm; encrypt the true random number, the first hash value and the second hash value using a preset encryption algorithm to dynamically generate a vehicle machine password.
[0205] The password acquisition module 20 is further configured to decrypt the encrypted parameters through the diagnostic instrument private key to obtain decrypted parameters; obtain a third hash value of the decrypted VIN code in the decrypted parameters through the hash algorithm; obtain a fourth hash value of the decrypted PDSN code in the decrypted parameters through the hash algorithm; encrypt the decrypted true random number, the third hash value and the fourth hash value in the decrypted parameters using the preset encryption algorithm to generate a diagnostic instrument password.
[0206] The verification comparison module 30 is further configured to encrypt the diagnostic instrument password by the diagnostic instrument private key through the after-sales diagnostic instrument to obtain an encrypted diagnostic instrument password, and send the encrypted diagnostic instrument password to the current vehicle; decrypt the encrypted diagnostic instrument password by the public key through the vehicle machine system of the current vehicle to obtain a decryption result; compare the decryption result with the vehicle machine password through the password comparison module to obtain a comparison result; when the comparison result is that the decryption result is the same as the vehicle machine password, the vehicle machine engineering mode is started; and when the comparison result is that the decryption result is not the same as the vehicle machine password, and the number of password comparison errors reaches a preset number threshold within a preset anti-blast time, the vehicle machine engineering mode is not started within a preset stop password comparison time.
[0207] The steps of the functions of the vehicle machine password random generation verification device can refer to the steps of the vehicle machine password random generation verification method.
[0208] In addition, the embodiment of the present application further provides a storage medium, and the storage medium stores a vehicle machine password random generation verification program.
[0209] When entering the vehicle model interface of the after-sales diagnostic instrument, the current vehicle is diagnosed and accessed for authentication through the after-sales diagnostic instrument;
[0210] After the access authentication is passed, the diagnostic instrument password and the vehicle machine password are obtained;
[0211] The diagnostic instrument password is decrypted by the public key through the vehicle machine system to obtain a decryption result, and the decryption result is compared with the vehicle machine password, and whether the vehicle machine engineering mode is started is determined according to the comparison result.
[0212] Further, when the vehicle machine password random generation verification program is executed by the processor, the following operations are further implemented:
[0213] The after-sales diagnostic instrument is connected to the on-board diagnostic (OBD) port of the current vehicle;
[0214] When it is detected that the after-sales diagnostic instrument is operated to enter the vehicle model interface, the certificate and the diagnostic instrument private key built in the after-sales diagnostic instrument are obtained, and the root certificate built in the current vehicle and the public key corresponding to the diagnostic instrument private key are obtained;
[0215] The current vehicle is diagnosed and accessed for authentication through the certificate, the diagnostic instrument private key, the root certificate and the public key.
[0216] Further, when the vehicle machine password random generation verification program is executed by the processor, the following operations are further implemented:
[0217] sending the certificate to the current vehicle, and the current vehicle performing legitimacy verification on the identity of the certificate according to the root certificate;
[0218] after the legitimacy verification passes, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument;
[0219] encrypting the random number according to the diagnostic instrument private key to obtain encrypted data;
[0220] sending the encrypted data to the current vehicle by the after-sales diagnostic instrument, and the current vehicle decrypting the encrypted data using the public key;
[0221] when the encrypted data is the same as the random number, determining that the access authentication passes, and generating a session key.
[0222] Further, the vehicle machine password random generation verification program, when executed by the processor, further implements the following operations:
[0223] after the access authentication passes, in response to a vehicle machine password request of the after-sales diagnostic instrument, sending a password request instruction of the vehicle machine password request to the current vehicle;
[0224] after the vehicle machine password generation system of the current vehicle receives the password request instruction, performing password generation to obtain a vehicle machine password;
[0225] encrypting the generated true random number, VIN, and PDSN three parameters using a public key by the vehicle machine system of the current vehicle, and sending the encrypted encrypted parameters to the after-sales diagnostic instrument;
[0226] generating a diagnostic instrument password according to the encrypted parameters by the after-sales diagnostic instrument.
[0227] Further, the vehicle machine password random generation verification program, when executed by the processor, further implements the following operations:
[0228] after the vehicle machine password generation system of the current vehicle receives the password request instruction, generating a true random number by a random number generator;
[0229] obtaining a vehicle identification code VIN of the current vehicle, and obtaining a first hash value of the VIN by the vehicle machine password generation system through a hash algorithm;
[0230] obtaining a packet data service node PDSN of the current vehicle, and obtaining a second hash value of the PDSN by the vehicle machine password generation system through a hash algorithm;
[0231] The preset encryption algorithm is used to encrypt the true random number, the first hash value and the second hash value, and a car machine password is dynamically generated.
[0232] Further, when the car machine password random generation verification program is executed by the processor, the following operations are further implemented:
[0233] The encryption parameter is decrypted by a diagnosis instrument private key through the after-sales diagnosis instrument to obtain a decrypted parameter;
[0234] The decrypted VIN code in the decrypted parameter is subjected to the hash algorithm to obtain a third hash value;
[0235] The decrypted PDSN code in the decrypted parameter is subjected to the hash algorithm to obtain a fourth hash value;
[0236] The decrypted true random number in the decrypted parameter, the third hash value and the fourth hash value are encrypted by the preset encryption algorithm to generate a diagnosis instrument password.
[0237] Further, when the car machine password random generation verification program is executed by the processor, the following operations are further implemented:
[0238] The diagnosis instrument password is encrypted by a diagnosis instrument private key through the after-sales diagnosis instrument to obtain an encrypted diagnosis instrument password, and the encrypted diagnosis instrument password is sent to the current vehicle;
[0239] The encrypted diagnosis instrument password is decrypted by a public key through the car machine system of the current vehicle to obtain a decryption result;
[0240] The decryption result and the car machine password are compared by a password comparison module to obtain a comparison result;
[0241] When the comparison result is that the decryption result is the same as the car machine password, the car machine engineering mode is started;
[0242] When the comparison result is that the decryption result is not the same as the car machine password, and the number of password comparison errors reaches a preset number threshold within a preset anti-explosion time, the car machine engineering mode is not started within a preset stop password comparison time.
[0243] Those skilled in the art can understand that all or part of the steps of the methods in the above embodiments can be completed by instructing the relevant hardware through a program stored in a storage medium, and the program includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application; and the aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0244] It should be noted that in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or apparatus that includes the element.
[0245] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0246] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for randomly generating and verifying vehicle infotainment system passwords, characterized in that, The method for randomly generating and verifying the vehicle system password includes: When entering the vehicle interface of the after-sales diagnostic tool, the diagnostic access authentication of the current vehicle is performed through the after-sales diagnostic tool; After successful access authentication, obtain the diagnostic tool password and vehicle infotainment system password; The vehicle system uses a public key to decrypt the diagnostic tool password, obtains the decryption result, compares the decryption result with the vehicle system password, and determines whether to enable the vehicle system engineering mode based on the comparison result. The step of obtaining the diagnostic tool password and vehicle system password after successful access authentication includes: After successful access authentication, in response to the vehicle password request from the after-sales diagnostic instrument, the password request instruction of the vehicle password request is sent to the current vehicle. After receiving the password request instruction, the vehicle's in-vehicle password generation system performs password generation to obtain the in-vehicle password. The vehicle's infotainment system encrypts the generated true random number, VIN, and PDSN using a public key, and then sends the encrypted parameters to the after-sales diagnostic instrument. The after-sales diagnostic instrument generates a diagnostic instrument password based on the encryption parameters. Wherein, the step of the in-vehicle password generation system of the current vehicle receiving the password request instruction and performing password generation to obtain the in-vehicle password includes: After the vehicle's in-vehicle password generation system receives the password request instruction, a random number generator generates a truly random number. Obtain the Vehicle Identification Number (VIN) of the current vehicle, and use the vehicle password generation system to obtain the first hash value of the VIN through a hash algorithm; Obtain the Packet Data Service Node (PDSN) of the current vehicle, and use the vehicle password generation system to obtain a second hash value from the PDSN through a hash algorithm; The true random number, the first hash value, and the second hash value are encrypted using a preset encryption algorithm to dynamically generate the vehicle system password; The step of generating a diagnostic instrument password based on the encryption parameters using the after-sales diagnostic instrument includes: The encrypted parameters are decrypted using the diagnostic instrument's private key to obtain the decrypted parameters; The decryption VIN code in the decryption parameters is processed by the hash algorithm to obtain a third hash value; The decryption PDSN code in the decryption parameters is processed by the hash algorithm to obtain the fourth hash value; The diagnostic instrument password is generated by encrypting the decryption true random number, the third hash value, and the fourth hash value in the decryption parameters using the preset encryption algorithm.
2. The vehicle infotainment system password random generation and verification method as described in claim 1, characterized in that, When accessing the vehicle interface of the after-sales diagnostic tool, the diagnostic access authentication for the current vehicle is performed through the after-sales diagnostic tool, including: Connect the aftermarket diagnostic tool to the on-board diagnostic (OBD) port of the current vehicle; When the after-sales diagnostic tool is detected to have entered the vehicle interface, the certificate and private key built into the after-sales diagnostic tool are obtained, and the root certificate built into the current vehicle and the public key corresponding to the private key of the diagnostic tool are obtained. The diagnostic access authentication for the current vehicle is performed using the certificate, the diagnostic tool private key, the root certificate, and the public key.
3. The vehicle infotainment system password random generation and verification method as described in claim 2, characterized in that, The diagnostic access authentication of the current vehicle using the certificate, the diagnostic tool private key, the root certificate, and the public key includes: The certificate is sent to the current vehicle through the after-sales diagnostic instrument, and the current vehicle verifies the legitimacy of the certificate based on the root certificate; After the legality verification is passed, the current vehicle sends a 32-byte random number to the after-sales diagnostic instrument; The random number is encrypted using the after-sales diagnostic instrument based on the instrument's private key to obtain encrypted data; The encrypted data is sent to the current vehicle via the after-sales diagnostic instrument, and the current vehicle decrypts the encrypted data using the public key; When the encrypted data is the same as the random number, the access authentication is deemed successful, and a session key is generated.
4. The vehicle infotainment system password random generation and verification method as described in claim 1, characterized in that, The step of using the vehicle's infotainment system to decrypt the diagnostic tool's password using a public key, obtaining a decryption result, comparing the decryption result with the vehicle's infotainment password, and determining whether to enable the vehicle's engineering mode based on the comparison result includes: The diagnostic tool is encrypted using its private key to obtain the encrypted diagnostic tool password, and then the encrypted diagnostic tool password is sent to the current vehicle. The encrypted diagnostic tool password is decrypted using the public key through the vehicle's infotainment system to obtain the decryption result; The decryption result is compared with the vehicle system password using a password comparison module to obtain a comparison result. When the comparison result shows that the decryption result is the same as the vehicle system password, the vehicle system engineering mode is activated; If the comparison result shows that the decryption result is different from the vehicle system password, and the number of password comparison errors reaches a preset threshold within a preset anti-bombing time, the vehicle system engineering mode will not be activated within a preset stop password comparison time.
5. A vehicle-mounted system password random generation and verification device, characterized in that, The vehicle-mounted system password random generation and verification device includes: The access authentication module is used to perform diagnostic access authentication for the current vehicle through the after-sales diagnostic instrument when entering the vehicle interface of the after-sales diagnostic instrument. The password acquisition module is used to obtain the diagnostic tool password and the vehicle infotainment system password after successful access authentication. The verification and comparison module is used to decrypt the diagnostic tool password using the vehicle system via a public key, obtain the decryption result, compare the decryption result with the vehicle system password, and determine whether to enable the vehicle system engineering mode based on the comparison result. The password acquisition module is further configured to, after successful access authentication, respond to the vehicle password request from the after-sales diagnostic instrument by sending a password request instruction to the current vehicle; upon receiving the password request instruction, the vehicle password generation system of the current vehicle performs password generation to obtain the vehicle password; encrypts the generated true random number, VIN, and PDSN using a public key through the vehicle's vehicle system, and sends the encrypted parameters to the after-sales diagnostic instrument; and the after-sales diagnostic instrument generates a diagnostic instrument password based on the encrypted parameters. The password acquisition module is further configured to: generate a true random number using a random number generator after the vehicle's in-vehicle password generation system receives the password request instruction; obtain the vehicle identification number (VIN) of the current vehicle and use the in-vehicle password generation system to obtain a first hash value by hashing the VIN using a hash algorithm; obtain the packet data service node (PDSN) of the current vehicle and use the in-vehicle password generation system to obtain a second hash value by hashing the PDSN using a hash algorithm; and encrypt the true random number, the first hash value, and the second hash value using a preset encryption algorithm to dynamically generate the in-vehicle password. The password acquisition module is further configured to decrypt the encrypted parameters using the diagnostic instrument's private key to obtain decrypted parameters; obtain a third hash value by applying the hash algorithm to the decrypted VIN code in the decrypted parameters; obtain a fourth hash value by applying the hash algorithm to the decrypted PDSN code in the decrypted parameters; and encrypt the decrypted true random number in the decrypted parameters, the third hash value, and the fourth hash value using the preset encryption algorithm to generate a diagnostic instrument password.
6. A vehicle-mounted system password random generation and verification device, characterized in that, The vehicle infotainment password random generation and verification device includes: a memory, a processor, and a vehicle infotainment password random generation and verification program stored in the memory and executable on the processor. The vehicle infotainment password random generation and verification program is configured to implement the steps of the vehicle infotainment password random generation and verification method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a vehicle system password random generation and verification program, which, when executed by the processor, implements the steps of the vehicle system password random generation and verification method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Identity authentication method, positioning device and to-be-unlocked end
CN110489958A
Identity verification method and system of in-vehicle infotainment engineering mode, and vehicle
CN118074923A