A kind of method of checking contents of paper file whether to be distortedTechnical field
The present invention relates to digital signature and planar bar code technology, refer in particular to and use digital signature and planar bar code technology to realize a kind of method of checking paper file whether to be distorted.
Summary of the invention
(1) technical matters that will solve
The present invention seeks to two-dimension code is used in combination with digital signature, a kind of method of checking contents of paper file whether to be distorted is provided, solve the electronic document printout and be the problem of document content authenticity and validation verification behind the paper file.
(2) technical scheme
For achieving the above object, technical scheme of the present invention is achieved in that
1, a kind of method of checking contents of paper file whether to be distorted, this method comprises:
(1), the making processing procedure of electronic document: A, the page number information of electronic document current page content and current page handled form summary, with private key summary is encrypted and is formed signature; B, the content with the electronic document current page, the page number information of current page and the signature among the A form electronic data with set form, and electronic data is formed two-dimension code, are placed on the footer blank space of electronic document current page; C, electronic document printout become paper file.
(2), whether contents of paper file is distorted is carried out proof procedure: A, the paper file current page is scanned into picture format, through handling content, current page page number information and the signature that obtains current page from the image two-dimension code in the data of preserving; B, the current page content obtained among the A and current page page number information handled form summary M; C, obtain corresponding PKI according to the private key in the signature that obtains among A sign, using public-key is decrypted the signature that obtains among the A, obtains M1; D, comparison M and M1; If identical, represent that then the data of preserving in the paper file current page two-dimension code were not distorted; E, the current page content obtained among the A and current page page number information and contents of paper file are compared; If identical, represent that then contents of paper file was not distorted, the checking paper file passes through.
2, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, the page number information with electronic document current page content and current page described in step (1) A is handled and is formed summary and be meant that the page number of word content that the electronic document current page is comprised and current page and the total page number information of the document are as input, carry out Hash operation, obtain summary info.
3, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, with private key summary encrypt is formed that signature is meant that the signature private key that uses in the digital certificate is encrypted the summary info in the claim 2 and the digital signature value that obtains described in step (1) A.
4, the method for whether being distorted according to 3 described check contents of paper file; it is characterized in that; described digital certificate is meant and is stored in the digital certificate that is used among the intelligent key to encrypt with the digital signature computing to have the advantages that signature private key does not go out key, can effectively protect the safety of signature private key.
5, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, the page number information of the content with the electronic document current page described in step (1) B, current page and the signature among (1) A form electronic data with set form and are meant, utilize content, current page page number information and the total page number information of document of self-defining peculiar set form store electronic documents current page and the digital signature information among (1) A.
6, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, described in step (1) B electronic data is formed two-dimension code, the footer blank space that is placed on the electronic document current page is meant utilizes two-dimension code to have the characteristics of data storage function, transfers electronic data the storage of to two-dimension code form.
7, the method for whether being distorted according to 6 described check contents of paper file is characterized in that described two-dimension code is meant the PDF417 sign indicating number.
8, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, among step (2) A paper file current page is scanned into picture format, the content, current page page number information and the signature that obtain current page from the image two-dimension code in the data that the process processing is preserved are meant and utilize image recognition technique and two-dimension code recognition technology, the content that is stored in the two-dimension code is reduced, thereby isolate the content of the current page of storage, the information and the digital signature information of the page number information of current page, the total page number of document.
9, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, the current page content obtained among (2) A and current page page number information are handled described in step (2) B form summary M be meant will reduction current page word content, current page page number information and total page number information as input, carry out Hash operation, obtain summary info.
10, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, obtain corresponding PKI according to the sign of the private key in the signature that obtains among (2) A described in step (2) C and be meant the public key information that from the digital certificate of signing messages, extracts.
11, the method for whether being distorted according to 1 described check contents of paper file, it is characterized in that, use public-key described in step (2) C signature that obtains among (2) A is decrypted, obtaining M1 is meant according to asymmetric key algorithm, use private key to encrypt, use the PKI of this private key correspondence also can be decrypted.
(3) beneficial effect
From technique scheme as can be seen, the present invention has following beneficial effect:
1, the method whether check contents of paper file provided by the invention is distorted, utilization is based on Public Key Infrastructure (Pubic Key Infrastructure, PKI) electronic signature issued of technology and third party's digital certificate authentication center is made data relevant informations such as document content is carried out the reliable electronic signature, meet the requirement of " People's Republic of China's law of electronic signature ", acquire full legal force, and can use as the evidence in the persecutio easily, solve for setting up dispute, confirmation of responsibility mechanism provides the reliable technique basis, dissolves the business risk of present existence.
2, the check contents of paper file provided by the invention method of whether being distorted, allowing document draft electronic signature that the people utilizes third party's digital certificate authentication center of Ministry of Information Industry permission to issue makes data (digital certificate and signature key) relevant informations such as document content is carried out digital signature, guarantee all to be tested out any modification that the two-dimension code content is done; Utilize two-dimension code data storage technology storage document content simultaneously, thereby guarantee any modification, also can be tested out document content.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
Core content of the present invention is: utilize digital signature and two-dimension code data storage technology, with document content, page number information with to the digital signature value of these information, be printed on the footer blank space of paper file with the two-dimension code form, thereby guarantee the true and reliable of contents of paper file, prevent to be difficult to after contents of paper file from being distorted to differentiate, and guarantee that document drafts the people to the approval of paper file and undeniable.
As shown in Figure 1 and Figure 2, Fig. 1 a kind ofly checks the electronic document in the method whether contents of paper file distorted to make processing flow chart for provided by the invention, and this method may further comprise the steps:
Step 101: the page number information of electronic document current page content and current page is handled the formation summary, with private key summary is encrypted to form and sign;
Step 102: the content of electronic document current page, the page number information of current page and the signature in the step 101 are formed electronic data with set form, electronic data is formed two-dimension code, be placed on the footer blank space of electronic document current page;
Step 103: the electronic document printout becomes paper file;
Whether Fig. 2 a kind ofly checks contents of paper file in the method whether contents of paper file distorted to be distorted to carry out the proof procedure process flow diagram for provided by the invention, and this method may further comprise the steps:
Step 201: the paper file current page is scanned into picture format, through handling content, current page page number information and the signature that obtains current page in the data of from the image two-dimension code, preserving;
Step 202: the current page content and the current page page number information that obtain in the step 201 are handled formation summary M;
Step 203: obtain corresponding PKI according to the sign of the private key in the signature that obtains in the step 201, using public-key is decrypted the signature that obtains in the step 201, obtains M1;
Step 204: compare M and M1.If identical, represent that then the data of preserving in the paper file current page two-dimension code were not distorted;
Step 205: the current page content and the corresponding content of pages with paper file of current page page number information that obtain in the step 201 are compared.If identical, represent that then contents of paper file was not distorted, the checking paper file passes through.
Described in the above-mentioned steps 101 page number information of electronic document current page content and current page being handled formation makes a summary, with private key summary encrypt being formed signature is meant electronic document current page content, current page page number information and the total page number information of document and carries out Hash operation and to obtain summary info as input; And utilize the signature private key in the digital certificate of storing among the intelligent key that summary info is carried out digital signature;
Described in the above-mentioned steps 102 content of electronic document current page, the page number information of current page and the signature in the step 101 are formed electronic data with set form, electronic data is formed two-dimension code, the footer blank space that is placed on the electronic document current page is meant the information of the page number information of the content of electronic document current page, current page, the total page number of document and signature value with self-defining fixed data storage format and be converted to the PDF417 sign indicating number, and output is when a page or leaf document footer blank space;
Described in the above-mentioned steps 202 the paper file current page is scanned into picture format, be meant that through handling the content, current page page number information and the signature that obtain current page in the data of from the image two-dimension code, preserving use two dimension code reading equipment reduces to data information stored in the two-dimension code, thereby can isolate content, page number information and the signature value of current page;
Described in the above-mentioned steps 202 the current page content obtained in the step 201 and current page page number information handled form summary M be meant will reduction in the step 201 current page content, current page page number information and the total page number information of document carry out Hash operation as input, thereby obtain summary info M;
Obtain corresponding PKI according to the sign of the private key in the signature that obtains in the step 201 described in the above-mentioned steps 203, use public-key the signature that obtains in the step 201 is decrypted, obtain M1 and be meant the PKI of isolating the signature private key correspondence in the digital certificate from signing messages, and use this PKI that the signature value of obtaining in the step 201 is decrypted, thereby obtain the summary info M1 of current page document content, current page page number information and total page number information;
Embodiment
Be the method operation flow synoptic diagram of whether being distorted according to embodiment of the invention check contents of paper file as shown in Figure 3, Figure 4, this method may further comprise the steps:
One, the making processing procedure of electronic document
Step 301:, the page number information of electronic document current page content and current page handled form summary;
Step 302: the summary that produces in thestep 301 is encrypted the formation digital signature with digital certificate and private key that reliable third party issues;
Step 303: the content of electronic document current page, the page number information of current page and the signature in thestep 301 are formed electronic data with set form, convert electronic data to the PDF417 two-dimension code, be placed on the footer blank space of electronic document current page;
Step 304: with the electronic document printout is paper file.
Two, whether contents of paper file is distorted and is carried out proof procedure:
Step 401: two-dimension code in the paper file current page is distinguished content, current page page number information and the signature of the current page that reduction is wherein preserved;
Step 402: the current page content and the current page page number information that obtain in thestep 401 are carried out Hash operation as input, form summary info M;
Step 403: according to the PKI that obtains in the signing messages that obtains in thestep 401 signature that obtains in thestep 401 is decrypted, obtains M1;
Step 404: compare M and M1.If identical, represent that then the data of preserving in the paper file current page two-dimension code were not distorted;
Step 405: the current page content obtained in thestep 401 and current page page number information and contents of paper file are compared.If identical, represent that then contents of paper file was not distorted, the checking paper file passes through.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; be not limited to the present invention; within the spirit and principles in the present invention all, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.