CN117831158A - Key writing and reading method, device and vehicle - Google Patents
Key writing and reading method, device and vehicle Download PDFInfo
- Publication number
- CN117831158A CN117831158A CN202211192610.7A CN202211192610A CN117831158A CN 117831158 A CN117831158 A CN 117831158A CN 202211192610 A CN202211192610 A CN 202211192610A CN 117831158 A CN117831158 A CN 117831158A
- Authority
- CN
- China
- Prior art keywords
- key
- target
- target key
- encrypted data
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/08—Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
- G07C5/0808—Diagnosing performance data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0894—Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
- G07C2009/00412—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal being encrypted
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/34—Encoding or coding, e.g. Huffman coding or error correction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/84—Vehicles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Lock And Its Accessories (AREA)
Abstract
The application relates to a key writing and reading method, a device and a vehicle, which comprise the steps of receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes; transmitting the first target key to the key in a low-frequency mode; receiving a first target key completion storage identifier returned by the key and a first random position; transmitting a second target key to the key; and receiving a second target key returned by the key to finish storing the identification and the second random position. According to the method, the original key and the vehicle are changed, the key related to the vehicle authentication is used as a matching standard, the second target key is added to serve as a special key, the first target key and the second target key are combined to be randomly stored together, and the situation that any person has universal equipment is avoided, and information inside the key is read only by reading the first target key.
Description
Technical Field
The application relates to the technical field of vehicles, in particular to a key writing-in and reading-out method and device and a vehicle.
Background
With the promotion of vehicle configuration, the smart key has become a standard configuration of vehicles at present. Each manufacturer can use various key chips, and each automobile manufacturer can match the intelligent key in the production line, namely, the key is written into the key through the production line for vehicle authentication.
Because the production line only writes in the key related to the vehicle authentication, and the current chip generally has no hardware protection mechanism, the key information stored in the key can be read after the related personnel take the equipment provided by the chip manufacturer, so that the vehicle becomes unsafe to a certain extent.
In addition, because special tools are needed for reading, the key information cannot be acquired when the key information is needed by engineering personnel without equipment, and other personnel can only be relied on.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a key writing and reading method, a device and a vehicle.
According to a first aspect of embodiments of the present application, a key writing method is provided, applied to a vehicle-end controller, and the method includes:
receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes;
transmitting the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory;
receiving the first target key completion storage identifier returned by the key and the first random position;
Transmitting a second target key to the key, such that the key stores the second target key in a second random location of the target memory;
and receiving the second target key returned by the key to finish storing the identification and the second random position.
Optionally, after the step of receiving the second target key returned by the key to store the identifier and the second random location, the method further includes:
sending matching completion information to the diagnostic apparatus when the first target key and the second target key are detected to be matched with the keys respectively;
and receiving the target memory storage permission change completion identification sent by the key, and sending the target memory storage permission change completion identification to the diagnostic instrument.
Optionally, the sending the matching completion information to the diagnostic apparatus when the first target key and the second target key are detected to match the keys respectively includes:
controlling the first target key and the second target key to respectively perform matching processing with the key, so that the key sets the reading authority corresponding to the target memory as key reading under the condition that matching is completed, and changes the state corresponding to the target memory into a matching completion state;
And sending matching completion information to the diagnostic instrument when the matching completion is detected.
Optionally, the first target key includes a read key and an interaction key, where the read key is used to encrypt the read target memory, and the interaction key is used to encrypt the key and the diagnostic apparatus in a case of interaction.
According to a second aspect of embodiments of the present application, there is provided a key reading method applied to a diagnostic apparatus for generating a first target key based on a vehicle code, the method comprising:
under the condition that the receiving of the matching completion information is detected, acquiring user parameter information and vehicle codes;
acquiring first encrypted data according to the user parameter information and the vehicle code;
transmitting first encrypted data corresponding to the vehicle code to a key in a low-frequency mode, so that the key decrypts the first encrypted data according to a read key in the first target key;
receiving second encrypted data sent by the key, wherein the second encrypted data is generated by the key through encryption processing of the decrypted first encrypted data by an interactive key in the first target key;
Decrypting the second encrypted data according to the interactive key, and encrypting the decrypted second encrypted data by using a third target key to generate third encrypted data;
the third encrypted data is sent to the server, so that the server judges whether the diagnostic instrument meets the reading condition according to the third encrypted data;
determining whether to read target key information according to the judgment result returned by the server
According to a third aspect of embodiments of the present application, there is provided a key writing apparatus, the apparatus comprising:
the first receiving module is used for receiving a first target key sent by the diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to the vehicle code;
the first sending module is used for sending the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory;
the second receiving module is used for receiving the first target key completion storage identifier returned by the key and the first random position;
a second transmitting module, configured to transmit a second target key to the key, so that the key stores the second target key in a second random location of the target memory;
And the third receiving module is used for receiving the second target key completion storage identification returned by the key and the second random position.
According to a fourth aspect of embodiments of the present application, there is provided a key reading device, the device comprising:
the first acquisition module is used for acquiring user parameter information and vehicle codes under the condition that the receiving of the matching completion information is detected;
the second acquisition module is used for acquiring first encrypted data according to the user parameter information and the vehicle code;
the second sending module is used for sending first encrypted data corresponding to the vehicle code to a key in a low-frequency mode so that the key decrypts the first encrypted data according to a read key in the first target key;
the receiving module is used for receiving second encrypted data sent by the key, wherein the second encrypted data is generated by the key through encryption processing of the decrypted first encrypted data by an interactive key in the first target key;
the decryption module is used for decrypting the second encrypted data according to the interactive key, and encrypting the decrypted second encrypted data by using a third target key to generate third encrypted data;
The judging module is used for sending the third encrypted data to the server so that the server judges whether the diagnostic instrument meets the reading condition according to the third encrypted data;
and the determining module is used for determining whether to read the target key information according to the judgment result returned by the server.
According to a fifth aspect of embodiments of the present application, there is provided a vehicle including the key writing device of the third aspect of the present application, or the key reading device of the fourth aspect.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
the method comprises the steps of receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes; transmitting the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory; receiving the first target key completion storage identifier returned by the key and the first random position; and sending a second target key to the key so that the key stores the second target key in a second random position of the target memory, and receiving the second target key completion storage identification returned by the key and the second random position. The method changes the original key and the vehicle only through the key related to vehicle authentication as a matching standard, and combines the first target key and the second target key to perform random storage together by adding the second target key as a special key, so that the situation that any person has universal equipment is avoided, and only the first target key is read to read information in the key.
In addition, through verifying user parameter information and vehicle code, and then decrypting encrypted transmission data through a first target key, the problem that a proprietary tool is required to read key information is solved, and when no engineering personnel of equipment need key information, whether the engineering personnel have authority and the first target key can be verified through combining with a server to acquire key information, and other personnel are not required to be relied on.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a key writing method according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating another key writing method according to an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of key reading according to an exemplary embodiment;
FIG. 4 is a flow chart illustrating another key reading method according to an exemplary embodiment;
FIG. 5 is a block diagram of a key writing apparatus according to an exemplary embodiment;
FIG. 6 is a block diagram of a key reading device shown according to an exemplary embodiment;
fig. 7 is a schematic diagram of a key write and read hardware architecture, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
It should be noted that, the hardware architecture of the embodiment of the present application is shown in fig. 7, and fig. 7 is a schematic diagram of a key writing and reading hardware architecture according to an exemplary embodiment, where the key slot is a position where a diagnostic apparatus needs to directly read key information, the diagnostic apparatus supports a low-frequency signal inside, the low-frequency signal is directly communicated with the key at the key slot, the key and the vehicle end controller can be in communication connection after being matched, and the vehicle end controller and the diagnostic apparatus can be in communication connection.
A first embodiment of the present application relates to a key writing method, referring to fig. 1, fig. 1 is a flowchart of a key writing method provided in an embodiment of the present application, including the following steps:
step 101, receiving a first target key sent by a diagnostic apparatus, wherein the first target key is generated by the diagnostic apparatus according to vehicle codes.
In the embodiment of the present application, in the key writing portion, the vehicle end controller is used as a main body, first, a first target key sent by the diagnostic apparatus is received, specifically, in the process of matching a vehicle with the key, the diagnostic apparatus generates two sets of private keys according to a vehicle frame number, and meanwhile, the keys are respectively noted as a key 1 for reading key EEPROM data and a key 2 for interacting with the diagnostic apparatus, and then the keys are transferred to the vehicle end controller, wherein the key 1 for reading key EEPROM data is a read key in the first target key, the key 2 for interacting with the diagnostic apparatus is an interaction key in the first target key, and the vehicle frame number is a unique number corresponding to the vehicle, namely a vehicle code. In the field of vehicles, a diagnostic apparatus is a professional instrument for automobile detection, can detect the performance of a vehicle in real time and detect vehicle faults, and is a necessary tool for detecting the vehicle.
Further, the first target key comprises a read key and an interaction key, wherein the read key is used for encrypting the read target memory, and the interaction key is used for encrypting the key and the diagnostic instrument in the case of interaction processing.
It should be noted that, the first target key includes a read key and an interaction key, where the read key is a key 1 for reading EEPROM data of the key, the interaction key is a key 2 for interaction between the key and the diagnostic apparatus, the read key is used for encrypting the read target memory, and the interaction key is used for reading key information between the key and the diagnostic apparatus or encrypting the read target memory in case of interaction processing.
Step 102, the first target key is sent to a key in a low-frequency mode, so that the key stores the first target key in a first random position of a target memory.
It should be noted that, in this embodiment of the present application, after the vehicle-end controller receives the first target key, the vehicle-end controller actively recognizes that the key includes the key 1 for reading the key EEPROM data and the key 2 for interacting with the diagnostic apparatus, and when detecting that the first target key meets the requirement or the preset condition, the vehicle-end controller sends the first target key to the key through a low-frequency transmission mode, so that the low-frequency is free to use and the electric wave penetrating power is strong, and therefore, in this application, the diagnostic apparatus, the vehicle-end controller and the key can use low-frequency signal transmission for communication.
When the key receives the first target key, the first target key is stored in an EEPROM (charged erasable programmable read only memory, electrically Erasable Programmable read only memory), and it is to be noted that the key includes a target memory, and when the key stores the first target key, the storage position is randomly determined, and no fixed position is needed in advance, but after random storage, the key records the stored position information, and returns the stored result to the vehicle-end controller, and meanwhile, the stored result is fed back to the specific position of the first target key in the target memory, that is, the corresponding first random position of the first target key. It should be noted that, through carrying out the random storage to the key, can reach only key and vehicle end controller have the specific position information of first target key in storage, in the prior art, store the first target key that is correlated with vehicle authentication in fixed position, can prevent effectively that relevant personnel from taking the equipment that the chip manufacturer provided after can read the key information that the key stored.
Step 103, receiving the first target key completion storage identifier returned by the key and the first random position.
Thus, after step 102, the vehicle-side controller receives the successful key deposit result and the key storage location, i.e., the first target key completion storage identifier returned by the key and the first random location.
Step 104, sending a second target key to the key, so that the key stores the second target key in a second random position of the target memory.
And step 105, receiving the second target key returned by the key to finish storing the identification and the second random position.
In the steps 104-105, after the vehicle-end controller receives the result of successful key storage and the storage position of the key, the keys for authentication of the other vehicles and the key are written into the key according to the normal key matching process, specifically, a second target key is generated based on the preset key matching rule, and the second target key is sent to the key, so that the key stores the second target key in the second random position of the target memory, and when the key receives the key, the key performs related storage, but at the moment, the storage position corresponding to the first target key is not covered, and the storage result is fed back to the vehicle-end controller. Thus, the vehicle end controller receives the second target key completion storage identification returned by the key and the second random location.
The method and the device have the advantages that the first target key is generated based on the unique code corresponding to the vehicle, the key is randomly stored according to the first target key and the second target key which are sent by the vehicle end, the storage result is fed back to the vehicle end controller, the storage position information of the target key and the storage completion result are received through the vehicle end controller, authentication matching between the vehicle end controller and the key can be further achieved, the original key and the vehicle are changed to be used as matching standards only through keys related to vehicle authentication, the second target key is added to be used as a special key, the first target key and the second target key are combined to be randomly stored together, and information inside the key is prevented from being read only through reading the first target key under the condition that any person has universal equipment.
The method comprises the steps of receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes; transmitting the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory; receiving the first target key completion storage identifier returned by the key and the first random position; and sending a second target key to the key so that the key stores the second target key in a second random position of the target memory, and receiving the second target key completion storage identification returned by the key and the second random position. The method changes the original key and the vehicle only through the key related to vehicle authentication as a matching standard, and combines the first target key and the second target key to perform random storage together by adding the second target key as a special key, so that the situation that any person has universal equipment is avoided, and only the first target key is read to read information in the key.
A second embodiment of the present application relates to a key writing method, referring to fig. 2, fig. 2 is a flowchart of a key writing method provided in an embodiment of the present application, including the following steps:
step 101, receiving a first target key sent by a diagnostic apparatus, wherein the first target key is generated by the diagnostic apparatus according to vehicle codes.
Step 102, the first target key is sent to a key in a low-frequency mode, so that the key stores the first target key in a first random position of a target memory.
Step 103, receiving the first target key completion storage identifier returned by the key and the first random position.
Step 104, sending a second target key to the key, so that the key stores the second target key in a second random position of the target memory.
And step 105, receiving the second target key returned by the key to finish storing the identification and the second random position.
The above steps are discussed with reference to the foregoing, and are not repeated here.
And step 106, sending matching completion information to the diagnostic instrument when the first target key and the second target key are detected to be matched with the keys respectively.
Further, step 106 includes the following:
controlling the first target key and the second target key to respectively perform matching processing with the key, so that the key sets the reading authority corresponding to the target memory as key reading under the condition that matching is completed, and changes the state corresponding to the target memory into a matching completion state;
and sending matching completion information to the diagnostic instrument when the matching completion is detected.
It should be noted that, in this embodiment of the present application, when the vehicle-end controller controls the first target key and the second target key to respectively perform matching authentication with the key, at this time, the key will automatically change all keys, that is, the authority of the storage positions corresponding to the first target key and the second target key, into the authority of the storage positions corresponding to the first target key and the second target key, and then read the data after authentication, for example, a master key is used to unlock the vehicle, at this time, the vehicle-end controller must perform authentication before the position information corresponding to the first target key and the second target key is read, and needs to acquire the first target key and the second target key, at this time, the key will automatically change the original authority of reading the key information into the authority which can only be read after the user inputs the key, and delete the original data reading authority, and then the key feeds back the authority of the target memory to the vehicle-end controller to change successfully, and at the same time, the internal state of the memory is modified to be "matched", and the vehicle-end controller transfers the result to the diagnostic apparatus.
And step 107, receiving the target memory storage permission change completion identification sent by the key, and sending the target memory storage permission change completion identification to the diagnostic apparatus.
After receiving the successful result of the key storage, that is, receiving the second target key to finish the storage identification, the vehicle end controller authenticates the key with different keys, that is, authenticates and matches the first target key and the second target key with the key, and when all the authentications are successful, the vehicle end controller feeds back the successful key matching to the diagnostic apparatus, that is, the vehicle end controller sends the information of completion of the matching to the diagnostic apparatus.
Further, under the condition that the first target key and the second target key are successfully matched with the key respectively, the target memory which is sent by the key is received at the moment to store the permission modification completion identification, and the identification is sent to the diagnostic apparatus so that the diagnostic apparatus can know that the key is successfully matched and the permission is set to be completed.
According to the method and the device for reading the key information, under the condition that the first target key and the second target key are detected to be matched with the key respectively, the reading authority corresponding to the target memory is set to be the key reading, and the state corresponding to the control target memory is the matching completion state, namely, the positions corresponding to the first target key and the second target key can be read after authentication is carried out, the first target key and the second target key are required to be acquired, and the situation that key information stored in the key can be read after relevant personnel take equipment provided by a chip manufacturer can be prevented.
The method comprises the steps of receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes; transmitting the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory; receiving the first target key completion storage identifier returned by the key and the first random position; and sending a second target key to the key so that the key stores the second target key in a second random position of the target memory, and receiving the second target key completion storage identification returned by the key and the second random position. The method changes the original key and the vehicle only through the key related to vehicle authentication as a matching standard, and combines the first target key and the second target key to perform random storage together by adding the second target key as a special key, so that the situation that any person has universal equipment is avoided, and only the first target key is read to read information in the key.
A third embodiment of the present application relates to another key reading method, referring to fig. 3, fig. 3 is a flowchart of another key reading method provided in the embodiment of the present application, including the following steps:
it should be noted that, for the key reading method, two cases can be divided, specifically, the first case is that the key and the vehicle have completed matching; second, the key and the vehicle are not matched.
For the first case, steps 301-310 are elaborated.
In step 301, in the case of detecting that the reception of the matching completion information is completed, user parameter information and a vehicle code are acquired.
It should be noted that the user parameter information may be any parameter information that can perform identity authentication, such as an extracted face feature parameter or a fingerprint or pupil, for example, an engineer or a related person puts a key into a fixed position of the diagnostic apparatus, or may be a key slot, where the first reading on the interface of the diagnostic apparatus may be selected, that is, the matched key is read, and then the face information of the user and the vehicle code, for example, the frame number, are input to the diagnostic apparatus.
At this point the diagnostic instrument will obtain user parameter information and vehicle codes.
And 302, acquiring first encrypted data according to the user parameter information and the vehicle code.
Further, step 302 includes the following: the user parameter information is sent to a server, so that the server performs reading permission verification according to the user parameter information; and under the condition that the verification information returned by the server meets the reading authority is detected, receiving first encrypted data corresponding to the vehicle code sent by the server.
After obtaining the user parameter information and the vehicle code, the diagnostic instrument confirms that the face information is legal, applies for reading the matched key information to the server, and transmits the face information to the server, and when the server receives the face information transmitted by the diagnostic instrument, the identity of the user is confirmed, and whether the identity is registered and whether the access authority meets the requirement (core personnel) is confirmed.
When the verification information returned by the server meets the reading authority, the server calls a key corresponding to the vehicle type and encrypts data, the encrypted data are transmitted to the diagnostic apparatus, namely, the first encrypted data are sent to the diagnostic apparatus, and meanwhile, the diagnostic apparatus is informed of accessing the internal data of the key.
And 303, transmitting first encrypted data corresponding to the vehicle code to a key in a low-frequency mode, so that the key decrypts the first encrypted data according to a read key in the first target key.
After the diagnostic instrument receives the encrypted data and confirms that the encrypted data is accessed to the internal data of the key, the first encrypted data is transmitted to the key transmitting server at the key slot position through a low-frequency communication mode, at the moment, the key decrypts the data according to the read key in the stored first target key after receiving the encrypted data, and the read key is the key 1 for reading the EEPROM data of the key.
Step 304, receiving second encrypted data sent by the key, where the second encrypted data is generated by encrypting the decrypted first encrypted data by the key through an interaction key in the first target key.
When the key can decrypt the first encrypted data according to the read key in the first target key, after the decryption, the key encrypts the decrypted first encrypted data by using the interactive key in the first target key, namely generates second encrypted data, and sends the second encrypted data to the diagnostic apparatus.
Thus, the diagnostic instrument can receive the second encrypted data transmitted by the key.
And 305, decrypting the second encrypted data according to the interactive key, and encrypting the decrypted second encrypted data by using a third target key to generate third encrypted data.
After receiving the second encrypted data, the diagnostic apparatus also stores the first target key, so that the diagnostic apparatus decrypts the second encrypted data by the interactive key, and encrypts the decrypted second encrypted data by using the third target key to generate third encrypted data. It should be noted that, for the third target key, a set of private keys is used to encrypt the interactive information when the server and the diagnostic apparatuses transmit the information, and the key is the third target key generated by the vehicle factory server according to the unique serial number corresponding to the diagnostic apparatus when each diagnostic apparatus purchases.
And 306, transmitting the third encrypted data to the server so that the server can judge whether the diagnostic apparatus meets the reading condition according to the third encrypted data.
Therefore, after encrypting the decrypted second encrypted data according to the third target key, third encrypted data is generated, at this time, the diagnostic apparatus sends the third encrypted data to the server, and the server judges whether the key information can be read by the diagnostic apparatus after authentication according to the third encrypted data.
Step 307, determining whether to read the target key information according to the judgment result returned by the server.
In the embodiment of the application, the diagnostic apparatus displays readable key information after receiving the information transmitted by the server, selects the key information, and transmits the selection result to the server, namely, determines whether to read the target key information according to the judgment result returned by the server.
Further, after step 307, as shown in fig. 4, the following steps are further included:
step 308, when it is detected that the target key information is read, the read key information is sent to a server, so that the server sends a read request corresponding to the target key information to the key through the diagnostic apparatus according to the target key information, and encrypts the target key information.
Step 309, receiving the encrypted target key information returned by the server.
And 310, performing decryption reading processing on the encrypted target key information.
In the above steps 308-310, when the diagnostic apparatus can read the target key information, the server sends a read request to the key through the diagnostic apparatus according to the content to be read, and it needs to be explained that the information transmission still needs to be encrypted at this time, the key feeds back relevant information according to the read request, the fed back information needs to be encrypted and then is sent to the background of the vehicle factory through the diagnostic apparatus, and when the key reads the data from the diagnostic apparatus, the data is encrypted by using the interaction key in the first target key, so as to prevent the data from being read. The server decrypts the data, re-encrypts the data and transmits the decrypted data to the diagnostic instrument, the diagnostic instrument decrypts the data and displays the decrypted data to the target user, the target user can read the key information through completing verification, a special tool is not needed, and engineering personnel without equipment can rapidly acquire the key information when the key information is needed.
For the second case, specifically, the engineering personnel puts the key into the fixed position of the diagnostic instrument, selects the unmatched key read on the interface of the diagnostic instrument, then inputs the face information of the engineering personnel and the vehicle code to the diagnostic instrument, and the diagnostic instrument confirms that the face information is legal and then applies for reading the unmatched key information to the server, at this time, the whole information interaction process can carry out encryption and decryption operation based on the default key to prevent information leakage, wherein the default key can be a key which can be encrypted and decrypted and is generated based on any encryption algorithm.
In the embodiment of the application, the user parameter information and the vehicle code are verified, and then the encrypted transmission data is decrypted through the first target key, so that the problem that a special tool is needed to read key information is solved, and when no equipment engineering personnel need the key information, whether the engineering personnel have authority and the first target key can be verified through the combination server to acquire the key information, and other personnel are not needed.
It should be noted that all embodiments in this embodiment are only for facilitating the understanding of the technical solution in this embodiment by those skilled in the art, and are not limited to the structure in this embodiment.
A fourth embodiment of the present application relates to a key writing apparatus, as shown in fig. 5, fig. 5 is a block diagram of an apparatus for key writing, according to an exemplary embodiment, the apparatus including the following modules:
a first receiving module 401, configured to receive a first target key sent by a diagnostic apparatus, where the first target key is generated by the diagnostic apparatus according to a vehicle code;
a first transmitting module 402, configured to transmit the first target key to a key in a low frequency manner, so that the key stores the first target key in a first random location of a target memory;
a second receiving module 403, configured to receive the first target key completion storage identifier returned by the key and the first random location;
a second sending module 404, configured to send a second target key to the key, so that the key stores the second target key in a second random location in the target memory;
and a third receiving module 405, configured to receive the second target key completion storage identifier returned by the key and the second random location.
Further, the apparatus further comprises:
the third sending module is used for sending matching completion information to the diagnostic instrument when the first target key and the second target key are detected to be matched with the keys respectively;
And the fourth receiving module is used for receiving the target memory storage permission change completion identification sent by the key and sending the target memory storage permission change completion identification to the diagnostic instrument.
Further, the third transmitting module includes;
the control sub-module is used for controlling the first target key and the second target key to be matched with the key respectively, so that the key sets the reading authority corresponding to the target memory as key reading under the condition that matching is completed, and the state corresponding to the target memory is changed into a matching completion state;
and the sending sub-module is used for sending matching completion information to the diagnostic instrument under the condition that the matching completion is detected.
A fifth embodiment of the present application relates to a key reading device, as shown in fig. 6, fig. 6 is a block diagram of a device for reading a key, according to an exemplary embodiment, the device comprising the following modules:
a first obtaining module 501, configured to obtain user parameter information and a vehicle code when it is detected that the matching is completed;
a second obtaining module 502, configured to obtain first encrypted data according to the user parameter information and the vehicle code;
A second transmitting module 503, configured to transmit, to a key, first encrypted data corresponding to the vehicle code in a low frequency manner, so that the key decrypts the first encrypted data according to a read key in the first target key;
a receiving module 504, configured to receive second encrypted data sent by the key, where the second encrypted data is generated by encrypting, by the key, the decrypted first encrypted data by using an interaction key in the first target key;
the decryption module 505 is configured to decrypt the second encrypted data according to the interaction key, and encrypt the decrypted second encrypted data with a third target key to generate third encrypted data;
a judging module 506, configured to send the third encrypted data to the server, so that the server judges whether the diagnostic apparatus meets a reading condition according to the third encrypted data;
and the determining module 507 is configured to determine whether to read the target key information according to a determination result returned by the server.
Further, the second obtaining module 502 includes:
the reading sub-module is used for sending the user parameter information to a server so that the server can carry out reading authority verification according to the user parameter information;
And the receiving sub-module is used for receiving the first encrypted data corresponding to the vehicle code sent by the server under the condition that the verification information returned by the server is detected to meet the reading authority.
Further, the apparatus further comprises:
the third sending module is used for sending the read key information to a server under the condition that the read key information is detected to be read, so that the server sends a read request corresponding to the target key information to the key through the diagnostic instrument according to the target key information, and encrypts the target key information;
the encryption receiving module is used for receiving the encrypted target key information returned by the server;
and the reading module is used for carrying out decryption reading processing on the encrypted target key information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has outlined rather broadly the more detailed description of the invention in order that the detailed description of the invention that follows may be better understood, and in order that the present principles and embodiments may be better understood; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. A key writing method applied to a vehicle-end controller, the method comprising:
receiving a first target key sent by a diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to vehicle codes;
transmitting the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory;
receiving the first target key completion storage identifier returned by the key and the first random position;
transmitting a second target key to the key, such that the key stores the second target key in a second random location of the target memory;
and receiving the second target key returned by the key to finish storing the identification and the second random position.
2. The method of claim 1, wherein after the step of receiving the second target key returned by the key completes storing an identification and the second random location, the method further comprises:
sending matching completion information to the diagnostic apparatus when the first target key and the second target key are detected to be matched with the keys respectively;
And receiving the target memory storage permission change completion identification sent by the key, and sending the target memory storage permission change completion identification to the diagnostic instrument.
3. The method of claim 2, wherein the sending match completion information to the diagnostic instrument if it is detected that the first target key and the second target key respectively match the keys comprises:
controlling the first target key and the second target key to respectively perform matching processing with the key, so that the key sets the reading authority corresponding to the target memory as key reading under the condition that matching is completed, and changes the state corresponding to the target memory into a matching completion state;
and sending matching completion information to the diagnostic instrument when the matching completion is detected.
4. The method of claim 1, wherein the first target key comprises a read key and an interaction key, wherein the read key is used to encrypt a read target memory and the interaction key is used to encrypt if the key and the diagnostic instrument interact.
5. A key reading method, characterized by being applied to a diagnostic apparatus for generating a first target key based on a vehicle code, the method comprising:
under the condition that the receiving of the matching completion information is detected, acquiring user parameter information and vehicle codes;
acquiring first encrypted data according to the user parameter information and the vehicle code;
transmitting first encrypted data corresponding to the vehicle code to a key in a low-frequency mode, so that the key decrypts the first encrypted data according to a read key in the first target key;
receiving second encrypted data sent by the key, wherein the second encrypted data is generated by the key through encryption processing of the decrypted first encrypted data by an interactive key in the first target key;
decrypting the second encrypted data according to the interactive key, and encrypting the decrypted second encrypted data by using a third target key to generate third encrypted data;
the third encrypted data is sent to the server, so that the server judges whether the diagnostic instrument meets the reading condition according to the third encrypted data;
And determining whether to read the target key information according to the judgment result returned by the server.
6. The method of claim 5, wherein the obtaining first encrypted data from the user parameter information and a vehicle code comprises:
the user parameter information is sent to a server, so that the server performs reading permission verification according to the user parameter information;
and under the condition that the verification information returned by the server meets the reading authority is detected, receiving first encrypted data corresponding to the vehicle code sent by the server.
7. The method of claim 6, wherein after the step of determining whether to read key information according to the determination result returned from the server, the method further comprises:
when the reading of the target key information is detected, the reading key information is sent to a server, so that the server sends a reading request corresponding to the target key information to the key through the diagnostic instrument according to the target key information, and the target key information is encrypted;
receiving the encrypted target key information returned by the server;
And carrying out decryption reading processing on the encrypted target key information.
8. A key writing apparatus, the apparatus comprising:
the first receiving module is used for receiving a first target key sent by the diagnostic instrument, wherein the first target key is generated by the diagnostic instrument according to the vehicle code;
the first sending module is used for sending the first target key to a key in a low-frequency mode so that the key stores the first target key in a first random position of a target memory;
the second receiving module is used for receiving the first target key completion storage identifier returned by the key and the first random position;
a second transmitting module, configured to transmit a second target key to the key, so that the key stores the second target key in a second random location of the target memory;
and the third receiving module is used for receiving the second target key completion storage identification returned by the key and the second random position.
9. A key reading device, characterized by being applied to a diagnostic apparatus for generating a first target key based on a vehicle code, the method comprising:
The first acquisition module is used for acquiring user parameter information and vehicle codes under the condition that the receiving of the matching completion information is detected;
the second acquisition module is used for acquiring first encrypted data according to the user parameter information and the vehicle code;
the second sending module is used for sending first encrypted data corresponding to the vehicle code to a key in a low-frequency mode so that the key decrypts the first encrypted data according to a read key in the first target key;
the receiving module is used for receiving second encrypted data sent by the key, wherein the second encrypted data is generated by the key through encryption processing of the decrypted first encrypted data by an interactive key in the first target key;
the decryption module is used for decrypting the second encrypted data according to the interactive key, and encrypting the decrypted second encrypted data by using a third target key to generate third encrypted data;
the judging module is used for sending the third encrypted data to the server so that the server judges whether the diagnostic instrument meets the reading condition according to the third encrypted data;
And the determining module is used for determining whether to read the target key information according to the judgment result returned by the server.
10. A vehicle comprising the key writing device according to claim 8, or the key reading device according to claim 9.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211192610.7A CN117831158A (en) | 2022-09-28 | 2022-09-28 | Key writing and reading method, device and vehicle |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211192610.7A CN117831158A (en) | 2022-09-28 | 2022-09-28 | Key writing and reading method, device and vehicle |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117831158A true CN117831158A (en) | 2024-04-05 |
Family
ID=90515836
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211192610.7A Pending CN117831158A (en) | 2022-09-28 | 2022-09-28 | Key writing and reading method, device and vehicle |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117831158A (en) |
-
2022
- 2022-09-28 CN CN202211192610.7A patent/CN117831158A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108122311B (en) | Vehicle virtual key implementation method and system | |
| CN100541366C (en) | Vehicle information rewriting system | |
| US9143320B2 (en) | Electronic key registration system | |
| US8595498B2 (en) | Method for authenticating access to a secured chip by test device | |
| CN110138562B (en) | Certificate issuing method, device and system of intelligent equipment | |
| US5548721A (en) | Method of conducting secure operations on an uncontrolled network | |
| CN112632521B (en) | Request response method and device, electronic equipment and storage medium | |
| JPH086520B2 (en) | Remote access system | |
| JP2019009688A (en) | Maintenance system and maintenance method | |
| CN115866570B (en) | Offline binding method, device, vehicle and medium for vehicle-mounted NFC card key | |
| CN117527386B (en) | Method, system, mobile device, vehicle end and storage medium for transmitting remote instruction | |
| CN115066863A (en) | Systems and techniques for cross-account device key transfer in a benefit denial system | |
| CN108116367B (en) | Keyless system matching method and keyless matching system | |
| JP5178249B2 (en) | Key authentication system | |
| CN109743283B (en) | Information transmission method and equipment | |
| CN114785532B (en) | Security chip communication method and device based on bidirectional signature authentication | |
| CN120691611A (en) | NFC-based vehicle-mounted wireless charging control method, device, and vehicle | |
| CN113905373B (en) | Electric automobile owner fingerprint management method and device | |
| CN117831158A (en) | Key writing and reading method, device and vehicle | |
| CN113572745A (en) | Authentication method, peripheral device, in-vehicle connector and server | |
| CN114286141B (en) | Method for realizing card-free condition receiving and set top box | |
| US8750522B2 (en) | Method and security system for the secure and unequivocal encoding of a security module | |
| US20070143607A1 (en) | Electronic device enabling hardware and methods | |
| CN111510416A (en) | Data information transmission method, electronic device and readable storage medium | |
| JP5985845B2 (en) | Electronic key registration method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |