Electronic signature method for preventing seal from being stolen

By parsing and merging electronic seal images and document images, and adding traceability information, the problem of electronic signature documents being misappropriated is solved, the physical fusion of seal and document content is achieved, preventing seal theft, and ensuring the authenticity and non-repudiation of the signature. .

CN118779930APending Publication Date: 2024-10-15SHANGHAI YIGAO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410968490.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing electronic signature files can extract the complete seal image data in the file through a document editor or file parsing tool, leading to electronic seal theft and abuse.

Method used

By analyzing the physical characteristics of the electronic seal image, adding a signature domain, rotating and fusing the seal image and the document image, and adding traceability information in the fused image in a steganographic manner, calculating the signature value, and filling the traceability data into the PDF document, the seal is realized Physical fusion with file content.

Benefits of technology

Effectively prevent the theft and abuse of electronic seals and ensure the authenticity and non-repudiation of electronic signatures without changing the seal form and document content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779930A_ABST
    Figure CN118779930A_ABST
Patent Text Reader

Abstract

The invention discloses a seal anti-theft electronic signature method which comprises the following steps: step 1, analyzing physical characteristics of an electronic seal image img1, including signature size characteristics and signature position physical characteristics; step 2, adding a signature domain at a to-be-signed coordinate position of the document; 3, converting the document at the signature domain position into a document image img3; 4, rotating the seal image img1, fusing the seal image with the document image img3 to obtain a fused image img5, and adding a seal traceability information placeholder into the fused image in a steganography manner to obtain a fused image img6 with a traceability placeholder; step 5, filling the fused image img6 into a signature domain, and calculating a signature value; and splicing the electronic seal service attribute and the calculated signature value to obtain traceability data, and filling the traceability data into the placeholder position of the fusion image img6 in the PDF document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent relates to the technical field of electronic signatures for formatted documents, and specifically to a seal-theft-proof electronic signature method. Background Art

[0002] Electronic signature refers to all electronic documents that exist in electronic form, are attached to electronic documents and are logically associated with them. They can be used to identify the identity of the signer of the electronic document, ensure the integrity of the document, and indicate that the signer agrees with the facts stated in the electronic document. Electronic signature is a form of electronic signature. It uses image processing technology to transform the electronic signature operation into the same visual effect as the paper document stamping operation. At the same time, electronic signature technology is used to ensure the authenticity and integrity of electronic information and the non-repudiation of the signer.

[0003] Existing electronic signature files can use document editors or file parsing tools to extract the complete seal image data in the file, resulting in the theft and abuse of electronic seals. Summary of the invention

[0004] In view of this, the present invention studies and improves the existing electronic signature technology, and proposes a seal-theft-proof electronic signature method, which can well solve the above-mentioned problem.

[0005] The technical solution adopted by the present invention to solve its technical problem is:

[0006] A seal theft-proof electronic signature method comprises the following steps:

[0007] Step 1, analyzing the physical features of the electronic seal image img1, including the signature size features and the physical features of the signature position;

[0008] Step 2: Add a signature field at the coordinate position of the document to be signed;

[0009] Step 3, convert the document at the signature field location into a document image img3;

[0010] Step 4, rotating the seal image img1, and fusing the seal image with the document image img3 to obtain a fused image img5, adding a seal traceability information placeholder in a steganographic manner to the fused image to obtain a fused image img6 with a traceability placeholder;

[0011] Step 5. Fill the fused image img6 into the signature field and calculate the signature value; concatenate the electronic seal business attributes and the calculated signature value to obtain the traceability data, and fill the traceability data into the placeholder position of the fused image img6 in the PDF document.

[0012] The seal theft-proof electronic signature method, wherein:

[0013] The physical features of the electronic seal image img1 include the signature size features and the signature position physical features, where the signature size features include: width width, height height, resolution dpi; the signature position physical features include: rotation angle angle, physical coordinates (x, y)

[0014] Step 1 includes: calculating the coordinates of the rectangular area of ​​the electronic seal image img1 in the document: the lower left corner (xl, yl), the upper right corner (xr, yr):

[0015] set up:

[0016] When the seal rotation angle is 0 degrees:

[0017] x r =x l +width

