CN102568062B - Encryption and decryption method for remote controller - Google Patents

Encryption and decryption method for remote controller Download PDF

Info

Publication number
CN102568062B
CN102568062B CN201110299153.7A CN201110299153A CN102568062B CN 102568062 B CN102568062 B CN 102568062B CN 201110299153 A CN201110299153 A CN 201110299153A CN 102568062 B CN102568062 B CN 102568062B
Authority
CN
China
Prior art keywords
code
data
central controller
deciphering
time
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.)
Active
Application number
CN201110299153.7A
Other languages
Chinese (zh)
Other versions
CN102568062A (en
Inventor
欧建平
秦浩
路影
陈文强
由毅
赵福全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Zhejiang Geely Automobile Research Institute Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Zhejiang Geely Automobile Research Institute Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Zhejiang Geely Automobile Research Institute Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN201110299153.7A priority Critical patent/CN102568062B/en
Publication of CN102568062A publication Critical patent/CN102568062A/en
Application granted granted Critical
Publication of CN102568062B publication Critical patent/CN102568062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Lock And Its Accessories (AREA)

Abstract

The invention relates to an encryption and decryption method for a remote controller with high security. The invention can solve the problem of low security in the prior art, the main points of a technical scheme are characterized in that the encryption and the decryption method of the remote controller comprises three phases of a learning phase, an encryption phase and a decryption execution phase. In the learning phase: a set sequence number and a non-linear transition table are stored in a first data memory and a second data memory; a random code S is generated by a central centralized control device according to program setting, then the encryption phase is provided; in the encryption phase: a read counting code, the sequence number and an operation code are arrayed in an order according to the program setting by a control chip to form an original data G0; a first encryption operation of the original data G0 and the non-linear transition table is carried out by the control chip to obtain a rolling code G1; a secondary encryption operation of the rolling code G1 and the random code S is carried out by the control chip to obtain a cryptograph F1, then the decryption execution phase is provided. The encryption and decryption method for the remote controller can enhance the security of the remote controller.

Description

Remote controller encrypting and decrypting method
Technical field
The present invention relates to a kind of encrypting and decrypting method, the encrypting and decrypting method that particularly a kind of applicable automobile remote controllers uses.
Background technology
The means that at present automobile remote controllers is encrypted are divided into and adopt two kinds of hardware encipher and software cryptographies.These two kinds of encryptions all can adopt rolling code to prevent that remote controller is replicated, and reach higher fail safe.But this higher fail safe is all comparatively speaking, once the algorithm of remote controller, parameter are divulged a secret, the remote controller of so same batch will all be decoded, be copied, and for using the car owner of same batch of remote controller, be all a kind of potential threat.Also have this type of safety problem even be widely regarded as now the remote controller of safe employing AES encryption, that is because AES encrypts or other block encryption algorithm all exists key, plaintext and algorithm all by remote controller manufacturer or programming personnel are grasped, cause as long as remote controller manufacturer or the programming personnel of beginning of production are leaked, or, in the time of transmission security key and plaintext, intercepted and captured with same frequency by lawless person, the remote controller of so same batch is easy to will be replicated, crack.
Chinese patent notification number CN2262322 Y, on September 10 1997 day for announcing, a kind of Multi-way wireless remote controller of multi-level encryption, a kind of Multi-way wireless remote controller of multi-level encryption are disclosed, comprise remote control transmitter and receiver of remote-control sytem, described remote control transmitter comprises a radiating circuit; A transistor matrix coding circuit being formed by coding integrated circuit and peripheral cell thereof; Receiver of remote-control sytem comprises a receiving circuit being made up of reception, amplification, demodulation, shaping unit; A decoding circuit; A random coded circuit being formed by switch integrated circuit, microprocessor and peripheral cell thereof; A switching circuit being formed by transistor and peripheral cell thereof; With one by the state latch output circuits for triggering that form with door integrated circuit, latch integrated circuit and peripheral cell.This technical scheme also can provide compared with remote controller, but its main purpose is to be " uniqueness " of remote controller so once its algorithm, parameter that still has remote controller is divulged a secret, the remote controller of so same batch is by the problem of all being decoded, copying.
Summary of the invention
Divulged a secret once the object of the invention is to solve algorithm, the parameter of remote controller in above-mentioned prior art, so remote controller password is cracked, the same batch of simultaneously nearly all problem that remote controller is also cracked simultaneously, provides a kind of encrypting and decrypting method just having compared with automobile remote controllers.
The technical solution adopted for the present invention to solve the technical problems is: a kind of remote controller encrypting and decrypting method, the hardware foundation of described remote controller encrypting and decrypting method is automobile remote controllers and the central controller that matches with automobile remote controllers, described automobile remote controllers comprises control chip, remote controller encrypting and decrypting method comprises three phases: learning phase, encryption stage and deciphering execution phase, wherein
Described learning phase is carried out in the time using automobile remote controllers, in the time that central controller is judged as first with automobile remote controllers communication, enters learning phase,
In learning phase, central controller produces a random code S according to program setting, and central controller is preserved this random code S and carried out communication with automobile remote controllers;
Encryption stage step: control chip produces corresponding command code according to user's operation, command code and the sequence number setting and non-linear conversion table process ordered arrangement and for the first time cryptographic calculation obtain rolling code G1, rolling code G1 and random code S do cryptographic calculation for the second time, obtain ciphertext F1, control chip is to central controller transmission ciphertext F1;
In in the deciphering execution phase, centre central controller reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1; And then rolling code G1 is done to the inverse operation of cryptographic calculation for the first time, then draw command code and sequence number according to data structure;
Central controller judges that according to sequence number whether ciphertext F1 is correct, how correctly executable operations code of ciphertext F1, otherwise refusal executable operations code.
By such setting, even ensured the sequence number that hardware environment of the present invention sets manually in process of production, non-linear conversion table all leaks, still can ensure that the hardware environment in the present invention can not be imitated, because having lacked random code S still cannot complete automobile remote controllers and copy, and random code S is produced at random by central controller, so random code S cannot be by manually normally obtaining, some random code S in same batch of hardware are obtained in the present invention even adopt extremity, but because each random code S is all not identical, so the product of same batch still can ensure safety, improve fail safe of the present invention, and the setting of random code S can complete in other places in nonproductive source completely, during such as this remote controller of purchase, start learning phase by buyer, even if beginning of production malice is leaked like this, also cannot constitute a threat to fail safe of the present invention.
As preferably, on control chip, be electrically connected with oscillating circuit, key circuit and the first data storage, control chip is successively by the first amplifying circuit, the first coupling circuit is electrically connected with the first communicator, control chip is successively by the second amplifying circuit, the second coupling circuit is electrically connected with the second communicator, described central controller is successively by the 3rd amplifying circuit, the 3rd coupling circuit is electrically connected with the 3rd communicator, described central controller is successively by the 4th amplifying circuit, the 4th coupling circuit is electrically connected with the 4th communicator, described central controller is electrically connected with the second data storage.Arrange like this, ensured that the first communicator and the 3rd communicator carry out communication, the second communicator and the 4th communicator carry out communication, and between the first communicator and the second communicator, frequency is different, the situation that there will not be synchronous signal to be intercepted and captured.
As preferably, described remote controller encrypting and decrypting method learning phase step, comprises the following steps:
Learning phase step 1: the sequence number setting and non-linear conversion table are stored in the first data storage, the second data storage;
Learning phase step 2: central controller produces a random code S according to program setting, and central controller is preserved this random code S to the second data storage and carried out communication by the 4th communicator and automobile remote controllers;
Learning phase step 3: automobile remote controllers receives random code S by the second communicator, and deposit this random code S in first data storage;
Learning phase step 4: remote controller encrypting and decrypting method completes learning phase step, enters the encryption stage.
Arrange like this, ensured that random code, sequence number and non-linear conversion table can be read by central controller and control chip.
As preferably, the described encryption stage comprises the following steps:
Encryption stage step 1: control chip produces corresponding command code according to user to the different operating of automobile remote controllers key circuit, and the every operation of key circuit once, control chip reads a count code in from control chip register, then after count code being added to one, again deposit register in, wait for when key circuit operates again, repeat to read;
Encryption stage step 2: control chip carries out ordered arrangement by the current count code reading, sequence number, command code according to program setting and forms initial data G0;
Encryption stage step 3: control chip reads non-linear conversion table from the first data storage, initial data G0 and non-linear conversion table are done cryptographic calculation for the first time by control chip, obtains rolling code G1;
Encryption stage step 4: control chip reads random code S from the first data storage, rolling code G1 and random code S are done cryptographic calculation for the second time by control chip, obtains ciphertext F1, and control chip transmits ciphertext F1 by the first communicator to central controller;
Encryption stage step 5: remote controller encrypting and decrypting method completes encryption stage step, enters the deciphering execution phase.
Arrange like this, ensured command code, count code, sequence number through with the cryptographic calculation for the first time of non-linear conversion table and with the cryptographic calculation for the second time of random code, draw the ciphertext F1 of higher-security
As preferably, the described deciphering execution phase comprises the following steps:
The deciphering execution phase one: central controller receives ciphertext F1 by the 3rd communicator;
The deciphering execution phase two: central controller reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1;
The deciphering execution phase three: central controller reads non-linear conversion table, and central controller is carried out the inverse operation of cryptographic calculation for the first time according to non-linear conversion table to rolling code G1, draws initial data G0;
The deciphering execution phase four: central controller, according to the solution read raw data G0 of data structure, obtains respectively the rear count code of deciphering, the rear sequence number of deciphering, command code;
The deciphering execution phase five: central controller is checked sequence number, when sequence number after deciphering from be stored in sequence number in the second data storage when different, central controller judges this ciphertext F1 mistake, refusal is carried out the deciphering execution phase six, when sequence number after deciphering be stored in sequence number in the second data storage when identical, central controller 20 judges that this ciphertext F1 is correct, carries out the deciphering execution phase six;
Carry out the deciphering execution phase six: central controller is checked the rear count code of deciphering, and after central controller identification deciphering, count code is effective, carry out the deciphering execution phase seven, otherwise refuse to carry out the deciphering execution phase seven;
Carry out the deciphering execution phase seven: count code after deciphering is covered the count code in the second data storage by central controller, performs an action according to command code simultaneously.
Arrange like this, can effectively be decrypted executable operations code to ciphertext F1.
As preferably, the clear data length that described cryptographic calculation is for the first time set is more than or equal to the data length of initial data G0, key data length is more than or equal to the data length of non-linear conversion table, the clear data length that described cryptographic calculation is for the second time set is more than or equal to the data length of rolling code G1, the key data length that described cryptographic calculation is for the second time set is more than or equal to the data length of random code S, carrying out for the first time before cryptographic calculation, adopt the method for data stuffing respectively non-linear conversion table and initial data G0 to be converted to and to meet key data and the clear data that cryptographic calculation requires for the first time, then carry out cryptographic calculation for the first time, carrying out for the second time before cryptographic calculation, adopt the method for data stuffing respectively rolling code G1 and random code S to be converted to and to meet key data and the clear data that cryptographic calculation requires for the second time, the method of described data stuffing is, in the data that need executing data to fill, increased fillibility data reaches and the method for setting data length by program setting, described fillibility data are random number, data 0 or do XOR and draw by extracting part divided data in the data that need executing data to fill.Arrange like this, ensured that the data length of plaintext and key can allow each initial data setting participate in computing, improved fail safe.
As preferably, in the described deciphering execution phase two: central controller reads random code S, draw clear data after ciphertext F1 being carried out to the inverse operation of cryptographic calculation for the second time, central controller is deleted fillibility data according to program setting and is drawn rolling code G1; In the described deciphering execution phase three: central controller reads non-linear conversion table, central controller draws clear data after rolling code G1 being carried out according to non-linear conversion table the inverse operation of cryptographic calculation for the first time, and central controller is deleted fillibility data according to program setting and drawn initial data G0.Arrange like this, deleted fillibility data, accelerated arithmetic speed.
As preferably, described cryptographic calculation for the first time adopts des encryption algorithm, and described cryptographic calculation for the second time adopts AES cryptographic algorithm.DES algorithm is the DSE arithmetic in cryptographic system, Data Encryption Standard is otherwise known as, it is the DSE arithmetic cryptographic algorithm of American I BM company development in 1972, in satisfactory situation, non-linear conversion table in the present invention is the key in standard des encryption algorithm, initial data G0 in the present invention is the plaintext in standard des encryption algorithm, aes algorithm is a kind of block encryption standard that Federal Government adopts, in many ways analyzed and widely the whole world use, in satisfactory situation, random code S in the present invention is the key in standard A ES cryptographic algorithm, rolling code G1 in the present invention is the plaintext in standard A ES cryptographic algorithm, simultaneously cryptographic calculation and cryptographic calculation employing for the second time for the first time be different cryptographic algorithm, reduce the possibility cracking after divulging a secret.
As preferably, described cryptographic calculation for the first time adopts des encryption algorithm, and described cryptographic calculation for the second time adopts des encryption algorithm.Because plaintext, the ciphertext of des encryption algorithm are all 64, so the ciphertext of cryptographic calculation can, directly as expressly participating in cryptographic calculation for the second time, reduce the process of data stuffing for the first time; Equally, because DES algorithm is to hop algorithm, so while carrying out DES decipherment algorithm, also do not need to get rid of invalid data, extract valid data, reduced data transaction link.
As preferably, in the described execution deciphering execution phase six, when being more than or equal to the counting code value being stored in the second data office memory, counting code value after deciphering adds 1 and when being less than or equal to the counting code value being stored in the second data storage and adding rated value, after central controller identification deciphering, count code is effective, carry out the deciphering execution phase seven, otherwise refusal is carried out the deciphering execution phase seven.Arrange like this, increase the verification of count code, further increase fail safe, wherein the setting of rated value can be 1 any integer of being greater than by program setting, here can be set to rated value is 200, and driving to press remote controller because general only needs once, but the generation in order to prevent from repeatedly repeating to press the problems such as remote controller, what rated value can be arranged is slightly large, is 200 can ensure that fail safe also there will not be the problem that repeatedly button cannot operate so rated value is set.
The invention has the beneficial effects as follows: the present invention can improve the fail safe of remote controller effectively, even if ensureing remote controller manufactures source and divulges a secret, the present invention still can ensure the high security of remote controller and not reproducible, even have remote controller to be cracked with in batch remote controller, still can there is higher-security with batch remote controller.
Brief description of the drawings
Fig. 1 is a kind of circuit theory diagrams of automobile remote controllers in the present invention;
Fig. 2 is a kind of circuit theory diagrams of central controller in the present invention;
Fig. 3 is a kind of main flow chart of the present invention;
Fig. 4 is a kind of flow chart in learning stage of the present invention;
Fig. 5 is a kind of flow chart in the stage of encrypting in the present invention;
Fig. 6 is a kind of flow chart of deciphering the execution phase in the present invention.
In figure: 10, control chip, 11, the first data storage, 12, the first amplifying circuit, 13, the first coupling circuit, 14, the first communicator, 15, the second amplifying circuit, 16, the second coupling circuit, 17, the second communicator, 18, key circuit, 19, oscillating circuit, 20, central controller, 21, the second data storage, 22, the 3rd amplifying circuit, 23, the 3rd coupling circuit, 24, the 3rd communicator, 25, the 4th amplifying circuit, 26, the 4th coupling circuit, 27, the 4th communicator.
Embodiment
Below by specific embodiment, and by reference to the accompanying drawings, technical scheme of the present invention is described in further detail.
Embodiment 1:
A kind of remote controller encrypting and decrypting method, in order to realize the method, needs following hardware foundation (referring to accompanying drawing 1), the central controller 20 that comprises battery-powered automobile remote controllers and match with automobile remote controllers.Automobile remote controllers comprises control chip 10, key circuit 18, oscillating circuit 19, the first data storage 11, the first amplifying circuit 12, the first coupling circuit 13, the first communicator 14, the second amplifying circuits 15, the second coupling circuit 16, the second communicator 17.Key circuit 18, oscillating circuit 19 and the first data storage 11 are all electrically connected with control chip 10, control chip 10 is electrically connected with the first communicator 14 by the first amplifying circuit 12 and the first coupling circuit 13 successively, and control chip 10 is electrically connected with the second communicator 17 by the second amplifying circuit 15 and the second coupling circuit 16 successively.On central controller 20, be electrically connected with the second data storage 21(referring to accompanying drawing 2), central controller 20 is electrically connected with the 3rd communicator 24 by the 3rd amplifying circuit 22 and the 3rd coupling circuit 23 successively, is electrically connected successively by the 4th amplifying circuit 25 and the 4th coupling circuit 26 with the 4th communicator 27.Key circuit 18 is that user is operated, 19 of oscillating circuits provide operating frequency, the first data storage 11, the second data storage 21 carries out data storage, control chip 10 in the present embodiment is the single-chip microcomputer with program memory function, central controller 20 is the central controller that lucky company produces, central controller 20 is arranged in car body and carries out communication with the interior each equipment of car, between central controller 20 and control chip 10, carry out communication by communicator, the first communicator 14 and the 3rd communicator 24 are high frequency communicator, the second communicator 17 and the 4th communicator 27 are low frequency communication device.
The present invention mainly comprises following three phases (referring to accompanying drawing 3): initialization S1, learning phase S3, encryption stage S4 and deciphering execution phase S5.
First central controller 20 carries out initialization S1, determine the stage according to judging that the register-bit of setting enters: whether use for the first time S2, whether the first use in the present embodiment specifically refers to is first and automobile remote controllers carries out communication, and the register-bit here can be carried out free setting according to programming by central controller 20.When central controller 20, according to this register-bit data judging, this time communication is the first communication of central controller 20 and automobile remote controllers, and the present invention enters learning phase S3, and meanwhile, central controller 20 is preserved the register-bit numerical value negate by program setting; When central controller 20, according to this register-bit data judging, this time communication is not the first communication of central controller 20 and automobile remote controllers, and the present invention enters encryption stage S4.
Learning phase S3 comprises the following steps:
Learning phase step 1 S31: the sequence number setting and non-linear conversion table are stored in the first data storage, the second data storage, adopt in the present embodiment central controller 20 to carry out communication by the 3rd communicator 24 with automobile remote controllers, central controller 20 transfers to automobile remote controllers by being stored in 21 li of sequence numbers that set of the second data storage and non-linear conversion table, and sequence number and non-linear conversion table are stored into the first data storage 11 by control chip 10; Non-linear conversion table is in the present embodiment to meet 64 bit data that des encryption algorithm secret key requires;
Learning phase step 2 S32: central controller 20 produces a random code S according to program setting, central controller 20 is preserved this random code S to the second data storage 21 and is carried out communication by the 4th communicator 27 with automobile remote controllers; The length of random code S is 256;
Learning phase step 3 S33: automobile remote controllers receives random code S by the second communicator 17, and deposit this random code S in first data storage 11;
Learning phase step 4 S34: remote controller encrypting and decrypting method completes learning phase step, enters the encryption stage;
Described encryption stage S4 comprises the following steps:
Encryption stage step 1 S41: control chip 10 produces corresponding command code according to user to the different operating of automobile remote controllers key circuit 18, and the every operation of key circuit once, control chip 10 reads the count code in control chip 10 registers, and again deposit register in after then count code being added to one, wait for when key circuit 18 operates again, read; The command code is here carried out free setting by control chip 10 according to programming, and the register-bit here can be carried out free setting according to programming by control chip 10;
Encryption stage step 2 S42: control chip carries out ordered arrangement by the current count code reading, sequence number, command code according to program setting and forms initial data G0; Initial data G0 carries out after being arranged in order by count code, sequence number, command code that shift operation forms in the present embodiment, 64 of initial data G0 deficiency, carry out data stuffing, supplied by data 0, form and meet 64 bit data that expressly require in des encryption algorithm.
Encryption stage step 3 S43: control chip 10 reads non-linear conversion table from the first data storage 11, the initial data G0 and the non-linear conversion table that complete data stuffing are done cryptographic calculation for the first time by control chip, obtains rolling code G1; What cryptographic calculation adopted for the first time is des encryption algorithm, and non-linear conversion table is the key in standard des encryption algorithm, and the initial data G0 in the present invention is the plaintext in standard des encryption algorithm after data stuffing, and the rolling code G1 drawing is 64.
Encryption stage step 4 S44: control chip reads random code S from the first data storage 11, rolling code G1 and random code S are done cryptographic calculation for the second time by control chip, obtain ciphertext F1, control chip transmits ciphertext F1 by the first communicator to central controller; In the present embodiment, cryptographic calculation employing for the second time is aes algorithm, it is wherein 256 as the length of the random code S of key, so the length of program setting key is 256, and can be set as arbitrarily 128,192 or 256 by program as rolling code G1 expressly, in the present embodiment, rolling code G1 forms 256 plaintexts that meet aes algorithm after data stuffing, wherein fillibility data can also can be filled or copy filling by rolling code G1 for data 0 for random number, adopt data 0 to fill in the present embodiment.
Encryption stage step 5 S45: remote controller encrypting and decrypting method completes encryption stage step, enters the deciphering execution phase;
Deciphering execution phase S5 comprises the following steps:
Deciphering execution phase one S51: central controller 20 receives ciphertext F1 by the 3rd communicator 24;
Deciphering execution phases two S52: central controller 20 reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1; As key, ciphertext F1 is carried out to AES decipherment algorithm by random code S, draw after padding data the plaintext of 256, then will inquire about according to desired location, by rolling code G1 extraction, draw rolling code G1;
Deciphering execution phase Three S's 53: central controller 20 reads non-linear conversion table, and central controller 20 is carried out the inverse operation of cryptographic calculation for the first time according to non-linear conversion table to rolling code G1, draws initial data G0; Be central controller 20 using rolling code G1 as ciphertext, using non-linear conversion table as key, carry out DES decipherment algorithm, the plaintext drawing is shifted and removes after the calculating of filler, draw initial data G0
Deciphering execution phases four S54: central controller 20, according to the solution read raw data G0 of data structure, obtains respectively the rear count code of deciphering, the rear sequence number of deciphering, command code; Central controller 20, according to order and the position of inserting the data such as count code, sequence number, command code, is read the rear count code of deciphering, the rear sequence number of deciphering, command code;
Deciphering execution phases five S55: central controller 20 is checked sequence number, then enters and judges the stage: whether carry out deciphering execution phase step 6 S56; When sequence number after deciphering be stored in sequence number in the second data storage 21 when different, central controller 20 judge this ciphertext F1 mistake, refusal is carried out and is deciphered execution phases six S57, deciphers the execution phase to finish S50; When sequence number after deciphering be stored in sequence number in the second data storage 21 when identical, central controller 20 judge that this ciphertext F1 is correct, execution phases six S57 is deciphered in execution;
Carry out deciphering execution phases six S57: central controller 20 is checked the rear count code of deciphering, then enters and judges the stage: whether carry out deciphering execution phase step 7 S58; When being more than or equal to the counting code value being stored in the second data office memory 21, counting code value after deciphering adds 1 and when being less than or equal to the counting code value being stored in the second data storage 21 and adding 200, after central controller 20 is assert deciphering, count code is effective, carry out deciphering execution phases seven S59, otherwise refusal is carried out deciphering execution phases seven S59, and the deciphering execution phase finishes S50;
Carry out deciphering execution phases seven S59: count code after deciphering is covered the count code being stored in the second data storage 21 by central controller 20, performs an action according to command code simultaneously.
Embodiment 2:
Basic hardware basis is identical with embodiment 1, difference be in, the first communicator 14 and the 3rd communicator 24 are low frequency communication device, the second communicator 17 and the 4th communicator 27 are high frequency communicator.
Embodiment 3:
The present embodiment is substantially the same manner as Example 1, and difference is in random code S in the present embodiment and meets 64 bit data that DES algorithm secret key requires, and comprises the key of 56 and 8 additional bit parity check positions, so also there is following difference:
The encryption stage step 4 S44 that do not coexist of the first place: control chip reads random code S from the first data storage 11, rolling code G1 and random code S are done cryptographic calculation for the second time by control chip, obtain ciphertext F1, control chip transmits ciphertext F1 by the first communicator to central controller; In the present embodiment, cryptographic calculation employing for the second time is DES algorithm, it is wherein 64 as the length of the random code S of key, and be also 64 as rolling code G1 expressly, so in the present embodiment, rolling code G1 does not need padding data can form 64 plaintexts that meet DES algorithm.
Second place's difference is to decipher execution phases two S52: central controller 20 reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1; As key, ciphertext F1 is carried out to AES decipherment algorithm by random code S, draw expressly and be 64 rolling code G1 without extracted data.
Embodiment 4:
The present embodiment is substantially the same manner as Example 1, difference is in the present embodiment, the clear data length that cryptographic calculation is set is for the first time greater than the data length of initial data G0, key data length is more than or equal to the data length of non-linear conversion table, the clear data length that described cryptographic calculation is for the second time set is greater than the data length of rolling code G1, the key data length that cryptographic calculation is set is for the second time greater than the data length of random code S, carrying out for the first time before cryptographic calculation, adopt the method for data stuffing respectively non-linear conversion table and initial data G0 to be converted to and to meet key data and the clear data that cryptographic calculation requires for the first time, then carry out cryptographic calculation for the first time, carrying out for the second time before cryptographic calculation, adopt the method for data stuffing respectively rolling code G1 and random code S to be converted to and to meet key data and the clear data that cryptographic calculation requires for the second time, fillibility data in the present embodiment are all to do XOR by extracting part divided data in the data that need executing data to fill to draw.
Above-described embodiment is preferably scheme of one of the present invention, not the present invention is done to any pro forma restriction, also has other variant and remodeling under the prerequisite that does not exceed the technical scheme that claim records.

Claims (10)

1. a remote controller encrypting and decrypting method, it is characterized in that: the hardware foundation of described remote controller encrypting and decrypting method is automobile remote controllers and the central controller (20) that matches with automobile remote controllers, described automobile remote controllers comprises control chip (10), remote controller encrypting and decrypting method comprises three phases: learning phase, encryption stage and deciphering execution phase, wherein
Described learning phase is carried out in the time using automobile remote controllers, in the time that central controller (20) is judged as first with automobile remote controllers communication, enters learning phase,
In learning phase, central controller (20) produces a random code S according to program setting, and central controller (20) is preserved this random code S and carried out communication with automobile remote controllers;
Encryption stage step: control chip (10) produces corresponding command code according to user's operation, command code, the sequence number setting and non-linear conversion table process ordered arrangement and for the first time cryptographic calculation obtain rolling code G1, rolling code G1 and random code S do cryptographic calculation for the second time, obtain ciphertext F1, control chip (10) is to central controller (20) transmission ciphertext F1;
In the deciphering execution phase, central controller (20) reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1; And then rolling code G1 is done to the inverse operation of cryptographic calculation for the first time, then draw command code and sequence number according to data structure;
Central controller (20) judges that according to sequence number whether ciphertext F1 is correct, as correctly executable operations code of ciphertext F1, otherwise refusal executable operations code.
2. remote controller encrypting and decrypting method according to claim 1, it is characterized in that: on control chip (10), be electrically connected with oscillating circuit (19), key circuit (18) and the first data storage (11), control chip (10) is successively by the first amplifying circuit (12), the first coupling circuit (13) is electrically connected with the first communicator (14), control chip (10) is successively by the second amplifying circuit (15), the second coupling circuit (16) is electrically connected with the second communicator (17), described central controller (20) is successively by the 3rd amplifying circuit (22), the 3rd coupling circuit (23) is electrically connected with the 3rd communicator (24), described central controller (20) is successively by the 4th amplifying circuit (25), the 4th coupling circuit (26) is electrically connected with the 4th communicator (27), described central controller (20) is electrically connected with the second data storage (21).
3. remote controller encrypting and decrypting method according to claim 2, is characterized in that: described learning phase, comprises the following steps:
Learning phase step 1: by the sequence number setting and non-linear conversion table be stored into the first data storage (11), the second data storage (21) is inner;
Learning phase step 2: central controller (20) produces a random code S according to program setting, central controller (20) is preserved this random code S to the second data storage (21) and is carried out communication by the 4th communicator (27) and automobile remote controllers;
Learning phase step 3: automobile remote controllers receives random code S by the second communicator (17), and deposit this random code S in the first data storage (11);
Learning phase step 4: remote controller encrypting and decrypting method completes learning phase step, enters the encryption stage.
4. remote controller encrypting and decrypting method according to claim 2, is characterized in that: the described encryption stage comprises the following steps:
Encryption stage step 1: control chip (10) produces corresponding command code according to user to the different operating of automobile remote controllers key circuit (18), and the every operation of key circuit (18) once, control chip (10) reads a count code from control chip (10) register, then after count code being added to one, again deposit register in, by the time, when key circuit (18) operates again, repeat to read;
Encryption stage step 2: control chip (10) carries out ordered arrangement by the current count code reading, sequence number, command code according to program setting and forms initial data G0;
Encryption stage step 3: control chip (10) reads non-linear conversion table from the first data storage (11), initial data G0 and non-linear conversion table are done cryptographic calculation for the first time by control chip (10), obtains rolling code G1;
Encryption stage step 4: control chip (10) reads random code S from the first data storage (11), rolling code G1 and random code S are done cryptographic calculation for the second time by control chip (10), obtain ciphertext F1, control chip (10) transmits ciphertext F1 by the first communicator (14) to central controller (20);
Encryption stage step 5: remote controller encrypting and decrypting method completes encryption stage step, enters the deciphering execution phase.
5. remote controller encrypting and decrypting method according to claim 3, is characterized in that: the described deciphering execution phase comprises the following steps:
The deciphering execution phase one: central controller (20) receives ciphertext F1 by the 3rd communicator (24);
The deciphering execution phase two: central controller (20) reads random code S, and ciphertext F1 is carried out to the inverse operation of cryptographic calculation for the second time, draws rolling code G1;
The deciphering execution phase three: central controller (20) reads non-linear conversion table, and central controller (20) is carried out the inverse operation of cryptographic calculation for the first time according to non-linear conversion table to rolling code G1, draws initial data G0;
The deciphering execution phase four: central controller (20), according to the solution read raw data G0 of data structure, obtains respectively the rear count code of deciphering, the rear sequence number of deciphering, command code;
The deciphering execution phase five: central controller (20) is checked sequence number, when sequence number after deciphering from be stored in sequence number in the second data storage (21) when different, central controller (20) judges this ciphertext F1 mistake, refusal is carried out the deciphering execution phase six, when sequence number after deciphering be stored in sequence number in the second data storage (21) when identical, central controller (20) judges that this ciphertext F1 is correct, carries out the deciphering execution phase six;
Carry out the deciphering execution phase six: central controller (20) is checked the rear count code of deciphering, after central controller (20) is assert deciphering, count code is effective, carry out and decipher the execution phase seven, otherwise refusal is carried out the deciphering execution phase seven;
Carry out the deciphering execution phase seven: count code after deciphering is covered the count code in the second data storage (21) by central controller (20), performs an action according to command code simultaneously.
6. remote controller encrypting and decrypting method according to claim 5, it is characterized in that: the clear data length that described cryptographic calculation is for the first time set is more than or equal to the data length of initial data G0, key data length is more than or equal to the data length of non-linear conversion table, the clear data length that described cryptographic calculation is for the second time set is more than or equal to the data length of rolling code G1, the key data length that described cryptographic calculation is for the second time set is more than or equal to the data length of random code S, carrying out for the first time before cryptographic calculation, adopt the method for data stuffing respectively non-linear conversion table and initial data G0 to be converted to and to meet key data and the clear data that cryptographic calculation requires for the first time, then carry out cryptographic calculation for the first time, carrying out for the first time before cryptographic calculation, adopt the method for data stuffing respectively rolling code G1 and random code S to be converted to and to meet key data and the clear data that cryptographic calculation requires for the second time, the method of described data stuffing is: in the data that need executing data to fill, increase fillibility data by program setting and reach setting data length, described fillibility data are random number, data 0 or do XOR and draw by extracting part divided data in the data that need executing data to fill.
7. according to the remote controller encrypting and decrypting method described in claim 5 or 6, it is characterized in that: in the described deciphering execution phase two: central controller (20) reads random code S, after ciphertext F1 being carried out to the inverse operation of cryptographic calculation for the second time, draw clear data, central controller (20) is deleted fillibility data according to program setting and is drawn rolling code G1; In the described deciphering execution phase three: central controller (20) reads non-linear conversion table, central controller (20) draws clear data after rolling code G1 being carried out according to non-linear conversion table the inverse operation of cryptographic calculation for the first time, and central controller (20) is deleted fillibility data according to program setting and drawn initial data G0.
8. remote controller encrypting and decrypting method according to claim 1, is characterized in that: described cryptographic calculation for the first time adopts des encryption algorithm, and described cryptographic calculation for the second time adopts AES cryptographic algorithm.
9. according to the remote controller encrypting and decrypting method described in claim 2 or 3 or 4 or 5, it is characterized in that: described cryptographic calculation for the first time adopts des encryption algorithm, described cryptographic calculation for the second time adopts des encryption algorithm.
10. remote controller encrypting and decrypting method according to claim 5, it is characterized in that: in the described execution deciphering execution phase six, when being more than or equal to the counting code value being stored in the second data storage, counting code value after deciphering adds 1 and when being less than or equal to the counting code value being stored in the second data storage (21) and adding rated value, after central controller (20) is assert deciphering, count code is effective, carry out the deciphering execution phase seven, otherwise refusal is carried out the deciphering execution phase seven.
CN201110299153.7A 2011-09-29 2011-09-29 Encryption and decryption method for remote controller Active CN102568062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110299153.7A CN102568062B (en) 2011-09-29 2011-09-29 Encryption and decryption method for remote controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110299153.7A CN102568062B (en) 2011-09-29 2011-09-29 Encryption and decryption method for remote controller

Publications (2)

Publication Number Publication Date
CN102568062A CN102568062A (en) 2012-07-11
CN102568062B true CN102568062B (en) 2014-06-18

Family

ID=46413399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110299153.7A Active CN102568062B (en) 2011-09-29 2011-09-29 Encryption and decryption method for remote controller

Country Status (1)

Country Link
CN (1) CN102568062B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566347A (en) * 2017-08-10 2018-01-09 北京洋浦伟业科技发展有限公司 Rolling code learning detection method and device, equipment and computer-readable recording medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104851257B (en) * 2014-12-19 2018-09-14 北汽福田汽车股份有限公司 Remote controler and its method, the device and method thereof for receiving remote controler message, vehicle
CN105120454B (en) * 2015-07-17 2019-07-02 北京奇虎科技有限公司 Information transferring method, networking cut-in method and corresponding terminal
CN105119900B (en) * 2015-07-17 2019-02-26 北京奇虎科技有限公司 Information secure transmission method, networking cut-in method and corresponding terminal
US10438431B2 (en) * 2016-06-30 2019-10-08 Integrated Device Technology, Inc. Wireless powered digital lock
CN106869616A (en) * 2017-03-05 2017-06-20 宁波亿拍客网络科技有限公司 A kind of dynamic puzzle-lock, dynamic cipher system and dynamic encryption and decryption system
CN109286487B (en) * 2017-07-19 2021-10-01 杭州海康威视数字技术股份有限公司 Remote control method and system for electronic equipment
CN107395603A (en) * 2017-07-28 2017-11-24 移康智能科技(上海)股份有限公司 The encryption and decryption method of control instruction transmission, terminal device/server
CN107393277A (en) * 2017-08-28 2017-11-24 江苏赫奕科技有限公司 Method of sending and receiving based on low-power consumption safe mode des encryption rolling code
CN107749795B (en) * 2017-10-13 2021-03-30 车展交通器材(台山)有限公司 Automobile remote control method based on rolling code secondary encryption
CN108492413A (en) * 2018-03-15 2018-09-04 广东西雅斯智能科技有限公司 Dynamic cipher generating method, password generator and coded lock

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898397A (en) * 1996-01-16 1999-04-27 Stanley Home Automation Remote control transmitter and method of operation
CN101662363A (en) * 2008-08-30 2010-03-03 怀化学院 Multi-layer rolling code encryption and decryption technology
CN101866534A (en) * 2010-01-29 2010-10-20 中南大学 Automobile remote-control key-free door control identity authentication method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231041B2 (en) * 2003-08-19 2007-06-12 General Motors Corporation Method, device, and system for secure motor vehicle remote keyless entry
CN101457610A (en) * 2009-01-05 2009-06-17 许李纳 Non-key system for automobile and communication encrypting method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898397A (en) * 1996-01-16 1999-04-27 Stanley Home Automation Remote control transmitter and method of operation
CN101662363A (en) * 2008-08-30 2010-03-03 怀化学院 Multi-layer rolling code encryption and decryption technology
CN101866534A (en) * 2010-01-29 2010-10-20 中南大学 Automobile remote-control key-free door control identity authentication method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566347A (en) * 2017-08-10 2018-01-09 北京洋浦伟业科技发展有限公司 Rolling code learning detection method and device, equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN102568062A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN102568062B (en) Encryption and decryption method for remote controller
CN102317904B (en) System and methods for encryption with authentication integrity
KR950001729B1 (en) Method of secure remote access
CN110098923B (en) Method and equipment for generating and verifying temporary password
US4264782A (en) Method and apparatus for transaction and identity verification
CN104410616A (en) Method and system for encrypting, decrypting and transmitting data
JPS6014353B2 (en) digital signature device
RU2004127588A (en) SYSTEM AND METHOD OF ACOUSTIC TWO-FACTOR AUTHENTICATION
CN102880836A (en) Security device
CN111722831B (en) Encryption system and implementation method thereof
CN102110319A (en) Wireless code hopping system, device and method for remote control door lock
CN108868367B (en) Intelligent lock device
CN105006051A (en) Wireless communication method and system of intelligent remote control door lock
CN106972926A (en) A kind of encrypting and decrypting method, the apparatus and system of wireless automobile key
CN101588236A (en) Protecting device, system and method for transmitting contents safely
CN104219044A (en) Key secret method for encrypting storing device
CN100461669C (en) Public key code hopping safety system and method
CN102970676A (en) Method for processing original data, internet of thing system and terminal
CN101265769B (en) Password distant control lock control system based on AES cryptographic algorithm and control method
CN102598575B (en) Method and system for the accelerated decryption of cryptographically protected user data units
CN105235642B (en) Control instruction executes safely method and main machine for car theft-proof device
CN104868995B (en) Coding convention controls formula authenticating method and coding convention controls formula enciphered method
CN101394398A (en) Content protecting method and system oriented to terminal digital interface
CN102903226B (en) Data transmission method for communication of intelligent electric meters
CN104735094B (en) Data safe transmission system and method based on information separation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant