CN102916945B - Method used for dynamically and safely encrypting communication protocol of printer - Google Patents

Method used for dynamically and safely encrypting communication protocol of printer Download PDF

Info

Publication number
CN102916945B
CN102916945B CN201210362259.1A CN201210362259A CN102916945B CN 102916945 B CN102916945 B CN 102916945B CN 201210362259 A CN201210362259 A CN 201210362259A CN 102916945 B CN102916945 B CN 102916945B
Authority
CN
China
Prior art keywords
key
printer
dynamic
encrypting
control terminal
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
CN201210362259.1A
Other languages
Chinese (zh)
Other versions
CN102916945A (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.)
GUANGZHOU LEDERUI TECHNOLOGY Co Ltd
Original Assignee
GUANGZHOU LEDERUI TECHNOLOGY 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 GUANGZHOU LEDERUI TECHNOLOGY Co Ltd filed Critical GUANGZHOU LEDERUI TECHNOLOGY Co Ltd
Priority to CN201210362259.1A priority Critical patent/CN102916945B/en
Publication of CN102916945A publication Critical patent/CN102916945A/en
Application granted granted Critical
Publication of CN102916945B publication Critical patent/CN102916945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a method used for dynamically and safely encrypting a communication protocol of a printer. The method comprises the following steps: a step of setting an encrypting sample; a step of generating an authorized secrete key; a step of generating a dynamic secrete key; a step of generating a first secrete key; a step of generating a second secrete key; a step of authorizing printing; a step of encrypting and sending; a step of decrypting and printing. By double-encrypting method of encrypting the communication between the printer and the control terminal and encrypting the transmitted printing file, the condition of data leakage is avoided, and the safety and reliability of data transmission in the process of printing are improved. As a method with good performance used for dynamically and safely encrypting the communication protocol of the printer, the method provided by invention can be widely applied to the printing industry.

Description