[0018] y r =y l +height

[0019] When the seal is rotated at an angle of 90 degrees:

[0020] x r =x l +height

[0021] y r =y l +width.

[0022] The seal theft-proof electronic signature method, wherein step 4 comprises:

[0023] Step 4.1 Rotate the stamp image img1:

[0024] Set the center coordinates of the stamp image img1 to (x Tc ,y Tc ), the clockwise rotation angle is θ

[0025] The rotation matrix and translation matrix are defined as follows:

[0026]

[0027] Where T rot (θ) means rotating the image clockwise by an angle of θ with the upper left corner of the image as the origin (0,0). shift (dx,dy) means translation (dx,dy);

[0028] Then the image is (x Tc ,y Tc ) is the clockwise rotation of θ as the center.

[0029]

[0030] The stamp image img1 is transformed into a new stamp image img4 according to the above formula, where (x, y) represents the coordinates of the pixel points in the image img1. Represents the coordinates of the point in the new image img4 after rotation.

[0031] The seal theft-proof electronic signature method, wherein step 4 comprises:

[0032] Step 4.2 The seal image img4 is merged with the document image img3:

[0033] 4.2.1 Perform Gaussian pyramid decomposition on the image;

[0034] 4.2.2 Constructing Laplacian Pyramid from Gaussian Pyramid;

[0035] 4.2.3 Obtaining the mask image for fusion;

[0036] 4.2.4 Laplacian pyramid image fusion.

[0037] The seal theft-proof electronic signature method, wherein step 4.2.1 comprises:

[0038] 1. Let the original image be G0, and G0 be the 0th layer of the Gaussian pyramid;

[0039] 2. Perform Gaussian low-pass filtering and down-sample the original input image G0 to obtain the first layer G1 of the Gaussian pyramid;

[0040]

[0041] Where i and j represent the i-th row and j-th column of G1; ω(m,n) is a two-dimensional separable 5*5 window function, m and n are integers in [-2,2], and the expression of ω(m,n) is:

[0042]

[0043] 3. Perform low-pass filtering and down-sampling on the first layer image G1 to obtain the second layer G2 of the Gaussian pyramid;

[0044]

[0045] 4. Repeat the above process to form a Gaussian pyramid with 4 layers, namely:

[0046]

[0047] At this point, G0, G1, G2, G3, and G4 form a Gaussian pyramid, where G0 is the bottom layer of the pyramid and G4 is the top layer of the pyramid.

[0048] The seal theft-proof electronic signature method, wherein step 4.2.2 comprises:

[0049] 1. Use G4 to interpolate to get the enlarged image make The dimensions of are the same as those of G3 and are expressed as:

[0050]

[0051] Among them, i and j represent The i-th row and j-th column of ; ω(m,n) is a two-dimensional separable 5*5 window function, m and n are integers in [-2,2], and the expression of ω(m,n) is:

[0052]

[0053] 2. Use the interpolation method to obtain the enlarged image of G3 make The size of is the same as that of G2 and is expressed as:

[0054]

[0055] 3. Repeat the above process to obtain other magnified images, namely:

[0056]

[0057] In the above formulas,

[0058] 4. Order Get the images of each layer of the Laplace pyramid;

[0059] Where N is the number of the top layer of the Laplace pyramid, LP l It is the Laplace pyramid

[0060] Decomposed layer l image. That is:

[0061]

[0062] LP4=G4

[0063] The pyramid composed of LP0, LP1, LP2, LP3, and LP4 is the Laplace pyramid;

[0064] According to the above 4.2.1 and 4.2.2 processes and methods, the Laplacian pyramid images LA and LB of the seal image img4 and the document image img3 are obtained respectively.

[0065] The seal theft-proof electronic signature method, wherein step 4.2.3 comprises:

[0066] 1. Get the stamp image transparency mask

[0067] Extract the transparency mask A from the stamp image img4, and normalize the transparency mask image to between 0 and 1 to obtain the transparency mask image C;

[0068] 2. Get the foreground area mask SealM of the seal image img4

[0069] 2.1 Convert the stamp image img4 to a grayscale image img4_grey

[0070] 2.2 Use the threshold segmentation method to binarize the grayscale image img4_grey and extract the foreground part of the seal;

