Summary of the invention
The present invention seeks in order to solve existing CAD sealing system reduction document difficulty big; Even and encrypt and jointly protect document also to have the problem that to confirm the person of signing and issuing.A kind of stamped signature watermaking system of the CAD of being used for document is provided.
A kind of stamped signature watermaking system that is used for the CAD document of the present invention, it comprises the stamped signature module, tests chapter module and recovery module,
Be embedded into original CAD document after the chapter shape that the stamped signature module is used for setting is decomposed, and embed the signing messages watermark and stamped signature is carried out in the watermark of tampering location information, then the CAD figure behind the stamped signature be issued;
Test the chapter module and be used for the CAD document behind the stamped signature that receives is carried out the checking of integrality: extract the signing messages of this CAD document, be used to verify whether the signature of this CAD document is forged; Reduce the watermark figure of this CAD document, be used to verify whether this CAD document is distorted, and the situation of being distorted when figure can provide tampering location information;
Recovery module is used to reduce tests the CAD document that chapter passes through.
Wherein, the workflow of stamped signature module is:
Step 1, judge whether this CAD document is affixed one's seal,
Judged result is for being to withdraw from this program; Judged result is for denying execution in step two;
Step 2, to the operation of affixing one's seal of CAD document, obtain to contain the CAD document of chapter shape;
Step 3, containing on the CAD document of chapter shape the signing messages watermark that embeds this CAD document;
Step 4, containing on the CAD document of chapter shape the information of the distorting watermark that embeds this CAD document, finishing the stamped signature of this CAD document, and the CAD figure behind the stamped signature is issued.
The workflow of testing the chapter module is:
Whether the CAD document that step 1, judgement receive is affixed one's seal,
Judged result is for being, execution in step 2, judged result be not for, and this CAD document can't be tested the chapter operation, quits a program;
Step 2, employing tampering location watermarking algorithm extract the fragile watermark in this CAD document,
Step 3, judge according to described fragile watermark information whether this CAD document is distorted,
Judged result identifies tampered position for being, tests the chapter failure; Judged result is for denying execution in step 4;
Step 4,8 DCT reversible water mark algorithms of employing extract reversible water marks, are the signing messages that this CAD document embeds,
Step 5, judge whether the signing messages of this CAD document is correct,
Judged result is for being to test Zhang Chenggong; Judged result is tested the chapter failure for not.
The workflow of recovery module is:
Steps A, judge whether the CAD document is reduced,
Judged result is for being to withdraw from this program; Judged result is for denying execution in step B;
Step B, judge this CAD document whether by testing chapter,
Judged result is for being execution in step C; Judged result is that testing Zhang Wei does not pass through, and withdraws from this program;
Step C, the information of the distorting watermark of this CAD document of reducing;
The reduction of this CAD document is finished in step D, the signing messages watermark of this CAD document of reducing.
Advantage of the present invention: system of the present invention at first carries out the embedding of reversible water mark and then carries out the embedding of fragile watermark.Owing to have based on the reversible water mark technology of integer transform and can accurately reduce the characteristic of original figure, and has bigger capacity, we can be embedded into signing messages in the original artwork, like this when extracting signing messages, figure also is reduced into the most initial state, has guaranteed the authenticity of graphical source in good condition.And based on the Fragile Watermark Algorithm of grid dividing as the outermost protection scheme of system; the susceptibility of distorting and the unchangeability of graph topology structure are played the integrality that has guaranteed figure goodly, and the polar plot electronic works has also just obtained excellent protection in the security of the process of completing and transmitting.
Embodiment
Embodiment one: below in conjunction with Fig. 1 to Fig. 8 present embodiment is described, the described a kind of stamped signature watermaking system that is used for the CAD document of present embodiment, it comprises the stamped signature module, tests chapter module and recovery module,
Be embedded into original CAD document after the chapter shape that the stamped signature module is used for setting is decomposed, and embed the signing messages watermark and stamped signature is carried out in the watermark of tampering location information, then the CAD figure behind the stamped signature be issued;
Test the chapter module and be used for the CAD document behind the stamped signature that receives is carried out the checking of integrality: extract the signing messages of this CAD document, be used to verify whether the signature of this CAD document is forged; Reduce the watermark figure of this CAD document, be used to verify whether this CAD document is distorted, and the situation of being distorted when figure can provide tampering location information;
Recovery module is used to reduce tests the CAD document that chapter passes through.
Present embodiment is taken all factors into consideration each secure context; designed and Implemented polar plot stamped signature watermark based on the multi-watermarking technology; this system uses the reversible water mark technology to embed sender's digital signature information and uses the softdog technology that graphic file is encrypted, and has fundamentally protected the security of polar plot.
The stamped signature module, the stamped signature part mainly comprises the embedding of chapter shape file, but the embedding of fragility tampering location watermark for the first time and the embedding of reversible water mark for the second time.Fig. 2 has described the main process of stamped signature.After whole figure of completing is carried out the embedding of chapter shape file, system will carry out watermark for the first time to the whole figure that comprises the chapter shape file and be about to the embedding of signing messages with the mode of reversible water mark.After obtaining embedding the figure of finishing, the watermarking algorithm second time of use immediately is each branch block message that the mode of fragile watermark embeds figure.The works of finishing have so promptly been obtained embedding.
Test the chapter module, test the chapter module and mainly comprised the figure that receives is carried out the checking of integrality, the extraction of signing messages and the reduction of checking and watermark figure.Under the situation that figure is distorted, can provide tampering location information, can inform that under the situation that signing messages checking is not passed through user's signature forges.The flow process of testing chapter is referring to Fig. 5.
Recovery module, as shown in Figure 8, at first to whether existing watermark information to judge in the figure, only comprise watermark information and first two steps and verify that the drawing that passes through just can revert to original state, and quilt was distorted or the drawing of the source-verify failure of signing can not be reduced before the reduction.
Embodiment two: below in conjunction with Fig. 1 and Fig. 2 present embodiment is described, present embodiment is described further embodiment one, and the workflow of stamped signature module is:
Step 1, judge whether this CAD document is affixed one's seal,
Judged result is for being to withdraw from this program; Judged result is for denying execution in step two;
Step 2, to the operation of affixing one's seal of CAD document, obtain to contain the CAD document of chapter shape;
Step 3, containing on the CAD document of chapter shape the signing messages watermark that embeds this CAD document;
Step 4, containing on the CAD document of chapter shape the information of the distorting watermark that embeds this CAD document, finishing the stamped signature of this CAD document, and the CAD figure behind the stamped signature is issued.
At first be on the CAD document, to affix one's seal.The major function of this part is that chapter shape is inserted in the middle of the original figure, and the chapter piece is decomposed, for the embedding of watermark ready.
It in the step 3 embedding of signing messages watermark.Referring to Fig. 3, guarantee the authenticity of graphical source, best mode uses the mode of watermark to be embedded in the original figure this signing messages after being to use the sender to use its private key to encrypt to the Hash of figure.Use 8 integer DCT algorithms, all data messages in the figure are carried out after the Hash, use sender's private key that it is signed, obtain 1024 signing messages, with this information as watermark information, use 8 integer DCT algorithms to be embedded in the middle of the original figure, capacity that this algorithm is good and the purpose that changes very suitable this step of characteristics of figure visual characteristic hardly.
It in the step 4 embedding of tampering location information watermark.Referring to Fig. 4, after primary watermark embeds, but we use the watermark mode of tampering location to carry out protection to pattern integrity.This algorithm needed to carry out once the initial work to original figure before embedding.The main thought of this algorithm is that watermark information is embedded in the middle of the straight line of graphic entity, and the coordinate size of straight line end points has then indicated this watermark information.
Embodiment three: present embodiment is described further embodiment two, step 2 described to the CAD document affix one's seal the operation process be: the chapter piece that configures is decomposed, is loaded into then in the CAD document.
Embodiment four: below in conjunction with Fig. 3 present embodiment is described, present embodiment is described further embodiment two, in the step 3 in the workflow that contains the signing messages watermark of this CAD document of embedding on the CAD document of chapter shape is:
Step 3 a, traversal contain chapter shape CAD document, obtain the coordinate data of all straight line entities;
Step 3 b, the coordinate data of obtaining according to step 3 a calculate the described cryptographic hash that contains chapter shape CAD document, and described cryptographic hash is 128;
Step 3 c, the cryptographic hash of obtaining according to the private key in the softdog and step 3 b are obtained 1024 signing messages;
Step 3 d, 8 DCT reversible water mark algorithms of employing are embedded into 1024 signing messages that step 3 c obtains in the CAD document that contains chapter shape, finish the work that embeds the signing messages watermark of this CAD document on the CAD document of chapter shape containing.
Embodiment five: below in conjunction with Fig. 4 present embodiment is described, present embodiment is described further embodiment two, in the step 4 in the workflow that contains the information of the distorting watermark of this CAD document of embedding on the CAD document of chapter shape is:
Step 4 a, the CAD document that will contain chapter shape carry out the figure initialization;
Step 4 b, the CAD document after step 4 a handled carry out the self-adaptation piecemeal by the iteration division rule;
Step 4 c, obtain the cryptographic hash of the solid data of this each piecemeal of CAD document;
Step 4 d, basis are determined the precision position of cryptographic hash to the iteration division rule of CAD document;
Step 4 e, according to the precision position, adopt Fragile Watermark Algorithm that watermark is embedded in each piecemeal, finish the process that embeds the information of the distorting watermark of this CAD document on the CAD document of chapter shape containing.
Embodiment six: below in conjunction with Fig. 5 present embodiment is described, present embodiment is described further embodiment one, and the workflow of testing the chapter module is:
Whether the CAD document that step 1, judgement receive is affixed one's seal,
Judged result is for being, execution in step 2, judged result be not for, and this CAD document can't be tested the chapter operation, quits a program;
Step 2, employing tampering location watermarking algorithm extract the fragile watermark in this CAD document,
Step 3, judge according to described fragile watermark information whether this CAD document is distorted,
Judged result identifies tampered position for being, and the chapter failure information is tested in output; Judged result is for denying execution in step 4;
Step 4,8 DCT reversible water mark algorithms of employing extract reversible water marks, are the signing messages that this CAD document embeds,
Step 5, judge whether the signing messages of this CAD document is correct,
Judged result is for being, the chapter successful information is tested in output; Judged result is exported and is tested the chapter failure information for not.
Test chapter and mainly comprise two major parts:
1, the checking of tampering location and fragile watermark thereof.The recipient takes figure in the hand and is one and had both comprised the stamped signature signing messages, has comprised the figure of tampering location information again.According to the order that multi-watermarking embeds, we must at first extract tampering location information and verify, just can carry out next step work under the situation that checking is passed through.The checking process flow diagram of tampering location and fragile watermark thereof is referring to Fig. 6.
2, the checking of signature and reversible water mark thereof.After the checking of previous step tampering location was passed through, we can take a figure that only comprises the watermark of signing.At this moment, the recipient will verify whether the signing messages that comprises among this figure is real, at first will use the reversible water mark algorithm that watermark information is extracted, and this watermark information that extracts is the signing messages that needs checking.When extracting watermark information, owing to use the reversible water mark algorithm that figure is carried out the embedding of watermark, under the situation that figure is not distorted, we can access embed watermark is figure before the signing messages.Because the verifier holds the PKI of signer, so can use this PKI that figure Hash after reducing is signed, compare with the signing messages that extracts thereby carry out this signing messages, determine whether the source of figure is true.The proof procedure of signature and reversible water mark thereof is referring to Fig. 7.
Embodiment seven: below in conjunction with Fig. 6 present embodiment is described, present embodiment is described further embodiment six, judges in the step 3 that the process whether this CAD document is distorted is:
The watermark information that this CAD document that step 31, the fragile watermark that step 2 is extracted are divided is every;
Step 32, judge whether every watermark information is identical,
Judged result is for being that this CAD document is not distorted, and finishes the checking of this step; Judged result is not for, and then this CAD document was distorted, and will distort part with red block and identify.
Embodiment eight: below in conjunction with Fig. 7 present embodiment is described, present embodiment is described further embodiment six, judges in the step 5 whether correct process is for the signing messages of this CAD document:
Step 51, traversal contain chapter shape CAD document, obtain the coordinate data of all straight line entities;
Step 52, the coordinate data of obtaining according to step 51 calculate the described cryptographic hash that contains chapter shape CAD document, and described cryptographic hash is 128;
Step 53, the cryptographic hash of obtaining according to private key from softdog and step 52 are obtained 1024 signing messages;
The signing messages that step 54, the signing messages that step 53 is obtained and step 4 are obtained compares,
If comparative result is consistent, then the signature verification of this CAD document is correct; Comparative result is inconsistent, the then signature verification of this CAD document failure.
Embodiment nine: below in conjunction with Fig. 8 present embodiment is described, present embodiment is described further embodiment one, and the workflow of recovery module is:
Steps A, judge whether the CAD document is reduced,
Judged result is for being to withdraw from this program; Judged result is for denying execution in step B;
Step B, judge this CAD document whether by testing chapter,
Judged result is for being execution in step C; Judged result is that testing Zhang Wei does not pass through, and withdraws from this program;
Step C, the information of the distorting watermark of this CAD document of reducing;
The reduction of this CAD document is finished in step D, the signing messages watermark of this CAD document of reducing.