A kind of method for printer communication protocol dynamic safety encipher
Technical field
The present invention relates to a kind of method of safety encipher, particularly a kind of method for printer safety encipher.
Background technology
Current printer is all that the communications protocol of employing standard is carried out the transmission of data mostly, user is limited to the management of printer apparatus and print out task, especially for vital task and important service print job, as the printing of the valuable bills such as invoice, lottery ticket, car and boat ticket and commercial discount volume, the communications protocol fail safe of standard is not high, data are easily revealed in transmitting procedure, cause easily occurring the serious problems such as fake bill.
Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of safe and reliable method for printer communication protocol dynamic safety encipher.
The technical solution adopted for the present invention to solve the technical problems is:
A method for printer communication protocol dynamic safety encipher, comprising:
Encrypt sample setting steps, the encryption sample identical with printer setup to control terminal;
Authorization key generates step, and control terminal generates authorization key according to encrypting sample, and authorization key is sent to printer, sends a triggering signal to printer simultaneously;
Dynamic key production step, printer detects after triggering signal, generates dynamic key, and dynamic key is sent to control terminal according to encrypting sample;
The first key generates step, and control terminal receives dynamic key and in conjunction with after this dynamic key production first key, the first key sent to printer;
The second key generates step, and printer receives authorization key and in conjunction with this authorization key, generates the second key;
Print authorisation step, printer receives the first key, and judges whether it equates with the second key, if equate, authorization for printer prints;
Encrypt forwarding step, after printer is authorized, control terminal is used the first key to be encrypted printed document, and the printed document after encrypting is sent to printer;
Deciphering printing step, printer receives the printed document after encrypting, and after using the second key to be decrypted it, prints output.
Further, in described encryption sample setting steps, described encryption sample comprises a generator g in a prime number q and finite field Fq.
Further, described authorization key generates step, and it is specially:
Control terminal is selected the first random number a according to encrypting sample, a ∈ 1,2 ..., q-1}, and then adopt formula ga (modq) to generate authorization key, and authorization key is sent to printer, to printer, send a triggering signal simultaneously.
Further, described dynamic key production step, it is specially:
Printer detects after triggering signal, according to encrypting selected the second random number b of sample, b ∈ 1,2 ..., q-1}, and then adopt formula gb (modq) to generate dynamic key, and dynamic key is sent to control terminal.
Further, described the first key generates step, and it is specially:
Control terminal receives dynamic key and in conjunction with this dynamic key, adopts formula (gb) a (modq) to generate after the first key, and the first key is sent to printer.
Further, described the second key generates step, and it is specially:
Printer receives authorization key and in conjunction with this authorization key, adopts formula (ga) b (modq) to generate the second key.
The invention has the beneficial effects as follows: a kind of method for printer communication protocol dynamic safety encipher of the present invention, by the communication between printer and control terminal, be encrypted, and the double-encryption mode that the printed document transmitting is encrypted, avoid the situation that causes data to be revealed, improved fail safe and the reliability of transfer of data in print procedure.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described.
Fig. 1 is the workflow diagram of a kind of method for printer communication protocol dynamic safety encipher of the present invention;
Fig. 2 is the flow chart of a specific embodiment of a kind of method for printer communication protocol dynamic safety encipher of the present invention.
Embodiment
With reference to Fig. 1, the invention provides a kind of method for printer communication protocol dynamic safety encipher, comprising:
Encrypt sample setting steps, the encryption sample identical with printer setup to control terminal;
Authorization key generates step, and control terminal generates authorization key according to encrypting sample, and authorization key is sent to printer, sends a triggering signal to printer simultaneously;
Dynamic key production step, printer detects after triggering signal, generates dynamic key, and dynamic key is sent to control terminal according to encrypting sample;
The first key generates step, and control terminal receives dynamic key and in conjunction with after this dynamic key production first key, the first key sent to printer;
The second key generates step, and printer receives authorization key and in conjunction with this authorization key, generates the second key;
Print authorisation step, printer receives the first key, and judges whether it equates with the second key, if equate, authorization for printer prints;
Encrypt forwarding step, after printer is authorized, control terminal is used the first key to be encrypted printed document, and the printed document after encrypting is sent to printer;
Deciphering printing step, printer receives the printed document after encrypting, and after using the second key to be decrypted it, prints output.
Wherein, control terminal is used for printing control, comprises main frame or far-end server.Here, the first key and the second key can adopt identical rule to generate.
Be further used as preferred embodiment, in described encryption sample setting steps, described encryption sample comprises a generator g in a prime number q and finite field Fq.
Be further used as preferred embodiment, described authorization key generates step, and it is specially:
Control terminal is selected the first random number a according to encrypting sample, a ∈ 1,2 ..., q-1}, and then adopt formula ga (modq) to generate authorization key, and authorization key is sent to printer, to printer, send a triggering signal simultaneously.
Be further used as preferred embodiment, described dynamic key production step, it is specially:
Printer detects after triggering signal, according to encrypting selected the second random number b of sample, b ∈ 1,2 ..., q-1}, and then adopt formula gb (modq) to generate dynamic key, and dynamic key is sent to control terminal.
Be further used as preferred embodiment, described the first key generates step, and it is specially:
Control terminal receives dynamic key and in conjunction with this dynamic key, adopts formula (gb) a (modq) to generate after the first key, and the first key is sent to printer.
Be further used as preferred embodiment, described the second key generates step, and it is specially:
Printer receives authorization key and in conjunction with this authorization key, adopts formula (ga) b (modq) to generate the second key.
Below in conjunction with a specific embodiment, a kind of method for printer communication protocol dynamic safety encipher of the present invention is elaborated:
S1, encryption sample setting steps, the encryption sample that comprise a generator g in a prime number q and finite field Fq identical with printer setup to control terminal;
S2, authorization key generate step, and control terminal is according to encrypting selected the first random number a of sample, a ∈ { 1,2 ..., q-1}, and then adopt formula ga (modq) to generate authorization key, and authorization key is sent to printer, to printer, send a triggering signal simultaneously;
S3, dynamic key production step, printer detects after triggering signal, according to encrypting selected the second random number b of sample, b ∈ { 1, 2, q-1}, and then adopt formula gb (modq) to generate dynamic key, and dynamic key is sent to control terminal, here, dynamic key has ageing, when there is abrupt action or surpassing setting-up time, dynamic key ceases to be in force automatically, need control terminal again to send triggering signal, trigger printer and again generate dynamic key, wherein, abrupt action comprises that printer power supply closes or restart action, and cutting knife action,
S4, the first key generate step, and control terminal receives dynamic key and in conjunction with this dynamic key, adopts formula (gb) a (modq) to generate after the first key, and the first key is sent to printer;
S5, the second key generate step, and printer receives authorization key and in conjunction with this authorization key, adopts formula (ga) b (modq) to generate the second key;
S6, printing authorisation step, printer receives the first key, and judges whether it equates with the second key, if equate, authorization for printer prints, otherwise printer can not print;
S7, encryption forwarding step, after printer is authorized, control terminal is used the first key to be encrypted printed document, and the printed document after encrypting is sent to printer;
S8, deciphering printing step, printer receives the printed document after encrypting, and after using the second key to be decrypted it, prints output; If printed document is correctly deciphered, printer prints out correct printed document, otherwise, the printed document of printer printout mess code.
Because (gb) b (the modq)=gab (modq) of a (modq)=(ga), the first key equates with the second key, therefore adopt this method can be correctly printer is printed and be authorized and the encrypting and decrypting of printed document.And adopt in this way, data are in transmitting procedure, may reveal generator g, prime number q, authorization key ga (modq) and dynamic key gb (modq), but, owing to having no idea at present to solve fast the method for the first random number a and the second random number b, and when finite field Fq is very large, a or b will be difficult to calculate, therefore, the information being difficult to from revealing calculates gab (modq), thereby cannot carry out illegal printing mandate or printout printed document.
More than that better enforcement of the present invention is illustrated, but the invention is not limited to described embodiment, those of ordinary skill in the art also can make all equivalent variations or replacement under the prerequisite without prejudice to spirit of the present invention, and the modification that these are equal to or replacement are all included in the application's claim limited range.