[0071] 2.3 Generate a mask SealM, keep the foreground area, set the pixel value to 1; set the background area to black, and set the pixel value to 0;

[0072] 3. Get the character contour mask CharM of the document image img3

[0073] 3.1 Binarize the document image img3 to obtain a binary image img_binary;

[0074] 3.2 Perform contour detection on the binary image img_binary to obtain the contour of the text area;

[0075] 3.3 Generate a binary mask image CharM based on the detected contour, the area within the contour has a pixel value of 1, and the rest is 0;

[0076] 4. Combine the stamp mask SealM and the contour mask CharM to generate the final fusion mask M

[0077] 5. Obtain the Laplacian pyramid images LM and LC of the fused mask image M and transparency mask C according to the process and method of 4.2.1 and 4.2.2 above.

[0078] The seal theft-proof electronic signature method, wherein step 4.2.4 comprises:

[0079] LA l and LB lThey are the seal image img4 and the document image img3, which are the first layer images obtained after Laplace pyramid decomposition. The fusion result of the two is LF l (0≤l≤N);

[0080] LM l LC l is the lth layer image of the Laplacian pyramid image that fuses the mask image M and the transparency mask image C;

[0081] When l=4, LA4, LB4, LM4, and LC4 are the top-level images obtained by decomposing the seal image Img4, the document image img3, the fusion mask image M, and the transparency mask image C through the Laplacian pyramid respectively;

[0082] Set GA * l and GB * l They are the stamp image img4 and the document image img3, which are the enlarged images of the Gaussian pyramid layer l in the process of generating the Laplacian pyramid. The fusion result of the two is GH i * (0≤l≤N);

[0083] 1. Fusion of top-level images

[0084] For the fusion of the top-level image, first calculate the average gradient G of the region with a size of M*N (M, N are odd numbers and M≥3, N≥3) centered on each pixel:

[0085]

[0086] Among them, ΔI x and ΔI y are the first-order differences of pixel f(x,y) in the x and y directions, respectively, and are defined as follows:

[0087] ΔI x =f(x,y)-f(x-1,y)

[0088] ΔI y =f(x,y)-f(x,y-1)

[0089] Set the fusion result of the top layer image to:

[0090] (1) When LM4(i,j)=0:

[0091]

[0092] (2) When LM4(i,j)=1:

[0093]

[0094] (3) When LM4(i,j)=2:

[0095] LF4(i,j)=LB4(i,j)

[0096]

[0097] (4) When LM N When (i,j)=3:

[0098] LF4(i,j)=LA4(i,j)

[0099]

[0100] 2. Fusion of other layer images

[0101] When 0≤l<4, for the l-th layer image after Laplace pyramid decomposition, its regional energy is first calculated:

[0102]

[0103] Here, p=1, q=1, The fusion effect of other layers of images is:

[0104] (1) When LM l When (i,j)=0:

[0105]

[0106] (2) When LM l When (i,j)=1:

[0107]

[0108] (3) When LM l When (i,j)=2:

[0109] LF l (i,j)=LB l (i,j)0≤l<4

[0110] GF l * (i, j) = GB l (i, j) 0≤l<4

[0111] (4) When LM l When (i,j)=3:

[0112] LF l (i,j)=LA l (i,j)0≤l<4

[0113] GF l * (i, j) = GA l (i, j) 0≤l<4

[0114] 3. Reconstruction of fused image

[0115] After obtaining the fusion images LF1, LF2, LF3, LF4 of each level of the seal image and document image pyramid and the enlarged image GF1 of each level of the Gaussian pyramid image * , After that, it is reconstructed by the following formula to restore to the corresponding layers of the Gaussian pyramid until G0 is obtained, which is the final fused image img5;

[0116] Reconstruction formula:

[0117]

[0118] That is: G4 = LF4

[0119]

[0120] The seal theft-proof electronic signature method, wherein step 4 further comprises:

[0121] Step 4.3: Fuse the seal image img5 to add the traceability information placeholder in a steganographic way:

[0122] Assume that the fused seal data is C, the length of the fused seal data is L1 bytes, and the seal traceability information placeholder is C1, with a length of L2 bytes;

