CN102916945A - 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
CN102916945A
CN102916945A CN2012103622591A CN201210362259A CN102916945A CN 102916945 A CN102916945 A CN 102916945A CN 2012103622591 A CN2012103622591 A CN 2012103622591A CN 201210362259 A CN201210362259 A CN 201210362259A CN 102916945 A CN102916945 A CN 102916945A
Authority
CN
China
Prior art keywords
key
printer
dynamic
control terminal
authorization
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.)
Granted
Application number
CN2012103622591A
Other languages
Chinese (zh)
Other versions
CN102916945B (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 the printer safety encipher.
Background technology
Present printer all is that the communications protocol of employing standard is carried out data transfer mostly, the user is limited to the management of printer apparatus and print out task, especially for vital task and important service print job, printing such as valuable bills such as invoice, lottery ticket, car and boat ticket and commercial discount volumes, the communications protocol fail safe of standard is not high, data are revealed in transmission course easily, cause occurring easily 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 kind of method for printer communication protocol dynamic safety encipher comprises:
Encrypt the 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;
The dynamic key production step after printer detects triggering signal, generates dynamic key according to encrypting sample, and dynamic key is sent to control terminal;
The first key generates step, and control terminal receives dynamic key and in conjunction with behind 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 that then authorization for printer prints;
Encrypt forwarding step, after printer was authorized, control terminal used the first key that printed document is encrypted, and the printed document after will encrypting sends to printer;
The deciphering printing step, the printed document after printer receive to be encrypted, use the second key that it is decrypted after, print output.
Further, in the described encryption sample setting steps, described encryption sample comprises a generator g among a prime number q and the 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, send a triggering signal to printer simultaneously.
Further, described dynamic key production step, it is specially:
After printer detects triggering signal, select the second random number b according to encrypting 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, employing formula (gb) a (modq) sends to printer with the first key after generating the first key.
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 the control terminal is encrypted, and the double-encryption mode that the printed document that transmits is encrypted, avoid causing the situation of data leakage, improved fail safe and the reliability of transfer of data in the print procedure.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples.
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 the 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;
The dynamic key production step after printer detects triggering signal, generates dynamic key according to encrypting sample, and dynamic key is sent to control terminal;
The first key generates step, and control terminal receives dynamic key and in conjunction with behind 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 that then authorization for printer prints;
Encrypt forwarding step, after printer was authorized, control terminal used the first key that printed document is encrypted, and the printed document after will encrypting sends to printer;
The deciphering printing step, the printed document after printer receive to be encrypted, use the second key that it is decrypted after, print 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 the described encryption sample setting steps, described encryption sample comprises a generator g among a prime number q and the 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, send a triggering signal to printer simultaneously.
Be further used as preferred embodiment, described dynamic key production step, it is specially:
After printer detects triggering signal, select the second random number b according to encrypting 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, employing formula (gb) a (modq) sends to printer with the first key after generating the first key.
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, send a triggering signal to printer simultaneously;
S3, dynamic key production step, after printer detects 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 abrupt action occuring or surpass setting-up time, dynamic key ceases to be in force automatically, and needs 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 the cutting knife action;
S4, the first key generate step, and control terminal receives dynamic key and in conjunction with this dynamic key, employing formula (gb) a (modq) sends to printer with the first key after generating the first key;
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 that then authorization for printer prints, otherwise printer can not print;
S7, encrypt forwarding step, after printer was authorized, control terminal used the first key that printed document is encrypted, and the printed document after will encrypting sends to printer;
S8, deciphering printing step, the printed document after printer receive to be encrypted, use the second key that it is decrypted after, print output; If printed document is correctly deciphered, then printer prints out correct printed document, otherwise, the printed document of printer printout mess code.
Because (gb) a (modq)=(ga) b (modq)=gab (modq), the first key equate with the second key, so adopt this method can correctly print the encrypting and decrypting of mandate and printed document to printer.And adopt this method, data are in transmission course, may reveal generator g, prime number q, authorization key ga (modq) and dynamic key gb (modq), but, owing to have no idea to find the solution fast at present 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, be difficult to go out gab (modq) from the information calculations of revealing, thereby can't carry out illegal printing mandate or printout printed document.
More than be that better enforcement of the present invention is specified, 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 of spirit of the present invention, the modification that these are equal to or replacement all are included in the application's claim limited range.

Claims (6)

1. a method that is used for printer communication protocol dynamic safety encipher is characterized in that, comprising:
Encrypt the 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;
The dynamic key production step after printer detects triggering signal, generates dynamic key according to encrypting sample, and dynamic key is sent to control terminal;
The first key generates step, and control terminal receives dynamic key and in conjunction with behind 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 that then authorization for printer prints;
Encrypt forwarding step, after printer was authorized, control terminal used the first key that printed document is encrypted, and the printed document after will encrypting sends to printer;
The deciphering printing step, the printed document after printer receive to be encrypted, use the second key that it is decrypted after, print output.
2. a kind of method for printer communication protocol dynamic safety encipher according to claim 1 is characterized in that, in the described encryption sample setting steps, described encryption sample comprises a generator g among a prime number q and the finite field Fq.
3. a kind of method for printer communication protocol dynamic safety encipher according to claim 2 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, send a triggering signal to printer simultaneously.
4. a kind of method for printer communication protocol dynamic safety encipher according to claim 3 is characterized in that, described dynamic key production step, and it is specially:
After printer detects triggering signal, select the second random number b according to encrypting sample, b ∈ 1,2 ..., q-1}, and then adopt formula gb (modq) to generate dynamic key, and dynamic key is sent to control terminal.
5. a kind of method for printer communication protocol dynamic safety encipher according to claim 4 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, employing formula (gb) a (modq) sends to printer with the first key after generating the first key.
6. a kind of method for printer communication protocol dynamic safety encipher according to claim 5 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 true CN102916945A (en) 2013-02-06
CN102916945B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179167A (en) * 2015-02-06 2021-07-27 多佛欧洲有限责任公司 Advanced protection system for consumable or removable components

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179167A (en) * 2015-02-06 2021-07-27 多佛欧洲有限责任公司 Advanced protection system for consumable or removable components

Also Published As

Publication number Publication date
CN102916945B (en) 2014-02-05

Similar Documents

Publication Publication Date Title
CN108819486B (en) Consumable chip and its communication means, consumable chip and imaging device communication system, method
CN106790223B (en) Data transmission method, equipment and system
CN108243181A (en) A kind of car networking terminal, data ciphering method and car networking server
CN104158653A (en) Method of secure communication based on commercial cipher algorithm
CN102112960A (en) Authenticating replaceable printer component
EP2560319B1 (en) Method, apparatus and system for data encryption transmission in m2m
WO2009046088A1 (en) Systems and methods for preventing transmitted cryptographic parameters from compromising privacy
CN101938500B (en) Method and system for verifying source address
CN103731266B (en) Method and system for authenticating electronic certificate
CN101707767B (en) Data transmission method and devices
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
CN101789863B (en) Safe data information transmission method
CN101895881B (en) Method for realizing GBA secret key and pluggable equipment of terminal
CN101431411A (en) Dynamic encryption method for network game data
KR102219086B1 (en) HMAC-based source authentication and secret key sharing method and system for Unnamed Aerial vehicle systems
CN102281303A (en) Data exchange method
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
CN107566119A (en) A kind of guard method of eSIM cards data safety and system
CN102624892A (en) Method for preventing plug-in client from simulating hyper text transmission protocol (HTTP) request
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
CN101789861A (en) Secure information transmission method
CN104253692A (en) SE-based (symmetric encryption based) key management method and device

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