Summary of the invention
The object of the invention is to have overcome above-mentioned shortcoming of the prior art, provide a kind of multidate information that utilizes to realize the coded communication that cloth is withdrawn a garrison between controller and alarm host machine, thereby avoid signal to be forged, significantly promote the security of safety-protection system, and mode is easy, with low cost, the range of application comparatively widely cloth in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized the dynamic authentication cloth method of controlling of withdrawing a garrison.
The cloth controller of withdrawing a garrison has the cloth operating key of withdrawing a garrison, and connects described alarm host machine by wireless signal.In order to realize above-mentioned object, the cloth in safety-protection system of the present invention is withdrawn a garrison and between controller and alarm host machine, is realized the withdraw a garrison method controlled of dynamic authentication cloth and comprise the operation of withdrawing a garrison of code operations and cloth.Wherein, described code operations is comprised the following steps:
(11) cloth that user withdraws a garrison described in operating key control by the described cloth controller of withdrawing a garrison carries out code;
(12) the described cloth controller of withdrawing a garrison sends code instruction to described alarm host machine;
(13) described alarm host machine is carried out code, and sends and confirm code instruction to the described cloth controller of withdrawing a garrison;
(14) withdraw a garrison controller and alarm host machine of described cloth all generates dynamic authentication ID storage.
And described cloth is withdrawn a garrison to operate and is comprised the following steps:
(21) cloth that user withdraws a garrison described in operating key control by the described cloth controller control of deploying troops on garrison duty or withdraw a garrison of withdrawing a garrison;
(22) the described cloth controller of withdrawing a garrison sends and deploys troops on garrison duty or withdraw a garrison instruction to described alarm host machine;
(23) described alarm host machine is carried out authentication according to the described instruction of deploying troops on garrison duty or withdraw a garrison, if by deploying troops on garrison duty accordingly or withdrawing a garrison setting;
(24) described alarm host machine is sent and is confirmed deploy troops on garrison duty or withdraw a garrison instruction to the described cloth controller of withdrawing a garrison;
(25) withdraw a garrison controller and alarm host machine of described cloth all generates new dynamic authentication ID storage.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, and described code instruction is comprised to the cryptographic algorithm code that cloth is withdrawn a garrison controller address, operation serial number, code event code and stochastic and dynamic are generated; Described confirmation to code instruction comprise cloth withdraw a garrison controller address, alarm host machine address, operation serial number, confirm code event code and described cryptographic algorithm code.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, withdraw a garrison controller and alarm host machine of described cloth all generates dynamic authentication ID storage, be specially: described cloth controller and the alarm host machine cryptographic algorithm that all described cryptographic algorithm code is corresponding respectively of withdrawing a garrison is calculated the described cloth controller address of withdrawing a garrison, and generates respectively dynamic authentication ID storage.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, and described confirmation comprises to code success event code with to code turkey code code event code.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, the cloth that described user withdraws a garrison described in operating key control by the described cloth controller of withdrawing a garrison carries out code, is specially: user pins the cloth operating key of withdrawing a garrison and reaches default time and carry out code to control the described cloth controller of withdrawing a garrison.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, and the described instruction of deploying troops on garrison duty or withdraw a garrison comprises the cryptographic algorithm code of withdrawing a garrison alarm host machine address, cloth controller address, described dynamic authentication ID, operation serial number, deploy troops on garrison duty or withdraw a garrison event code and stochastic and dynamic generating; Described confirmation deploy troops on garrison duty or withdraw a garrison instruction comprise cloth withdraw a garrison controller address, alarm host machine address, described dynamic authentication ID, operation serial number, confirm to deploy troops on garrison duty or withdraw a garrison event code and described cryptographic algorithm code.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, described alarm host machine is carried out authentication according to the described instruction of deploying troops on garrison duty or withdraw a garrison, be specially: described alarm host machine contrasts described deploy troops on garrison duty or withdraw a garrison dynamic authentication ID in instruction and the dynamic authentication ID of alarm host machine storage, if consistent, authentication success, if inconsistent, failed authentication.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, withdraw a garrison controller and alarm host machine of described cloth all generates new dynamic authentication ID storage, be specially: withdraw a garrison controller and alarm host machine of described cloth all calculated described dynamic authentication ID according to cryptographic algorithm corresponding to described cryptographic algorithm code, generates respectively new dynamic authentication ID storage.
Cloth that should be in safety-protection system is withdrawn a garrison and between controller and alarm host machine, is realized dynamic authentication cloth and withdraw a garrison in the method for controlling, and described confirmation is deployed troops on garrison duty or withdrawn a garrison, and event code comprises the successful event code of deploying troops on garrison duty, the turkey of deploying troops on garrison duty code, withdraw a garrison successful event code and the turkey code of withdrawing a garrison.
Adopt the cloth in safety-protection system of this invention to withdraw a garrison to realize between controller and alarm host machine the dynamic authentication cloth method of controlling of withdrawing a garrison, in to code operations process, after code is completed, withdraw a garrison controller and alarm host machine of cloth all calculated the cloth controller address of withdrawing a garrison according to cryptographic algorithm corresponding to the cryptographic algorithm code in code instruction, generates respectively dynamic authentication ID storage.And withdraw a garrison in operating process at cloth, after authentication, withdraw a garrison controller and alarm host machine of cloth all calculated the dynamic authentication ID generating before according to cryptographic algorithm corresponding to the cryptographic algorithm code of deploying troops on garrison duty or withdrawing a garrison in instruction, generate respectively new dynamic authentication ID storage, withdrawing a garrison to operate for lower substandard cloth uses.Thereby make that each the operation of withdrawing a garrison all generates new dynamic authentication ID for the withdraw a garrison authentication of operation of lower substandard cloth to code operations and cloth, the control of withdrawing a garrison of the cloth of realizing dynamic authentication, effectively avoid signal to be forged, significantly promote the security of safety-protection system, and the cloth in safety-protection system of the present invention is withdrawn a garrison, and between controller and alarm host machine, to realize the withdraw a garrison ways and means controlled of dynamic authentication cloth easy, with low cost, range of application is comparatively extensive.
Embodiment
In order more clearly to understand technology contents of the present invention, describe in detail especially exemplified by following examples.
As shown in Figure 1, safety-protection system comprises alarm host machine 1, cloth withdraw a garrison controller 2 and ID card 3.The cloth controller 2 of withdrawing a garrison has the cloth operating key 4 of withdrawing a garrison, and the cloth controller 2 of withdrawing a garrison connects described alarm host machine 1 by wireless signal.
In one embodiment, the cloth in safety-protection system of the present invention is withdrawn a garrison and between controller and alarm host machine, is realized the withdraw a garrison method controlled of dynamic authentication cloth and comprise the operation of withdrawing a garrison of code operations and cloth.
Described to code operations, as shown in Figure 2, comprise the following steps:
(11) cloth that user withdraws a garrison described in operating key control by the described cloth controller of withdrawing a garrison carries out code;
(12) the described cloth controller of withdrawing a garrison sends code instruction to described alarm host machine;
(13) described alarm host machine is carried out code, and sends and confirm code instruction to the described cloth controller of withdrawing a garrison;
(14) withdraw a garrison controller and alarm host machine of described cloth all generates dynamic authentication ID storage.
The operation of withdrawing a garrison of described cloth, as shown in Figure 3, comprises the following steps:
(21) cloth that user withdraws a garrison described in operating key control by the described cloth controller control of deploying troops on garrison duty or withdraw a garrison of withdrawing a garrison;
(22) the described cloth controller of withdrawing a garrison sends and deploys troops on garrison duty or withdraw a garrison instruction to described alarm host machine;
(23) described alarm host machine is carried out authentication according to the described instruction of deploying troops on garrison duty or withdraw a garrison, if by deploying troops on garrison duty accordingly or withdrawing a garrison setting;
(24) described alarm host machine is sent and is confirmed deploy troops on garrison duty or withdraw a garrison instruction to the described cloth controller of withdrawing a garrison;
(25) withdraw a garrison controller and alarm host machine of described cloth all generates new dynamic authentication ID storage.
One preferred embodiment in, described code instruction is comprised to the cryptographic algorithm code that cloth is withdrawn a garrison controller address, operation serial number, code event code and stochastic and dynamic are generated; Described confirmation to code instruction comprise cloth withdraw a garrison controller address, alarm host machine address, operation serial number, confirm code event code and described cryptographic algorithm code.Withdraw a garrison controller and alarm host machine of the cloth described in step (14) all generates dynamic authentication ID storage, be specially: described cloth controller and the alarm host machine cryptographic algorithm that all described cryptographic algorithm code is corresponding respectively of withdrawing a garrison is calculated the described cloth controller address of withdrawing a garrison, and generates respectively dynamic authentication ID storage.And described confirmation comprises to code success event code with to code turkey code code event code.
At another kind more preferably in embodiment, the cloth that the described user of step (11) withdraws a garrison described in operating key control by the described cloth controller of withdrawing a garrison carries out code, is specially: user pins the cloth operating key of withdrawing a garrison and reaches default time and carry out code to control the described cloth controller of withdrawing a garrison.
In preferred embodiment, the described instruction of deploying troops on garrison duty or withdraw a garrison comprises the cryptographic algorithm code of withdrawing a garrison alarm host machine address, cloth controller address, described dynamic authentication ID, operation serial number, deploy troops on garrison duty or withdraw a garrison event code and stochastic and dynamic generating; Described confirmation deploy troops on garrison duty or withdraw a garrison instruction comprise cloth withdraw a garrison controller address, alarm host machine address, described dynamic authentication ID, operation serial number, confirm to deploy troops on garrison duty or withdraw a garrison event code and described cryptographic algorithm code.Described confirmation is deployed troops on garrison duty or withdrawn a garrison, and event code comprises the successful event code of deploying troops on garrison duty, the turkey of deploying troops on garrison duty code, withdraw a garrison successful event code and the turkey code of withdrawing a garrison.
The alarm host machine described in step (23) is carried out authentication according to the described instruction of deploying troops on garrison duty or withdraw a garrison, be specially: described alarm host machine contrasts described deploy troops on garrison duty or withdraw a garrison dynamic authentication ID in instruction and the dynamic authentication ID of alarm host machine storage, if consistent, authentication success, if inconsistent, failed authentication.
And withdraw a garrison controller and alarm host machine of the cloth described in step (25) all generates new dynamic authentication ID storage, be specially: withdraw a garrison controller and alarm host machine of described cloth all calculated described dynamic authentication ID according to cryptographic algorithm corresponding to described cryptographic algorithm code, generates respectively new dynamic authentication ID storage.
In actual applications, method of the present invention comprises code operations and the cloth operation two parts of withdrawing a garrison.
One, controller and alarm host machine are to code operations:
1, controller and main frame carry out code:
The cloth controller of withdrawing a garrison need to carry out carrying out the cloth control of withdrawing a garrison to alarm host machine after code pairing with alarm host machine.First alarm host machine will arrange and enter code state, often presses " deploying troops on garrison duty " key of controller or " withdrawing a garrison " key 5 seconds, and controller sends code protocol code to alarm host machine.Main frame, take controller address code as data source, calculates and generates new " dynamically authentication ID " according to dynamic encryption algorithm corresponding to dynamic encryption code, and preserves " controller address " and new " dynamically authentication ID ".What then, alarm host machine sent and comprise " controller address, host address, event code, dynamically authentication ID " to controller carries out confirmation signal to code.Controller is under confirming the successful situation of code, and new " the dynamically authentication ID " that storage host address code and calculating generate, completes code.
2, to code instruction:
(1) as shown in table 1 below to code instruction form (controller sends to alarm host machine):
Table 1 is to code instruction form shfft
In table 1, the example middle controller address of bottom line is: 0x1123456A88(immobilizes), code event code is fixed as: 0x01, the dynamic encryption algorithm code of obtaining is at random: 0x06.
(2) confirm code instruction form (alarm host machine is replied to controller): as shown in table 2 below:
Table 2 is confirmed code instruction form shfft
In table 2, the example middle controller address of bottom line is: 0x1123456A88, alarm host machine address is: 0x0A26608C66, code event code is fixed as: 0x01, dynamic encryption algorithm code is: 0x06, to code execution result be: 0x01(0x11 represents that, to code success, 0x21 represents code failure).
As shown in example above, controller and alarm host machine after code is completed separately computing generate new " dynamically authentication ID ", the concrete operation (former ID+3) that dynamic encryption algorithm code 0x06 is corresponding is as follows:
0x1123456A88+3=0x1123456A8B, controller is issued, when removing or withdrawing a garrison order, is just used new dynamically authentication ID to alarm host machine next time---and 0x1123456A8B carries out authentication and determines this cloth legitimacy operating of withdrawing a garrison.
Carry out and deploy troops on garrison duty or withdraw a garrison after operation next time, controller and alarm host machine are subsynchronous with the former authentication ID of 0x1123456A8B again, and the mapping algorithm that corresponding controller is obtained is at random produced new dynamic authentication ID.
Two, controller main control system is carried out and is deployed troops on garrison duty or withdraw a garrison instruction:
1, deploy troops on garrison duty:
(1) order format (controller sends to alarm host machine) of deploying troops on garrison duty is as shown in table 3 below:
The anti-order format form shfft of table 3
Table 3 middle controller address is: 0x1123456A88, alarm host machine address is: 0x0A26608C66, the event code of deploying troops on garrison duty is fixed as: 0x02, the dynamic encryption algorithm code of obtaining is at random: 0x05.Alarm host machine is confirmed the identity of communication two party according to source address and destination address, and according to dynamic authentication ID---0x1123456A8B confirms that, after the legitimacy of the other side's operation, alarm host machine is carried out and deployed troops on garrison duty, and calculates and produce new " dynamically authentication ID ".Newly " dynamically authentication ID " is specifically calculated as follows:
Because " dynamically authentication ID " that code is generated is afterwards: 0x1123456A8B, this dynamic change algorithm of obtaining is at random 0x05(negate+3 by turn).
0x1123456A8B binary form is shown: 00010001,00100011,01000101,01101010,10001011
Negate by turn: 11101110,11011100,10111010,10010101,01110100
Being converted to 16 systems is expressed as again: 0xEEDCBA9574
0xEEDCBA9574+3=0xEEDCBA9577
So alarm host machine is calculated new " the dynamically authentication ID " that generate and is after carrying out and deploying troops on garrison duty: the dynamic authentication ID that 0xEEDCBA9577(is new does not return to controller).
(2) confirm to deploy troops on garrison duty implementation status order format (alarm host machine is replied to controller), as shown in table 4 below:
Table 4 confirms to deploy troops on garrison duty implementation status order format table
Controller is received after the successful instruction of deploying troops on garrison duty of alarm host machine, calculates and produces new " dynamically authentication ID ".Newly " dynamically authentication ID " specifically to calculate production method identical with the computing method of alarm host machine.
Because " dynamically authentication ID " that code is generated is afterwards: 0x1123456A8B, this dynamic change algorithm of obtaining is at random 0x05(negate+3 by turn).
0x1123456A8B binary form is shown: 00010001,00100011,01000101,01101010,10001011
Negate by turn: 11101110,11011100,10111010,10010101,01110100
Being converted to 16 systems is expressed as again: 0xEEDCBA9574
0xEEDCBA9574+3=0xEEDCBA9577
So controller calculates new " the dynamically authentication ID " that generate and is: 0xEEDCBA9577.
2, withdraw a garrison:
(1) order format (controller sends to alarm host machine) of withdrawing a garrison is as shown in table 5 below:
The table 5 order format table of withdrawing a garrison
Table 5 middle controller address is: 0x1123456A88, alarm host machine address is: 0x0A26608C66, the event code of deploying troops on garrison duty is fixed as: 0x03, the dynamic encryption algorithm code of obtaining is at random: 0x08.Alarm host machine is confirmed the identity of communication two party according to source address and destination address, and according to " dynamically authentication ID "---0xEEDCBA9577 confirms that, after the legitimacy of the other side's operation, alarm host machine is carried out and withdrawn a garrison, and calculates and produce new " dynamically authentication ID ".Newly " dynamically authentication ID " is specifically calculated as follows:
Current " dynamically authentication ID " is: 0xEEDCBA9577, this dynamic mapping algorithm of obtaining is at random that 0x08(moves to right 1 by turn).
0xEEDCBA9577 binary form is shown: 1110111011011100101110101001010101110111
Move to right 1: 0111011101101110010111010100101010111011
Being converted to 16 systems is expressed as again: 0x776E5D4ABB
So alarm host machine is calculated new " the dynamically authentication ID " that generate and is after carrying out and deploying troops on garrison duty: the dynamic authentication ID that 0x776E5D4ABB(is new does not return to controller).
(2) confirm to withdraw a garrison implementation status order format (alarm host machine is replied to controller), as shown in table 6 below:
Table 6 confirms to withdraw a garrison implementation status order format table
In table 6, controller is received after the successful instruction of withdrawing a garrison of alarm host machine, calculates and produces new " dynamically authentication ID ".Newly " dynamically authentication ID " specifically to calculate production method identical with the computing method of alarm host machine.
Current " dynamically authentication ID " is: 0xEEDCBA9577, this dynamic mapping algorithm of obtaining is at random that 0x08(moves to right 1 by turn).
0xEEDCBA9577 binary form is shown: 1110111011011100101110101001010101110111
Move to right 1: 0111011101101110010111010100101010111011
Being converted to 16 systems is expressed as again: 0x776E5D4ABB
So controller calculates new " the dynamically authentication ID " that generate and is: 0x776E5D4ABB.
The event code adopting in the present invention is as shown in table 7 below:
Event code |
Event |
0x01 |
Controller is to code |
0x11 |
To code success |
0x21 |
To code failure |
0x02 |
Deploy troops on garrison duty |
0x12 |
Deploy troops on garrison duty successfully |
0x22 |
Deploy troops on garrison duty unsuccessfully |
0x03 |
Withdraw a garrison |
0x13 |
Withdraw a garrison successfully |
0x23 |
Withdraw a garrison unsuccessfully |
0x04 |
The low electricity of controller battery |
Table 7 event code table
The dynamic algorithm code adopting in the present invention is as shown in table 8 below:
Dynamic encryption algorithm code |
Algorithm (overflow data is not processed) |
0x01 |
Former ID negate by turn |
0x02 |
Former ID negate+1 by turn |
0x03 |
Former ID negate-1 by turn |
0x04 |
Former ID negate+6 by turn |
0x05 |
Former ID negate+3 by turn |
0x06 |
Former ID+3 |
0x07 |
Former ID moves to left 1 by turn |
0x08 |
Former ID moves to right 1 by turn |
0x09 |
Former ID moves to left 2 by turn |
0x0A |
Former ID moves to right 2 by turn |
0x0B |
Former ID moves to left 3+1 by turn |
0x0C |
Former ID moves to right 1+5 by turn |
0x0D |
Former ID moves to left 1 by turn, then negate |
0x0E |
Former ID moves to right 1 by turn, then negate |
0x0F |
Former ID moves to left 2 by turn, then negate |
0x10 |
Former ID moves to right 3 by turn, then negate |
0x11 |
Former ID moves to left 3 by turn, then negate |
0x12 |
Former ID moves to right 1+9 by turn |
0x13 |
Former ID moves to left 2+8 by turn |
0x14 |
Former ID moves to left 1+9 by turn |
0x15 |
Former ID moves to right 3+7 by turn |
0x16 |
Former ID moves to left 5+5 by turn |
Table 8 dynamic algorithm code table
The corresponding concrete algorithmic function of each enciphering transformation algorithmic code, code and corresponding mapping algorithm function allow developer to carry out the adjustment (listed 22 kinds of algorithms and corresponding algorithmic code thereof in upper table 8, also can increase or reduce algorithmic code and specific algorithm) of quantitative aspects and algorithm content.In the software systems of exploitation, comprise the code of form above and the corresponding form parameter of algorithmic function, every kind of concrete function that specific algorithm is corresponding.Each execution deployed troops on garrison duty or withdrawn a garrison after operation, cloth is withdrawn a garrison controller and alarm host machine all can be according to the corresponding specific algorithm of enciphering transformation code, as calculating, produces dynamic state of parameters new " dynamically authentication ID " take former " dynamically authentication ID ", carry out while deploying troops on garrison duty or withdraw a garrison action next time, both sides agreement is carried out authentication confirmation with new " dynamically authentication ID ", and produces new " dynamically authentication ID " again.So, often complete the action of once deploying troops on garrison duty or withdraw a garrison, " dynamically authentication ID " all at random computing produce, and concrete algorithm is that permission developer is self-defining, algorithm quantity also can be revised and be expanded, each cloth authentication of withdrawing a garrison is all unique.So other equipment cannot obtain " dynamically authentication ID " that next substandard cloth withdraws a garrison, also just can not be to the alarm host machine control of deploying troops on garrison duty or withdraw a garrison.Thereby guaranteed the wireless cloth unique control authority of controller to alarm host machine of withdrawing a garrison, other equipment cannot carry out the cloth control of withdrawing a garrison to main frame, ensure the cloth security of controlling of withdrawing a garrison.(if former authentication ID occurs extremely with corresponding mapping algorithm computing, automatically produces new " dynamically authentication ID " as former authentication ID reruns take the ID of controller).
Method of the present invention is withdrawn a garrison controller and alarm host machine while directly carrying out communication at cloth, and Content of communciation, except having the information such as source address, destination address, event serial number, event code, authentication ciphering algorithmic code, also has a dynamic authentication ID.When each communication is mutual, confirm the legitimacy of the other side and identity and operation with dynamic authentication ID, and each random mapping algorithm that all can obtain according to former dynamic authentication ID and controller separately after mutual calculate and generates new dynamic authentication ID.New dynamic authentication ID can not occur before once mutual upper, only in upper once reciprocal process, just can be used to once authentication in protocol code.Here it is all can have a new dynamic authentication ID to confirm the other side's legal identity and operating right at every turn alternately, thus guaranteed controller alarm host machine is deployed troops on garrison duty and is withdrawn a garrison operation security.
Adopt the cloth in safety-protection system of this invention to withdraw a garrison to realize between controller and alarm host machine the dynamic authentication cloth method of controlling of withdrawing a garrison, in to code operations process, after code is completed, withdraw a garrison controller and alarm host machine of cloth all calculated the cloth controller address of withdrawing a garrison according to cryptographic algorithm corresponding to the cryptographic algorithm code in code instruction, generates respectively dynamic authentication ID storage.And withdraw a garrison in operating process at cloth, after authentication, withdraw a garrison controller and alarm host machine of cloth all calculated the dynamic authentication ID generating before according to cryptographic algorithm corresponding to the cryptographic algorithm code of deploying troops on garrison duty or withdrawing a garrison in instruction, generate respectively new dynamic authentication ID storage, withdrawing a garrison to operate for lower substandard cloth uses.Thereby make that each the operation of withdrawing a garrison all generates new dynamic authentication ID for the withdraw a garrison authentication of operation of lower substandard cloth to code operations and cloth, the control of withdrawing a garrison of the cloth of realizing dynamic authentication, effectively avoid signal to be forged, significantly promote the security of safety-protection system, and the cloth in safety-protection system of the present invention is withdrawn a garrison, and between controller and alarm host machine, to realize the withdraw a garrison ways and means controlled of dynamic authentication cloth easy, with low cost, range of application is comparatively extensive.
In this instructions, the present invention is described with reference to its specific embodiment.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.