[0123] The fused seal img5 data C and the seal traceability information placeholder C1 are fused according to the following formula to obtain the fused data C2:

[0124] C2=C∪C1

[0125] The stamp data C2 is saved as the latest fused stamp img6.

[0126] The seal theft-proof electronic signature method, wherein step 5 comprises:

[0127] Step 5-1, add the latest fused seal image img6 in the signature field, and record the starting position of the image data in the file as P1;

[0128] Step 5-2: Encrypt the data to be protected in the file to obtain a signature value, and fill it into the signature field;

[0129] Step 5-3: Concatenate the electronic seal business attribute and the signature value calculated in step 5-2 to obtain the traceability data C3, the length of C3 is L3; and fill the traceability data C3 into the PDF document, starting at P2, to achieve the traceability data filling in the latest fused seal img6.

[0130] P2=P1+L1+L2-L3. BRIEF DESCRIPTION OF THE DRAWINGS

[0131] Figure 1 Flowchart of electronic signature method to prevent seal theft DETAILED DESCRIPTION

[0132] The following is combined with Figure 1 , the specific implementation modes of the present invention are described in detail. The implementation modes are exemplary and are only used to explain the present invention, and should not be understood as limiting the present invention. Obviously, the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0133] like Figure 1 As shown, the seal theft-proof electronic signature method of the present invention comprises the following steps:

[0134] Step 1: Analyze the physical features of the electronic seal image, including the signature size features and the physical features of the signature position. The signature size features include: width, height, and resolution dpi; the physical features of the signature position include: rotation angle, physical coordinates (x, y)

[0135] Calculate the coordinates of the rectangular area of ​​the electronic seal image img1 in the document: lower left corner (xl, yl), upper right corner (xr, yr):

[0136] set up:

[0137] When the seal rotation angle is 0 degrees:

[0138] x r =x l +width

[0139] y r =y l +height

[0140] When the seal is rotated at an angle of 90 degrees:

[0141] x r =x l+height

[0142] y r =y l +width

[0143] Step 2: According to the PAdES (PDF Advanced Electronic Signatures) PDF digital signature standard, add a signature field at the coordinates (xl, yl) and (xr, yr) to be signed in the PDF document.