Claims (5)

1. for a method for printer communication protocol dynamic safety encipher, it is characterized in that, comprising:
Encrypt sample setting steps, the encryption sample identical with printer setup to control terminal, described encryption sample comprises a generator g in a prime number q and finite field Fq;
Authorization key generates step, and control terminal generates authorization key according to encrypting sample, and authorization key is sent to printer, sends a triggering signal to printer simultaneously;
Dynamic key production step, printer detects after triggering signal, generates dynamic key, and dynamic key is sent to control terminal according to encrypting sample;
The first key generates step, and control terminal receives dynamic key and in conjunction with after this dynamic key production first key, the first key sent to printer;
The second key generates step, and printer receives authorization key and in conjunction with this authorization key, generates the second key;
Print authorisation step, printer receives the first key, and judges whether it equates with the second key, if equate, authorization for printer prints;
Encrypt forwarding step, after printer is authorized, control terminal is used the first key to be encrypted printed document, and the printed document after encrypting is sent to printer;
Deciphering printing step, printer receives the printed document after encrypting, and after using the second key to be decrypted it, prints output.
2. a kind of method for printer communication protocol dynamic safety encipher according to claim 1, is characterized in that, described authorization key generates step, and it is specially:
Control terminal is selected the first random number a according to encrypting sample, a ∈ 1,2 ..., q-1}, and then adopt formula ga (modq) to generate authorization key, and authorization key is sent to printer, to printer, send a triggering signal simultaneously.
3. a kind of method for printer communication protocol dynamic safety encipher according to claim 2, is characterized in that, described dynamic key production step, and it is specially:
Printer detects after triggering signal, according to encrypting selected the second random number b of sample, b ∈ 1,2 ..., q-1}, and then adopt formula gb (modq) to generate dynamic key, and dynamic key is sent to control terminal.
4. a kind of method for printer communication protocol dynamic safety encipher according to claim 3, is characterized in that, described the first key generates step, and it is specially:
Control terminal receives dynamic key and in conjunction with this dynamic key, adopts formula (gb) a (modq) to generate after the first key, and the first key is sent to printer.
5. a kind of method for printer communication protocol dynamic safety encipher according to claim 4, is characterized in that, described the second key generates step, and it is specially:
Printer receives authorization key and in conjunction with this authorization key, adopts formula (ga) b (modq) to generate the second key.
CN201210362259.1A 2012-09-25 2012-09-25 Method used for dynamically and safely encrypting communication protocol of printer Active CN102916945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210362259.1A CN102916945B (en) 2012-09-25 2012-09-25 Method used for dynamically and safely encrypting communication protocol of printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210362259.1A CN102916945B (en) 2012-09-25 2012-09-25 Method used for dynamically and safely encrypting communication protocol of printer

