A kind of Digit Control Machine Tool control panel encryption method
Technical field
The invention belongs to automation equipment control field, particularly to the encryption side of a kind of Digit Control Machine Tool control panel
Method.
Background technology
Modern cnc technology develops rapidly, and lathe manufacturer and Digit Control Machine Tool control panel manufacturer are for technology
Protection, function limit, regain the consideration of remaining fund etc., can be encrypted control panel, according to the payment of user
The use authority of control panel is managed by situation, thus controls user's use authority to lathe.
The existing rights management to control panel is typically all by increasing extra encryption hardware and software next real
Existing, as encryption subplate coordinates control panel, this not only can increase system complexity and cost, also as add
Extra accessory is it is necessary to through loaded down with trivial details step, such as in Default Value, encryption and decrypting process, need to burn
Record different firmwares and complete corresponding operation, prepare different encrypted firmwares and it needs to by serial ports update the time,
The data that date and encryption and decryption are correlated with;And, the framework of this kind of encryption system can be analyzed gently by simple
Easily grasp, and then easily encryption system is cracked, or by direct removable parts spare and accessory parts, as directly
Connect one piece of control panel do not encrypted of replacing, thus shield encryption function, and change the one-tenth of one piece of control panel
Originally compare whole Digit Control Machine Tool much lower, thus it is the lowest to crack cost.
Analyzing based on above, the most this authorization privilege management system existed independent of digital control system can not
Meeting use demand and the Vaporous atomization of dough-making powder plate producer of lathe producer, this case thus produces.
Summary of the invention
The purpose of the present invention, is to provide a kind of Digit Control Machine Tool control panel encryption method, its simple in construction, behaviour
Making easily, cipher round results is good.
In order to reach above-mentioned purpose, the solution of the present invention is:
A kind of Digit Control Machine Tool control panel encryption method, comprises the steps:
Step 1, main website and slave station carry out identities match, if coupling is consistent, go to step 2, if mating inconsistent,
Reporting to the police, now main website and slave station all cannot work;
Step 2, the lock machine status information of self storage of slave station inquiry, if the most unlocked, then go to step 5, if
It is in encrypted state, then goes to step 3;
Step 3, slave station calculates random factor, and random factor is sent to main website, main website prompting user according to
Random factor input clear crytpographic key, and password transmission user inputted is to slave station;
Step 4, the data that user is inputted by slave station are verified, if code error, notify that main website, main website continue
The continuous lock machine state that maintains, and prompt cipher mistake;If password is correct, slave station unlocker device, and notifies that main website enters
Row unlocks, and shows deciphering natural law, goes to step 5;
Step 5, slave station updates lock machine status information, and main website and slave station carry out communication, and main website enters normal scan
Cycle.
The detailed content of above-mentioned steps 1 is: main website sends the serial number of self to slave station by profinet,
After slave station receives this serial number, the main website serial number of the binding with self storage contrasts, if coupling one
Causing, slave station sends matched signal to main website, after main website receives matched signal, proceeds to step 2;If coupling is not
Unanimously, then slave station locking device function, and send mismatch signal by profinet to main website, main website connects
After receiving mismatch signal, at operation interface, user is pointed out, the function of locking applications simultaneously, this
Time Digit Control Machine Tool enter lock machine state, it is impossible to normally work.
In above-mentioned steps 1, after mating inconsistent warning, it is necessary to revert to factory state or contact sets
The serial number of main website and slave station are carried out matching operation by standby manufacturer.
In above-mentioned steps 3, after main website receives random factor, the random factor received is entered at operation interface
Row display, prompting user inputs corresponding clear crytpographic key according to random factor simultaneously.
Above-mentioned clear crytpographic key is according to random factor, generating random number code, current decryption time and user identification code
Superposition and obtain.
In above-mentioned steps 4, slave station also sets up the deciphering time limit, starts timing when requiring user to input clear crytpographic key,
If being less than regular hour threshold value in the distance deciphering time limit also do not receive the data of master station transmission, then report to the police;
And if after exceeding the deciphering time limit, also do not receive the data of master station transmission, then the automatic lock machine of slave station, and passing through
Profinet carries out time-sharing communication and notifies main website lock machine.
After using such scheme, the invention have the characteristics that:
(1) serial number of master device is bound by encryption and decryption information with slave station controlled plant, master and slave station
Between need to after identities match could communication, if binding information does not mates, slave station controlled plant function can be locked
And primary application program function, thus improve cipher round results, enhance system security and crack difficulty;Particularly,
More can design the function of slave station controlled plant within the deciphering time limit effectively, will report to the police in limited time close to the decryption period and
Exceed the functions such as deciphering time limit finger lock repertoire, strengthen cipher round results;
(2) configuration and the associative operation of encryption and decryption is carried out in Upper system, eliminates number compared to existing technology
The unnecessary additional devices such as code display, button, it is not necessary to increase any equipment cost, it is not necessary to by modes such as serial ports
Arrange such as parameters such as user identification code, generating random number code, current times so that no matter system is in overall structure
Above or it is obtained for the biggest simplification in user operation;
(3) secret key originally realized by PC is calculated, identification code is arranged, parameter is arranged etc. function change by
PLC process, simplifies operation so that system is departing from the dependence to PC, all relevant to encryption and decryption
Operation can complete in existing system, and function is easily transplanted to the related application field of other profinet
In conjunction.
Accompanying drawing explanation
Fig. 1 is the integrated stand composition of encryption system of the present invention;
Fig. 2 is the flow chart of encryption method of the present invention.
Detailed description of the invention
Below with reference to accompanying drawing, technical scheme is described in detail.
As it is shown in figure 1, the present invention provides a kind of Digit Control Machine Tool control panel encryption system, based on main website and slave station
And arrange, wherein main website is provided with operation interface, is provided with main control chip, clock chip and storage chip in slave station,
Introduce separately below.
Main website carries out profinet communication with the main control chip in slave station, for transmission sequence number, does not mate letter
Number etc. various data.
Main control chip can use MCU, DSP or FPGA, uses Ertec200 chip in the present embodiment, its
It is responsible for the transmission dissection process work of profinet communication realization and encryption data, according to generating random number code
Generate random factor, password authentification and the function such as when system lock machine, system time pair.
Clock chip is connected with main control chip, in order to provide correct temporal information, uses in the present embodiment
DS1305 clock chip, after being gated by chip selection signal, through tri-signal ends of SDI, SDO, SCLK time
Between information be sent in main control chip, when after panel power-off, clock chip can be powered timing by battery.
Storage chip is connected with main control chip, can use EEPROM storage chip 25LC08, by SDI, SDO,
It is mutual that SCLK interface and main control chip carry out information, preserves licensing status and deadline, preservation rights management
Deng.
As in figure 2 it is shown, the present invention provides a kind of Digit Control Machine Tool control panel encryption method, comprise the steps:
Step 1, main website and slave station carry out identities match: the serial number of self is passed by main website by profinet
Giving slave station, after slave station receives this serial number, the main website serial number of the binding with self storage contrasts,
If coupling is consistent, slave station sends matched signal to main website, after main website receives matched signal, proceeds to step 2;
If mating inconsistent, then it represents that employ unwarranted equipment, report to the police, slave station locking device function,
And send mismatch signal by profinet to main website, and after main website receives mismatch signal, can be in operation
User is pointed out by interface, simultaneously the function of locking applications (such as PLC program), now Digit Control Machine Tool
Enter lock-out state, it is impossible to normally work, it is necessary to equipment is reverted to factory state or contact equipment factory
The serial number of main website and slave station are carried out matching operation by family, could normally work after deciphering;
Step 2, the lock machine status information of self storage of slave station inquiry, if the most unlocked, then go to step 5, if
It is in encrypted state, then goes to step 3;
Step 3, slave station and main website carry out communication, slave station calculating random factor, and are sent to by random factor main
Standing, the random factor received is shown by main website at operation interface, and prompting user is according to random factor simultaneously
Inputting corresponding clear crytpographic key, described clear crytpographic key is that random factor combines current decryption time, user's identification
Code and generating random number code carry out specific computing and obtain, and wherein, user identification code and random number are raw
Becoming code to be configured by equipment manufacturer, concrete mathematical algorithm is set by equipment manufacturer, very
Difficulty is cracked, thus substantially increases cipher round results, and user must be authorized by purchase or contact equipment factory
Family could obtain correct clear crytpographic key, and wherein, user identification code is managing customer for convenience, while in order to
Prevent exchanging clear crytpographic key between different client and arrange (arranging decryption time such as A client is permanent deciphering, and
It is 3 months that B client arranges decryption time, and two clients of AB have different user identification code, also imply that
The mathematical algorithm of their clear crytpographic key is different, even if A is supplied to B, B the clear crytpographic key of oneself
Also cannot be used for unlocking the equipment of oneself), generating random number code is used in time standing in deciphering calculating random factor,
Guarantee the safety of encryption;After user inputs password, the data that user is inputted by main website are transmitted to slave station;
Step 4, random factor is combined the current decryption time by slave station, user identification code carries out specific computing and
Obtaining clear crytpographic key, and verify the password received, if code error, then notify main website, main website exists
Operation interface prompt code error, and continue to lock machine state;If password is correct, then slave station unlocker device,
And notify that main website is unlocked, and at main website display deciphering natural law, go to step 5;Step 5, slave station updates lock
(storage lock machine status information is mainly used for after device powers down re-powers machine status information, the most unlocked
Equipment is without again unlocking), main website and slave station carry out communication, and main website enters normal scan period.
Particularly, in the present embodiment, in order to strengthen cipher round results, also it is set at slave station the deciphering time limit, when needing
Want user when main website input clear crytpographic key, just start timing, if in the distance deciphering time limit less than the regular hour
Threshold value does not also receive the data of master station transmission, then report to the police;And if also not receiving master after exceeding the deciphering time limit
Stand the data of transmission, then the automatic lock machine of slave station, and carry out time-sharing communication by profinet and notify main website lock machine.
Above example is only the technological thought that the present invention is described, it is impossible to limit protection scope of the present invention with this,
Every technological thought proposed according to the present invention, any change done on the basis of technical scheme, each fall within this
Within invention protection domain.