[0144] Step 3: Parse the PDF document metadata and convert the PDF metadata into an image img2 with the same resolution as the electronic seal image img1 and an alpha channel; to reduce the size of the document storage space, crop img2 to keep only the rectangle ((x l ,y l )、((x r ,y r ) area and save it as image img3.

[0145] Step 4: Rotate the seal image and merge the seal image with the document image.

[0146] Step 4.1 Rotate the stamp image img1:

[0147] Set the center coordinates of the stamp image img1 to (x Tc ,y Tc ), the clockwise rotation angle is θ (the signature scenario only considers rotations of integer multiples of 90 degrees)

[0148] The image coordinate transformation matrix is ​​expressed as the product of the translation matrix and the rotation matrix. The rotation matrix and the translation matrix are defined as

[0149]

[0150] Where T rot (θ) means rotating the image clockwise by an angle of θ with the upper left corner of the image as the origin (0,0). shift (dx,dy) means translation (dx,dy).

[0151] Then the image is (x Tc ,y Tc ) is the clockwise rotation of θ as the center.

[0152]

[0153] All pixels in the stamp image img1 are transformed into a new stamp image img4 according to the above formula. Where (x, y) represents the coordinates of the pixel in the image img1. Represents the coordinates of the point in the new image img4 after rotation.

[0154] Step 4.2 The seal image img4 is merged with the document image img3:

[0155] Image fusion refers to combining two or more images into a new image. Here, the seal image and the document image are fused into a new image. The fusion method is an image fusion algorithm based on pyramid decomposition, which combines the relevant processing of the seal image and the document image. The image is decomposed into different spatial frequency bands by Laplace pyramid decomposition. The fusion process is performed on each spatial frequency layer separately. In this way, different fusion operators can be used for the features and details on different frequency bands to achieve the purpose of highlighting the features and details on specific frequency bands, and the features and details from different images can be fused together.

[0156] 4.2.1 Since the Laplacian pyramid of an image is derived from the Gaussian pyramid, the image must first be decomposed into a Gaussian pyramid.

[0157] 1. Let the original image be G0, and G0 be the 0th layer (bottom layer) of the Gaussian pyramid

[0158] 2. Perform Gaussian low-pass filtering and down-sample the original input image G0 to obtain the first layer G1 of the Gaussian pyramid;

[0159]

[0160] Where i and j represent the i-th row and j-th column of G1; ω(m,n) is a two-dimensional separable 5*5 window function, m and n are integers in [-2,2], and the expression of ω(m,n) is:

[0161]

[0162] 3. Perform low-pass filtering and down-sampling on the first layer image G1 to obtain the second layer G2 of the Gaussian pyramid;

[0163]

[0164] 4. Repeat the above process to form a Gaussian pyramid. The Gaussian pyramid layer used in this patent

[0165] The number is 4. That is:

[0166]

[0167] So far, G0, G1, G2, G3, and G4 form a Gaussian pyramid, where G0 is the bottom layer of the pyramid (the same as the original image) and G4 is the top layer of the pyramid. The current layer image of the Gaussian pyramid is generated by first performing a Gaussian low-pass filter on the previous layer image, and then downsampling it by 2 every other row and column. The size of the current layer image is 1 / 4 of the size of the previous layer image.

[0168] 4.2.2 Constructing Laplacian Pyramid from Gaussian Pyramid

[0169] 1. Use G4 to interpolate to get the enlarged image make The dimensions of are the same as those of G3 and are expressed as:

[0170]

[0171] Among them, i and j represent The i-th row and j-th column of ; ω(m,n) is a two-dimensional separable 5*5 window function, m and n are integers in [-2,2], and the expression of ω(m,n) is:

[0172]

[0173] 2. Use the interpolation method to obtain the enlarged image of G3 make The size of is the same as that of G2 and is expressed as:

[0174]

[0175] 3. Repeat the above process to obtain other magnified images. That is, use the interpolation method to obtain the magnified image of G2 make The size of G1 is the same as that of G1; G1 is interpolated to obtain the enlarged image make The dimensions of are the same as those of G0, and are expressed as follows:

[0176]

[0177] In the above formulas,

[0178] 4. Order Get the images of each layer of the Laplace pyramid. Where N is the layer number of the top layer of the Laplace pyramid, LP l is the lth layer image of the Laplace pyramid decomposition. That is:

[0179]

[0180] LP4=G4

[0181] The pyramid composed of LP0, LP1, LP2, LP3, and LP4 is the Laplacian pyramid. Each layer of the image is the difference between the image of the current layer of the Gaussian pyramid and the image of the next higher layer after interpolation and enlargement.

[0182] 4.2.3 Obtaining the mask image for fusion

[0183] 6. Get the stamp image transparency mask

[0184] Extract the transparency mask A from the stamp image img4 (i.e., obtain the Alpha channel of the stamp image), the transparency mask represents the transparency value of each pixel in the image, and the range is usually between 0 and 255. Normalize the transparency mask image to between 0 and 1 to obtain the transparency mask image C, i.e., C=A / 255.

[0185] 7. Get the foreground area (red seal area) mask SealM of the seal image img4

[0186] 2.1 Convert the stamp image img4 to a grayscale image img4_grey

[0187] 2.2 Use the threshold segmentation method to binarize the grayscale image img4_grey and extract the foreground part of the seal

[0188] 2.3 Generate a mask SealM, keep the foreground area (set the pixel value to 1), and set the background area to black (set the pixel value to 0)

[0189] 8. Get the character contour mask CharM of the document image img3

[0190] 3.1 Binarize the document image img3 to obtain a binary image img_binary;

[0191] 3.2 Perform contour detection on the binary image img_binary to obtain the contour of the text area;

[0192] 3.3 Generate a binary mask image CharM based on the detected contour, the area within the contour has a pixel value of 1, and the rest is 0;

[0193] 9. Combine the stamp mask SealM and the contour mask CharM to generate the final fusion mask M

[0194] There are four pixel values ​​in the fusion mask M: 0, 1, 2, and 3; the pixel value of the area where both the stamp mask SealM and the contour mask CharM are 0 is 0; the pixel value of the area where both the stamp mask SealM and the contour mask CharM are 1 is 1; the pixel value of the area where the stamp mask SealM is 0 and the contour mask CharM is 1 is 2; the pixel value of the area where the stamp mask SealM is 1 and the contour mask CharM is 0 is 3.

[0195] 10.According to the process and method of 4.2.1 and 4.2.2 above, obtain the Laplacian pyramid images LM and LC of the fused mask image M and the transparency mask C.

[0196] 4.2.4 Laplacian Pyramid Image Fusion

[0197] LA l and LB l They are the seal image img4 and the document image img3, which are the first layer images obtained after Laplace pyramid decomposition. The fusion result of the two is LF l (0≤l≤N).LM l LC l is the lth layer image of the Laplacian pyramid image of the fused mask image M and the transparency mask image C. When l=4, LA4, LB4, LM4, and LC4 are the top layer images obtained by decomposing the seal image Img4, the document image img3, the fused mask image M, and the transparency mask image C through the Laplacian pyramid.

[0198] Set GA * l and GB * l They are the stamp image img4 and the document image img3, which are the enlarged images of the Gaussian pyramid layer l in the process of generating the Laplacian pyramid. The fusion result of the two is GF l * (0≤l≤N).

[0199] 1. Fusion of top-level images

[0200] For the fusion of the top-level image, first calculate the average gradient G of the region with a size of M*N (M, N are odd numbers and M≥3, N≥3) centered on each pixel:

[0201]

[0202] Among them, ΔI x and ΔI y are the first-order differences of pixel f(x,y) in the x and y directions, respectively, and are defined as follows:

[0203] ΔIx =f(x,y)-f(x-1,y)

[0204] ΔI y =f(x,y)-f(x,y-1)

[0205] Therefore, for each pixel LA4(i,j) and LB4(i,j) in the top image, the regional average gradient GA(i,j) and GB(i,j) corresponding to the threshold can be obtained. (i,j) is the horizontal and vertical coordinates of the image pixel.

[0206] Set the fusion result of the top layer image to:

[0207] (1) When LM4(i,j)=0:

[0208]

[0209] (2) When LM4(i,j)=1:

[0210]

[0211] (3) When LM4(i,j)=2:

[0212] LF4(i,j)=LB4(i,j)

[0213]

[0214] (4) When LM N When (i,j)=3:

[0215] LF4(i,j)=LA4(i,j)

[0216]

[0217] 2. Fusion of other layer images

[0218] When 0≤l<4, for the l-th layer image after Laplace pyramid decomposition, its regional energy is first calculated:

[0219]

[0220] Here, p=1, q=1, The fusion effect of other layers of images is:

[0221] (1) When LM l When (i,j)=0:

[0222]

[0223] (2) When LM lWhen (i,j)=1:

[0224]

[0225] (3) When LM l When (i,j)=2:

[0226] LF l (i,j)=LB l (i,j)0≤l<4

[0227] GF l * (i, j) = GB l (i, j) 0≤l<4

[0228] (4) When LM l When (i,j)=3:

[0229] LF l (i,j)=LA l (i,j)0≤l<4

[0230] GF l * (i, j) = GA l (i, j) 0≤l<4

[0231] 3. Reconstruction of fused image

[0232] After obtaining the fusion images LF1, LF2, LF3, LF4 of each level of the seal image and document image pyramid and the enlarged image GF1 of each level of the Gaussian pyramid image * , After that, the corresponding layers of the Gaussian pyramid can be restored through the following reconstruction until G0 is obtained, which is the final fused image img5.

[0233] Reconstruction formula:

[0234]

[0235] That is: G4 = LF4

[0236]

[0237] Step 4.3: Fuse the seal image img5 to add the traceability information placeholder in a steganographic way:

[0238] Assume that the data of the fused seal img5 is C, the length of the fused seal img5 is L1 bytes; the seal traceability information placeholder is C1, the length is L2 bytes (the length can be adjusted, the default is 512 bytes), and all data values ​​are 0;

[0239] The fused seal img5 data C and the seal traceability information placeholder C1 are fused according to the following formula to obtain the fused data C2:

[0240] C2=C∪C1

[0241] Save the fused data C2 as the latest fused stamp img6.

[0242] Step 5: Fill the signature field with the fusion seal, signature result, and seal traceability data

[0243] Step 5-1, add the latest fused seal image img6 in the signature field, and record the starting position of the image data in the file as P1;

[0244] Step 5-2: Encrypt and calculate the file data to be protected based on the digital certificate and digital signature technology to obtain the signature value sign, and fill it into the signature field;

[0245] Step 5-3, concatenate the electronic seal service attribute serviceId (usually the electronic seal name or seal ID) and the signature value sign calculated in step 5-2 to obtain the traceability data C3, the length of C3 is L3; and fill the traceability data C3 into the PDF document, starting at P2, to achieve the traceability data filling in the latest fused seal img6,

[0246] P2=P1+L1+L2-L3

[0247] The digital signature process requires an asymmetric cryptographic algorithm and a digest algorithm. The digital signature process is:

[0248] Step 1: Get the original data of the PDF file;

[0249] Step 2: Use the specified hash algorithm to calculate the hash summary of the original text to obtain the hash summary value of the original text;

[0250] Step 3: Use the signer's private key to encrypt the digest value to obtain the signature value;

[0251] Step 4: Combine the summary value, signature value, and signer's public key certificate to obtain the signature result data.

[0252] The beneficial effect of the present invention is that the present invention combines digital signature technology and image processing technology, and can add traceability information to the electronic seal image data when adding an electronic signature to an office document in PDF (Portable Document Format) format, so that the electronic seal and the document content are physically integrated, and the purpose of preventing the seal from being stolen is achieved without changing the seal shape and the document content.

[0253] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A seal-theft-proof electronic signature method, Features The following steps are involved: Step 1, analyzing the physical features of the electronic seal image img1, including the signature size features and the physical features of the signature position; Step 2: Add a signature field at the coordinate position of the document to be signed; Step 3, convert the document at the signature field location into a document image img3; Step 4, rotating the seal image img1, and fusing the seal image with the document image img3 to obtain a fused image img5, adding a seal traceability information placeholder in a steganographic manner to the fused image to obtain a fused image img6 with a traceability placeholder; Step 5. Fill the fused image img6 into the signature field and calculate the signature value; concatenate the electronic seal business attributes and the calculated signature value to obtain the traceability data, and fill the traceability data into the placeholder position of the fused image img6 in the PDF document.

2. The seal-theft-proof electronic signature method according to claim 1, Features: The physical features of the electronic seal image img1 include signature size features and signature position physical features, wherein the signature size features include: width width, height height, resolution dpi; the signature position physical features include: rotation angle angle, physical coordinates (x, y).

3. The seal-theft-proof electronic signature method according to claim 1, Features Step 4 includes: Step 4.1 The stamp image img1 is rotated.

4. The seal-theft-proof electronic signature method according to claim 3, Features Step 4 includes: Step 4.2 The seal image img4 is fused with the document image img3.

5. The seal-theft-proof electronic signature method according to claim 4, Features Step 4.2.3 includes:

1. Get the stamp image transparency mask C 2. Get the foreground area mask SealM of the seal image img4 3. Get the character contour mask CharM of the document image img3 4. Combine the stamp mask SealM and the contour mask CharM to generate the final fusion mask M; 5. Obtain a Laplacian pyramid image of the fused mask image M and the transparency mask C.

6. The seal-theft-proof electronic signature method according to claim 3, Features Step 4 also includes: Step 4.3: fuse the seal image img5 to add the traceability information placeholder in a steganographic manner; The seal img5 data C and the seal traceability information placeholder C will be merged 1 Fusion obtains fused data C 2 : The stamp data C 2 Save as latest fusion stamp img6.

7. The seal-theft-proof electronic signature method according to claim 1, Features Step 5 includes: Step 5-1, add the latest fused seal image img6 in the signature field, and record the starting position of the image data in the file as P 1 ; Step 5-2: Encrypt the data to be protected in the file to obtain a signature value, and fill it into the signature field; Step 5-3: Concatenate the electronic seal business attribute and the signature value calculated in step 5-2 to obtain the traceability data C 3 , C 3 Length L 3 ; and traceability data C 3 Fill in the PDF document.