Publications (2)

Publication Number Publication Date
CN102916945A CN102916945A (en) 2013-02-06
CN102916945B true CN102916945B (en) 2014-02-05

Family

ID=47615179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210362259.1A Active CN102916945B (en) 2012-09-25 2012-09-25 Method used for dynamically and safely encrypting communication protocol of printer

Country Status (1)

Country Link
CN (1) CN102916945B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3032540B1 (en) * 2015-02-06 2018-09-07 Dover Europe Sarl ADVANCED PROTECTION SYSTEM OF CONSUMABLE OR DETACHABLE ELEMENTS

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1632738A (en) * 2003-12-23 2005-06-29 联想(北京)有限公司 Print control method for ensuring data transmission security
CN101872402A (en) * 2010-05-26 2010-10-27 上海北大方正科技电脑系统有限公司 Safe printing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1632738A (en) * 2003-12-23 2005-06-29 联想(北京)有限公司 Print control method for ensuring data transmission security
CN101872402A (en) * 2010-05-26 2010-10-27 上海北大方正科技电脑系统有限公司 Safe printing method

Also Published As

Publication number Publication date
CN102916945A (en) 2013-02-06

Similar Documents

Publication Publication Date Title
CN112104604B (en) System and method for realizing secure access service based on electric power Internet of things management platform
CN104158653A (en) Method of secure communication based on commercial cipher algorithm
CN108243181A (en) A kind of car networking terminal, data ciphering method and car networking server
EP2560319B1 (en) Method, apparatus and system for data encryption transmission in m2m
CN103051869A (en) System and method for encrypting camera video in real time
CN102394749A (en) Line protection method, system, information safety equipment and application equipment for data transmission
CN100568801C (en) By method and the corresponding intrument of exchange of encryption information through the network security transmission data
CN101789863B (en) Safe data information transmission method
CN101707767A (en) Data transmission method and devices
CN101808089A (en) Secret data transmission protection method based on isomorphism of asymmetrical encryption algorithm
CN108206739A (en) Key generation method and device
KR102219086B1 (en) HMAC-based source authentication and secret key sharing method and system for Unnamed Aerial vehicle systems
CN102281303A (en) Data exchange method
CN102916810A (en) Method, system and apparatus for authenticating sensor
CN102916945B (en) Method used for dynamically and safely encrypting communication protocol of printer
CN104732614A (en) Access device for encrypting wiegand protocol signal and encryption and decryption method thereof
CN102624892A (en) Method for preventing plug-in client from simulating hyper text transmission protocol (HTTP) request
CN107566119A (en) A kind of guard method of eSIM cards data safety and system
CN101197822A (en) System for preventing information leakage and method based on the same
CN105262759A (en) Method and system for encrypted communication
CN112350823B (en) CAN FD communication method between vehicle-mounted controllers
CN107659405A (en) The encrypting and decrypting method that data communicate between a kind of transformer station boss station
CN105978798A (en) Message encryption transmission method, terminal and server
CN104253692A (en) SE-based (symmetric encryption based) key management method and device
CN203896378U (en) System for safe transmission of information

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